需要 read_customers 权限点。
接口访问需要令牌,具体如何获取令牌参考:身份认证
公司联系人信息查询
Arguments
id ● ID!non-null
公司联系人id
Return
company ● Company
公司信息
More
createdAt ● Date
创建时间
customer ● Customer
客户信息
More
id ● ID
联系人id
isMainContact ● Boolean
是否主要联系人
locale ● String
语言
updatedAt ● Date
更新时间
错误码
关于更多通用错误码说明,参考:状态码和错误码
Example
查询公司联系人信息
{
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"
}
}
}
这篇文章对你有帮助吗?