companyContact
query
需要 read_customers 权限点。
接口访问需要令牌,具体如何获取令牌参考:身份认证。
公司联系人信息查询
Example
查询公司联系人信息
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": {
"amountSpent": null,
"defaultAddress": null,
"emailMarketingConsent": {
"consentUpdatedAt": "2023-11-07T10:13:39Z",
"marketingState": "SUBSCRIBED"
},
"id": "gid://shopline/Customer/4217281771",
"lastName": "T******",
"numberOfOrders": null,
"addresses": [],
"email": "******@example.com",
"firstName": "S******",
"phone": null
},
"id": "gid://shopline/CompanyContact/4217281771",
"isMainContact": true,
"updatedAt": "2023-12-21T10:34:54.575Z"
}
}
}
这篇文章对你有帮助吗?