latestOpenAPI 3.0.12026-08-192092911.2 MB

916e669fc527

Stock

Get a list of stock items

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

get/v1/stockItems

Query parameters

sortBy'createdAt'

Represents the fields that can be used to sort stock items<p>Possible values:</p><ul><li><b>createdAt</b>: The date and time when the stock item was created</li></ul>

Example:createdAt

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 stock items where id matches the value(s) provided (Max items: 50)

stockDetailsIdinteger[]

Only return stock items where stockDetailsId matches the value(s) provided (Max items: 50)

serialNumberstring

Only return stock items where 'serialNumber' matches the value provided

locationContactIdinteger

Only return stock items where 'locationContactId' matches the value provided

locationVehicleIdinteger

Only return stock items where 'locationVehicleId' matches the value provided

isSoldboolean

If true only returns stock items where 'soldAt' is not null, if false only returns stock items where 'soldAt' is null

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": 5514123,
      "stockDetailsId": 5514123,
      "quantity": 2.5,
      "locationContactId": 5514123,
      "locationVehicleId": 5514123,
      "locationStockItemId": 5514123,
      "soldAt": "2024-08-29T12:30:45.0000000+00:00",
      "createdAt": "2022-11-29T16:50:16.0000000+00:00",
      "notes": "Should be kept in warehouse",
      "serialNumber": "AT-25805",
      "altSerialNumber": "PA-09842",
      "supplierSerialNumber": "TW-015",
      "customerSerialNumber": "LM-214750",
      "isEquipment": true,
      "condition": "new",
      "usage": 10,
      "customFields": [
        {
          "definitionId": 5514123,
          "value": "Purple",
          "definition": {
            "caption": "Favourite colour",
            "type": "boolean",
            "listOptions": [
              "Red",
              "Blue",
              "Green",
              "Purple"
            ],
            "isRequired": true,
            "isEditable": true,
            "default": "10"
          },
          "systemListValueMetadata": {
            "label": "John Doe",
            "entityType": "resource"
          }
        }
      ]
    }
  ],
  "pageNumber": 2,
  "pageSize": 100,
  "pageItemCount": 55
}