Get All Inventory

Last updated last month

get
Get Stock for All Products

https://api.moltin.com
/v2/inventories
Request
Response
Headers
Authorization
required
string
The Bearer token to grant access to the API
Query Parameters
page[limit]
optional
string
The number of items to return per page
page[offset]
optional
string
The number of pages to offset the results by
200: OK
{
"data": [
{
"id": "95ff4acc-9d8e-4a8e-be3a-61b174b20c2b",
"type": "stock",
"total": 100,
"available": 100,
"allocated": 0
},
{
"id": "db33dc42-6a08-4929-8e85-8e1ea619c832",
"type": "stock",
"total": 100,
"available": 100,
"allocated": 0
},
{
"id": "721fcb79-37d9-4328-b69d-bab7b73d7770",
"type": "stock",
"total": 100,
"available": 100,
"allocated": 0
}
],
"links": {
"current":
"https://api.moltin.com/v2/inventories?page[offset]=0&page[limit]=50",
"first":
"https://api.moltin.com/v2/inventories?page[offset]=0&page[limit]=50",
"last":
"https://api.moltin.com/v2/inventories?page[offset]=0&page[limit]=50"
},
"meta": {
"results": {
"total": 3,
"all": 3
},
"page": {
"limit": 100,
"offset": 0,
"current": 1,
"total": 1
}
}
}
cURL
JavaScript SDK
Moltin Request
curl -X GET https://api.moltin.com/v2/inventories \
-H "Authorization: Bearer XXXX"
const MoltinGateway = require('@moltin/sdk').gateway
const Moltin = MoltinGateway({
client_id: 'X'
})
Moltin.Inventories.All().then(inventories => {
// Do something
})
const { createClient } = require('@moltin/request')
const client = new createClient({
client_id: 'X'
})
client
.get('inventories')
.then(inventories => {
// Do something...
})
.catch(console.error)