To get filtering options for service_types, service_categories, billing_type, state, sort_field use the static endpoint.
Accounts List
GET
/api/v1/inventory/accountsInventoryReturns the list of available accounts.
Auth Scope
urn:grt:inventoryContent-Type
application/jsonRate Limit
60 req/min
Headers
| Header | Value |
|---|---|
Authorization | Bearer access-token |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service_types | string | No | Parameter to filter by service type |
service_categories | string | No | Parameter to filter by one or more service categories. Multiple items should be passed separated by "," (comma) |
billing_type | string | No | Parameter to filter by billing type |
state | string | No | Parameter to filter accounts by their state or province |
parent_number | string | No | Parameter to filter accounts by their parent company number |
page | integer | No | Page number for pagination (starting at 1). Default: 1 |
page_size | integer | No | Number of accounts per page. Must be between 1 and 100. Default: 20 |
search | string | No | Search parameter |
sort_field | string | No | Field to sort the results by |
sort_order | string | No | Sort direction: "ASC" or "DESC". Default: "DESC" |
granted_tenant_macnum | string | No | The company macnum on whose behalf the action is performed |
Note
Response
Success Response (200 OK)
Response Fields
| Field | Type | Description |
|---|---|---|
results | array | A list containing objects, where each object represents a summary for a specific account |
info | object | An object containing pagination details for the entire dataset |
Account Object Fields
| Field | Type | Description |
|---|---|---|
parent_name | string | The name of the parent company or entity |
parent_number | string | The identifier number for the parent company |
account_number | string | The identifier number for the specific account or site |
account_name | string | The descriptive name of the account, which may include location details |
address | string | The street address for the account site |
state | string | The state or province of the account's address |
city | string | The city of the account's address |
zip | string | The postal or ZIP code for the account's address |
service_types | string | A comma-separated string listing the types of services associated with the account |
services_count | integer | The total number of services for this account |
billing_type | string | The method by which the account is billed (e.g., "Bill to Parent") |
service_categories | array of strings | A list of the specific service categories associated with the account |
Info Object Fields
| Field | Type | Description |
|---|---|---|
total_pages | integer | The total number of pages available |
total_records | integer | The total number of records across all pages |
page_size | integer | The number of records displayed per page |
page | integer | The current page number |
next_page | integer | The number of the next page in the sequence |
Code Examples
Errors
| HTTP Status | Error Description | Resolution |
|---|---|---|
401 | Authentication Failed | Verify your access token is valid and included in the Authorization header with the "Bearer " prefix. |
403 | Permission Denied | Your access token does not have the required scope (urn:grt:inventory). Contact your administrator to request the appropriate permissions. |
Last updated on