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
id ● ID!non-null
Company ID
Return
contactCount ● Int
Number of company contacts
contactRoles ● CompanyContactRoleConnection
The list of roles for the company contacts
More
The list of contacts in the company.
More
createdAt ● Date
Company creation time
id ● ID
Company id
locationCount ● Int
Number of company locations
mainContact ● CompanyContact
Main contact
More
name ● String
Company name
orderCount ● Int
Order quantity
totalSpent ● MoneyV2
Company order amount
More
updatedAt ● Date
Update time
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Query company information
{
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?