An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Company Location List Query
Arguments
after ● String
Returns elements following the specified cursor. The first argument must also be specified when using this argument.
before ● String
Returns elements preceding the specified cursor. The last argument must also be specified when using this argument.
first ● Int
Returns the first n elements in the list.
last ● Int
Returns the last n elements in the list.
reverse ● Boolean
Whether to reverse the order of the list.
● true: reverse
● false: do not reverse
Default value: false
sort key
More
rawQuery ● String
Query criteria, JSON string. Currently, only location name or company ID queries are supported, such as {"companyId": "643266524357", "name": "Golden Street Location"}
Return
edges ● [CompanyLocationEdge!]non-null
edge list
More
nodes ● [CompanyLocation]
node list
More
pageInfo ● PageInfo!non-null
pageInfo
More
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Location list query
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": {
"edges": [
{
"cursor": "-",
"node": {
"billingAddress": {
"address1": "fake street",
"city": "Ottawa",
"country": null,
"countryCode": "CA",
"zip": "53118",
"address2": "long three department",
"createdAt": "2024-06-03T02:26:44.848Z",
"id": "gid://shopline/CompanyAddress/************4520",
"province": null
},
"company": {
"id": "gid://shopline/Company/************50599",
"name": "S****"
},
"id": "gid://shopline/CompanyLocation/************8886",
"name": "Top catagory location",
"orderCount": 0,
"shippingAddress": {
"country": null,
"countryCode": "CA",
"id": "gid://shopline/CompanyAddress/************01447",
"province": null,
"address1": "funny street",
"address2": "golden 3 department",
"city": "Ottawa",
"createdAt": "2024-06-03T02:26:44.806Z",
"zip": "53118"
},
"totalSpent": {
"amount": "0",
"currencyCode": "USD"
}
}
},
{
"cursor": "-",
"node": {
"name": "Top catagory location",
"orderCount": 0,
"shippingAddress": {
"country": null,
"countryCode": "CA",
"province": null,
"zip": "53118",
"address1": "funny street",
"createdAt": "2024-05-14T10:26:15.653Z",
"id": "gid://shopline/CompanyAddress/************4551",
"address2": "golden 3 department",
"city": "Ottawa"
},
"totalSpent": {
"amount": "0",
"currencyCode": "USD"
},
"billingAddress": {
"address2": "long three department",
"country": null,
"createdAt": "2024-05-14T10:26:15.695Z",
"id": "gid://shopline/CompanyAddress/************624",
"zip": "53118",
"address1": "fake street",
"city": "Ottawa",
"countryCode": "CA",
"province": null
},
"company": {
"id": "gid://shopline/Company/************599",
"name": "T****"
},
"id": "gid://shopline/CompanyLocation/************0454"
}
}
],
"nodes": [
{
"orderCount": 0,
"shippingAddress": {
"address1": "funny street",
"address2": "golden 3 department",
"country": null,
"zip": "53118",
"city": "Ottawa",
"countryCode": "CA",
"createdAt": "2024-06-03T02:26:44.806Z",
"id": "gid://shopline/CompanyAddress/************1447",
"province": null
},
"totalSpent": {
"amount": "0",
"currencyCode": "USD"
},
"billingAddress": {
"countryCode": "CA",
"createdAt": "2024-06-03T02:26:44.848Z",
"address1": "fake street",
"address2": "long three department",
"city": "Ottawa",
"id": "gid://shopline/CompanyAddress/************4520",
"province": null,
"zip": "53118",
"country": null
},
"company": {
"id": "gid://shopline/Company/************0599",
"name": "Y*****"
},
"id": "gid://shopline/CompanyLocation/************886",
"name": "Top catagory location"
},
{
"totalSpent": {
"amount": "0",
"currencyCode": "USD"
},
"billingAddress": {
"province": null,
"address1": "fake street",
"address2": "long three department",
"city": "Ottawa",
"createdAt": "2024-05-14T10:26:15.695Z",
"zip": "53118",
"country": null,
"countryCode": "CA",
"id": "gid://shopline/CompanyAddress/************624"
},
"company": {
"id": "gid://shopline/Company/************599",
"name": "Big bom"
},
"id": "gid://shopline/CompanyLocation/************454",
"name": "Top catagory location",
"orderCount": 0,
"shippingAddress": {
"address2": "golden 3 department",
"country": null,
"id": "gid://shopline/CompanyAddress/************551",
"province": null,
"zip": "53118",
"address1": "funny street",
"city": "Ottawa",
"countryCode": "CA",
"createdAt": "2024-05-14T10:26:15.653Z"
}
}
],
"pageInfo": {
"endCursor": "E002CE0E792FBA4E98672D39851FDFD6",
"hasNextPage": true,
"hasPreviousPage": false,
"startCursor": "AF52536A1951B28A30AAE8825A2B69B9"
}
}
}
}
Was this article helpful to you?