Skip to main content
GET
/
v1
/
stocks
Query Stocks Per Item
curl --request GET \
  --url https://api.jtl-cloud.com/erp/v1/stocks \
  --header 'Authorization: Bearer <token>' \
  --header 'x-tenant-id: <x-tenant-id>'
{
  "TotalItems": 123,
  "PageNumber": 123,
  "PageSize": 123,
  "Items": [
    {
      "WarehouseId": 123,
      "StorageLocationId": 123,
      "StorageLocationName": "<string>",
      "ItemId": 123,
      "ShelfLifeExpirationDate": "2023-11-07T05:31:56Z",
      "BatchNumber": "<string>",
      "QuantityTotal": 123,
      "QuantityLockedForShipment": 123,
      "QuantityLockedForAvailability": 123,
      "QuantityInPickingLists": 123
    }
  ],
  "TotalPages": 123,
  "HasPreviousPage": true,
  "HasNextPage": true,
  "NextPageNumber": 123,
  "PreviousPageNumber": 123
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-tenant-id
string<uuid>
required

The tenant ID for the target ERP instance.

x-runas
string

The User-Id (int or uuid) on whose behalf the request is executed. Requires scope 'Application.RunAs'.

x-companyid
string

The Company-Id (int or uuid) of the company on whose behalf the request is executed.

Query Parameters

itemId
integer<int32>
warehouseId
integer<int32>
storageLocationId
integer<int32>
pageNumber
integer<int32>

Number of the page of items to fetch.

pageSize
integer<int32>

Size of the page that is specified by pageNumber.

Response

The requested stock information.

Represents a paginated list of items

TotalItems
integer<int32>
required

Gets or sets the total number of items available in the data source.

PageNumber
integer<int32>
required

Gets or sets the current page number in the paginated list.

PageSize
integer<int32>
required

Gets or sets the number of items per page in the paginated list.

Items
object[]
required

Gets or sets the collection of items contained in the paged list.

TotalPages
integer<int32>

Gets the total number of pages based on the total number of items and the page size.

HasPreviousPage
boolean

Gets a value indicating whether there is a previous page available in the paginated list.

HasNextPage
boolean

Gets a value indicating whether there is a next page available.

NextPageNumber
integer<int32>

Gets the number of the next page if there is one; otherwise, returns the total number of pages.

PreviousPageNumber
integer<int32>

Gets the number of the previous page. If there is no previous page, it returns 1.