Get a list of department codes
Retrieves a paged collection of department codes (required scope stock:read)
Query Parameters
Possible values: [code
, description
]
The field to sort items in the page by
Possible values: [ascending
, descending
]
The direction to apply the sort
Only return department codes where 'id' matches the value(s) provided
Possible values: >= 1
and <= 2147483
The page number being requested (minimum: 1, maximum: 2147483)
Possible values: >= 1
and <= 1000
The page size being requested (minimum: 1, maximum: 1000)
Header Parameters
The customer identifier
- 200
- 400
- 403
- 500
Success
Schema
- Array [
- ]
items object[]
The items returned for the requested page
The department code the identifies departments within the organisation
Description of the department code
The date and time when the record was created
The page number of the response where 1 is the first page
The number of items requested for the current page
The number of items returned in the current page
{
"items": [
{
"id": 0,
"code": "C1234",
"description": "Finance",
"createdAt": "2021-07-01T00:00:00.0000000+00:00"
}
],
"pageNumber": 2,
"pageSize": 100,
"pageItemCount": 55
}
Bad Request
Schema
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}
Forbidden
Schema
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}
Server Error
Schema
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}