Locations and stock
Read the locations of the warehouse and the stock on each, by item and lot.
On this page
List locations
GET /warehouse/v1/locations
Returns the locations of the warehouse in pages, by code.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
zone | query | string | Nooptional | Only the locations of this zone. One of dock, reserve, pick, cold, pack |
limit | query | integer | Nooptional | Records per page. Default 100 Range 1 – 500 |
cursor | query | string | Nooptional | The nextCursor of the previous page. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | A page of records. | LocationPage |
400 | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. fields names each one. | Error |
401 | The token is missing, not valid or has ended. | Error |
403 | The token does not give access to this company or operation. | Error |
429 | The request was refused. The code is rate_limited. | Error |
503 | The request was refused. The code is unavailable. | Error |
Request
curl
curl "$RDC_BASE_URL/warehouse/v1/locations?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/locations?limit=20`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/locations?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/locations?limit=20');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/locations?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 200
{
"items": [
{
"code": "A-01-02",
"zone": "pick",
"storage": true
},
{
"code": "C-01-01",
"zone": "cold",
"storage": true
}
],
"nextCursor": null
} List stock
GET /warehouse/v1/stock
Returns the stock by location, item and lot, in pages. A row that was emptied stays at zero.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
locationCode | query | string | Nooptional | Only the stock of this location. |
sku | query | string | Nooptional | Only this item. |
limit | query | integer | Nooptional | Records per page. Default 100 Range 1 – 500 |
cursor | query | string | Nooptional | The nextCursor of the previous page. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | A page of records. | StockPage |
400 | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. fields names each one. | Error |
401 | The token is missing, not valid or has ended. | Error |
403 | The token does not give access to this company or operation. | Error |
429 | The request was refused. The code is rate_limited. | Error |
503 | The request was refused. The code is unavailable. | Error |
Request
curl
curl "$RDC_BASE_URL/warehouse/v1/stock?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/stock?limit=20`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/stock?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/stock?limit=20');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/stock?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 200
{
"items": [
{
"locationCode": "A-01-02",
"sku": "FA-0010",
"lot": "L26-0988",
"expiry": "2027-03-15",
"quantity": "6"
},
{
"locationCode": "R-01-01",
"sku": "FA-0010",
"lot": "L26-1041",
"expiry": "2027-05-20",
"quantity": "120"
}
],
"nextCursor": null
}