companyContact
query
Requires read_customers access scope.
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Company contact information query
Arguments
Company contact id
Return
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Query company contact information
Code
{
companyContact(id:"gid://shopline/CompanyContact/4217281771") {
id
isMainContact
company {
id
name
}
customer {
id
email
phone
firstName
lastName
numberOfOrders
amountSpent {
amount
currencyCode
}
addresses {
countryCodeV2
address1
address2
}
defaultAddress {
countryCodeV2
address1
address2
}
emailMarketingConsent {
marketingState
consentUpdatedAt
}
}
createdAt
updatedAt
}
}
Response
{
"data": {
"companyContact": {
"company": {
"id": "6254924101557166237",
"name": "S*****"
},
"createdAt": "2023-11-07T10:13:38.117Z",
"customer": {
"addresses": [],
"emailMarketingConsent": {
"consentUpdatedAt": "2023-11-07T10:13:39Z",
"marketingState": "SUBSCRIBED"
},
"firstName": "S******",
"id": "gid://shopline/Customer/4217281771",
"lastName": "T******",
"numberOfOrders": null,
"phone": null,
"amountSpent": null,
"defaultAddress": null,
"email": "******@example.com"
},
"id": "gid://shopline/CompanyContact/4217281771",
"isMainContact": true,
"updatedAt": "2023-12-21T10:34:54.575Z"
}
}
}
Was this article helpful to you?