Fetch inventories

By default, an organization has 4 inventories of different types respectively: STORE, SOLD, SUPPLIER and BIN. They each represent a conceptual inventory with a stock level.
You can fetch a list of all available inventories for the organization. Fetching inventories can be used when working with inventory balances and stock management.

Prerequisites

  • Make sure that authorisation is set up with the following OAuth scope using OAuth API:
    • READ:PRODUCT

Fetch all inventories

Use this request to fetch all inventories for the organization the merchant is signed in as.
1
GET /inventories
Example: This example fetches the inventories for the organization associated with the authorization token. In the request header, the token is passed in type Authorization: Bearer eyJraWQiOiIxNjM3MTg1Mjg0Nz....
Request
1
GET /inventories
2
Host: inventory.izettle.com
3
Authorization: Bearer eyJraWQiOiIxNjM3MTg1Mjg0Nz...
Response
1
[
2
{
3
"inventoryUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4
"inventoryType": "STORE",
5
"name": "System generated location",
6
"description": "System generated location",
7
"defaultInventory": true
8
},
9
{
10
"inventoryUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
11
"inventoryType": "SUPPLIER",
12
"name": "System generated location",
13
"description": "System generated location",
14
"defaultInventory": false
15
},
16
{
17
"inventoryUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
18
"inventoryType": "SOLD",
19
"name": "System generated location",
20
"description": "System generated location",
21
"defaultInventory": false
22
},
23
{
24
"inventoryUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
25
"inventoryType": "BIN",
26
"name": "System generated location",
27
"description": "System generated location",
28
"defaultInventory": false
29
}
30
]

Fetch a single inventory

Use this request to retrieve a single inventory that the organization the client is signed in as has access to.
1
GET /inventories/<inventoryUuid>
Example: This example retrieves the inventory that has the supplied inventoryUuid for the organization associated with the authorization token. The token is passed in the request header and is of type Authorization: Bearer eyJraWQiOiIxNjM3MTg1Mjg0Nz....
Request
1
GET /inventories/3fa85f64-5717-4562-b3fc-2c963f66afa6
2
Host: inventory.izettle.com
3
Authorization: Bearer eyJraWQiOiIxNjM3MTg1Mjg0Nz...
Response
1
{
2
"inventoryUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3
"inventoryType": "STORE",
4
"name": "System generated location",
5
"description": "System generated location",
6
"defaultInventory": true
7
}
Ensure inventory UUIDs are saved so they are available for access by the client system. They will be used in most other calls when managing inventory balances.