You can query contacts one by one using the contact
object. You must know the unique ID of the contact (key
) for this query.
query {
contact(
key: "PISCX-098724242477"
) {
attributes {
name
value
}
}
}
{
"data": {
"contact": {
"attributes": [
{
"name": "Email",
"value": "[email protected]"
},
{
"name": "Contact key",
"value": "PISCX-098724242477"
},
{
"name": "Last purchase",
"value": "2024-01-06T13:11:21.137Z"
},
{
"name": "Country",
"value": "Wonderland""
},
{
"name": "Cell Phone",
"value": "+987654321098890"
},
{
"name": "Name",
"value": "Alice"
},
{
"name": "Last Name",
"value": null
}
]
}
}
}
Note
To find contacts by their emails or phone numbers, use the
contacts
object. For instructions, see Query contacts.
Arguments
Arguments required by the contact
mutation
Argument | Values | Definition |
---|---|---|
key | String | A unique identifier assigned to a contact |
Fields
Fields returned by the contact
mutation
Field | Nested field | Required? | Values | Definition |
---|---|---|---|---|
tracking | createdAt | Optional | A date-time string at UTC, such as 2023-12-03T09:54:33Z | When the contact was added to the audience |
createdBy | Optional | String | The user who added the contact to the audience. | |
lastModifiedAt | Optional | A date-time string at UTC, such as 2023-12-03T09:54:33Z | When the contact was edited last time | |
lastModifiedBy | Optional | String | The user who modified the contact last time | |
attributes | value | Optional | Depends on the type of contact attribute. | The value set to the contact attribute |
name | Required | String | The name of a contact attribute ⚠️ Only the attributes that are filled out for a contact are returned. | |
type | Optional | One of the following values: - TEXT - NUMBER - BOOLEAN - DATE | The data format of the contact attribute |
Arguments supported by the attributes
field
Argument | Values | Definition |
---|---|---|
selectByName | String | Use this argument to get data only for the specified contact attributes. |
selectByChannel | One of the following values: - EMAIL - SMS | Use this argument to filter the response by the communication channel. |