company
query
接口访问需要令牌,具体如何获取令牌参考:身份认证。
查询公司信息
Arguments
公司 ID
Return
公司联系人数量
公司联系人角色列表
联系人列表
公司创建 时间
公司id
公司下地点数量
主要联系人
公司名称
订单数量
公司订单金额
更新时间
错误码
关于更多通用错误码说明,参考:状态码和错误码。
Example
查询公司信息
Code
{
company(id:"gid://shopline/Company/6254924101557166237") {
id
name
mainContact{
id
createdAt
customer {
id
displayName
email
firstName
lastName
locale
phone
createdAt
updatedAt
state
}
}
contacts(first:"10") {
pageInfo{
startCursor
endCursor
hasPreviousPage
hasNextPage
}
nodes{
id
}
edges{
cursor
node {
id
}
}
}
}
}
Response
{
"data": {
"company": {
"mainContact": {
"createdAt": "2023-11-07T10:13:38.117Z",
"customer": {
"createdAt": "2023-11-07T10:13:38.117Z",
"email": "*********@example.com",
"firstName": "gqltest04",
"lastName": "gqltest05",
"phone": null,
"state": "ENABLED",
"updatedAt": "2023-12-21T10:34:54.575Z",
"displayName": "gqltest04 gqltest05",
"id": "gid://shopline/Customer/******1771",
"locale": null
},
"id": "gid://shopline/CompanyContact/gid://shopline/CompanyContact/******1771"
},
"name": "test2",
"contacts": {
"edges": [
{
"node": {
"id": "gid://shopline/CompanyContact/******669"
},
"cursor": "-"
},
{
"cursor": "-",
"node": {
"id": "gid://shopline/CompanyContact/******148"
}
}
],
"nodes": [
{
"id": "gid://shopline/CompanyContact/******669"
},
{
"id": "gid://shopline/CompanyContact/******148"
}
],
"pageInfo": {
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "AF52536A1951B28A30AAE8825A2B69B9",
"endCursor": "E002CE0E792FBA4E98672D39851FDFD6"
}
},
"id": "gid://shopline/Company/************7166237"
}
}
}
这篇文章对你有帮助吗?