latestOpenAPI 3.0.12026-08-192092911.2 MB

916e669fc527

ReferenceData

Get a list of department codes

Retrieves a paged collection of department codes (required scope stock:read)

get/v1/departmentCodes

Query parameters

sortBy'code' | 'description'

Represents the fields that can be used to sort department codes<p>Possible values:</p><ul><li><b>code</b>: The code</li><li><b>description</b>: The description</li></ul>

Example:code

The field to sort items in the page by

direction'ascending' | 'descending'

Represents the direction in which sorting should be applied<p>Possible values:</p><ul><li><b>ascending</b>: Indicates ascending sorting order</li><li><b>descending</b>: Indicates descending sorting order</li></ul>

Example:ascending

The direction to apply the sort

idinteger[]

Only return department codes where 'id' matches the value(s) provided (Max items: 50)

pageNumberinteger

The page number being requested (minimum: 1, maximum: 2147483)

pageSizeinteger

The page size being requested (minimum: 1, maximum: 1000)

Headers

Customer-Idinteger required

The customer identifier

Response

OK

pageNumberinteger

The page number of the response where 1 is the first page

pageSizeinteger

The number of items requested for the current page

pageItemCountinteger

The number of items returned in the current page

Example response

{
  "items": [
    {
      "id": 123456,
      "code": "C1234",
      "description": "Finance",
      "createdAt": "2021-07-01T00:00:00.0000000+00:00"
    }
  ],
  "pageNumber": 2,
  "pageSize": 100,
  "pageItemCount": 55
}