company
query
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Query company information.
Arguments
Company ID
Return
Number of company contacts
The list of roles for the company contacts
The list of contacts in the company.
Company creation time
Company id
Number of company locations
Main contact
Company name
Order quantity
Company order amount
Update time
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Query company information
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": {
"id": "gid://shopline/Company/************7166237",
"mainContact": {
"createdAt": "2023-11-07T10:13:38.117Z",
"customer": {
"createdAt": "2023-11-07T10:13:38.117Z",
"displayName": "gqltest04 gqltest05",
"email": "*********@example.com",
"id": "gid://shopline/Customer/******1771",
"lastName": "gqltest05",
"locale": null,
"updatedAt": "2023-12-21T10:34:54.575Z",
"firstName": "gqltest04",
"phone": null,
"state": "ENABLED"
},
"id": "gid://shopline/CompanyContact/gid://shopline/CompanyContact/******1771"
},
"name": "test2",
"contacts": {
"edges": [
{
"cursor": "-",
"node": {
"id": "gid://shopline/CompanyContact/******669"
}
},
{
"cursor": "-",
"node": {
"id": "gid://shopline/CompanyContact/******148"
}
}
],
"nodes": [
{
"id": "gid://shopline/CompanyContact/******669"
},
{
"id": "gid://shopline/CompanyContact/******148"
}
],
"pageInfo": {
"endCursor": "E002CE0E792FBA4E98672D39851FDFD6",
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "AF52536A1951B28A30AAE8825A2B69B9"
}
}
}
}
}
Was this article helpful to you?