接口访问需要令牌,具体如何获取令牌参考:身份认证
公司地点列表查询
Arguments
after ● String
返回指定游标之后的元素。如果指定了该参数,也必须要指定 first 参数。
before ● String
返回指定游标之前的元素。如果指定了该参数,也必须要指定 last 参数。
first ● Int
返回列表中的前 n 个元素。
last ● Int
返回列表中的最后 n 个元素。
reverse ● Boolean
是否反转列表的顺序。
● true:反转
● false:不反转
默认值:false
排序规则
More
rawQuery ● String
查询条件,json字符串。 当前仅支持地点名称或公司id查询,例如{"companyId": "643266524357","name": "Golden Street Location"}
Return
edges ● [CompanyLocationEdge!]non-null
edges列表
More
nodes ● [CompanyLocation]
节点列表
More
pageInfo ● PageInfo!non-null
分页信息
More
错误码
关于更多通用错误码说明,参考:状态码和错误码
Example
地点列表查询
query {
companyLocations(first: 2, rawQuery: "{\"name\": \"location\"}",after:null,before:null,reverse:true,sortKey: CREATED_AT) {
edges {
cursor
node {
id
name
orderCount
totalSpent {
amount
currencyCode
}
billingAddress {
id
address1
address2
countryCode
country
createdAt
id
zip
city
province
}
shippingAddress {
address1
address2
countryCode
country
createdAt
id
zip
city
province
}
company {
id
name
}
}
}
nodes {
id
name
orderCount
totalSpent {
amount
currencyCode
}
billingAddress {
id
address1
address2
countryCode
country
createdAt
id
zip
city
province
}
shippingAddress {
address1
address2
countryCode
country
createdAt
id
zip
city
province
}
company {
id
name
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
}
}
Response
{
"data": {
"companyLocations": {
"nodes": [
{
"orderCount": 0,
"shippingAddress": {
"address1": "funny street",
"address2": "golden 3 department",
"country": null,
"province": null,
"zip": "53118",
"city": "Ottawa",
"countryCode": "CA",
"createdAt": "2024-06-03T02:26:44.806Z",
"id": "gid://shopline/CompanyAddress/************1447"
},
"totalSpent": {
"amount": "0",
"currencyCode": "USD"
},
"billingAddress": {
"province": null,
"zip": "53118",
"address1": "fake street",
"city": "Ottawa",
"country": null,
"id": "gid://shopline/CompanyAddress/************4520",
"address2": "long three department",
"countryCode": "CA",
"createdAt": "2024-06-03T02:26:44.848Z"
},
"company": {
"id": "gid://shopline/Company/************0599",
"name": "Y*****"
},
"id": "gid://shopline/CompanyLocation/************886",
"name": "Top catagory location"
},
{
"billingAddress": {
"address2": "long three department",
"city": "Ottawa",
"country": null,
"countryCode": "CA",
"id": "gid://shopline/CompanyAddress/************624",
"address1": "fake street",
"createdAt": "2024-05-14T10:26:15.695Z",
"province": null,
"zip": "53118"
},
"company": {
"id": "gid://shopline/Company/************599",
"name": "Big bom"
},
"id": "gid://shopline/CompanyLocation/************454",
"name": "Top catagory location",
"orderCount": 0,
"shippingAddress": {
"id": "gid://shopline/CompanyAddress/************551",
"province": null,
"address2": "golden 3 department",
"city": "Ottawa",
"countryCode": "CA",
"zip": "53118",
"address1": "funny street",
"country": null,
"createdAt": "2024-05-14T10:26:15.653Z"
},
"totalSpent": {
"amount": "0",
"currencyCode": "USD"
}
}
],
"pageInfo": {
"endCursor": "E002CE0E792FBA4E98672D39851FDFD6",
"hasNextPage": true,
"hasPreviousPage": false,
"startCursor": "AF52536A1951B28A30AAE8825A2B69B9"
},
"edges": [
{
"cursor": "-",
"node": {
"id": "gid://shopline/CompanyLocation/************8886",
"name": "Top catagory location",
"orderCount": 0,
"shippingAddress": {
"address2": "golden 3 department",
"country": null,
"createdAt": "2024-06-03T02:26:44.806Z",
"zip": "53118",
"address1": "funny street",
"city": "Ottawa",
"countryCode": "CA",
"id": "gid://shopline/CompanyAddress/************01447",
"province": null
},
"totalSpent": {
"amount": "0",
"currencyCode": "USD"
},
"billingAddress": {
"address2": "long three department",
"country": null,
"province": null,
"zip": "53118",
"city": "Ottawa",
"countryCode": "CA",
"createdAt": "2024-06-03T02:26:44.848Z",
"id": "gid://shopline/CompanyAddress/************4520",
"address1": "fake street"
},
"company": {
"id": "gid://shopline/Company/************50599",
"name": "S****"
}
}
},
{
"cursor": "-",
"node": {
"billingAddress": {
"zip": "53118",
"address2": "long three department",
"country": null,
"countryCode": "CA",
"createdAt": "2024-05-14T10:26:15.695Z",
"address1": "fake street",
"city": "Ottawa",
"id": "gid://shopline/CompanyAddress/************624",
"province": null
},
"company": {
"id": "gid://shopline/Company/************599",
"name": "T****"
},
"id": "gid://shopline/CompanyLocation/************0454",
"name": "Top catagory location",
"orderCount": 0,
"shippingAddress": {
"address1": "funny street",
"country": null,
"createdAt": "2024-05-14T10:26:15.653Z",
"id": "gid://shopline/CompanyAddress/************4551",
"province": null,
"address2": "golden 3 department",
"city": "Ottawa",
"countryCode": "CA",
"zip": "53118"
},
"totalSpent": {
"amount": "0",
"currencyCode": "USD"
}
}
}
]
}
}
}
这篇文章对你有帮助吗?