Counts
Ask for a count of a shelf, enter what was counted, and approve the adjustment.
On this page
List counts
GET /warehouse/v1/counts
Returns counts in pages, by number.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
status | query | string | Nooptional | Only counts in this status. One of to-count, counted, approved |
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. | CountPage |
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/counts?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/counts?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/counts?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/counts?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/counts?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": [
{
"id": "a3000000-0000-4000-8000-000000000001",
"number": "CT-0001",
"locationCode": "R-01-01",
"sku": "FA-0010",
"lot": "L26-1041",
"status": "counted",
"reason": "routine",
"requestedBy": "mihai-stan",
"system": "120",
"counted": "118",
"difference": "-2",
"countedBy": "dan-ilie",
"approvedBy": null,
"revision": 2
},
{
"id": "a3000000-0000-4000-8000-000000000002",
"number": "CT-0002",
"locationCode": "C-01-01",
"sku": "LA-0307",
"lot": "L26-1109",
"status": "to-count",
"reason": "short-pick",
"requestedBy": "mihai-stan",
"system": null,
"counted": null,
"difference": null,
"countedBy": null,
"approvedBy": null,
"revision": 1
}
],
"nextCursor": null
} Ask for a count
POST /warehouse/v1/counts
Asks for a count of the stock of an item and lot on a shelf. One count of a shelf is open at a time.
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
locationCode | string | Yesrequired | The shelf to count. |
sku | string | Yesrequired | The item to count. |
lot | string | Nooptional | The lot to count, null or absent for an item with no date. |
by | string | Yesrequired | Identifier of the person who asks. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result. | OperationResult |
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 |
404 | The request was refused. The code is location_not_found, stock_not_found or worker_not_found. | Error |
409 | The request was refused. The code is operation_reused. | Error |
422 | The request was refused. The code is location_not_storage or count_requested. | 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 -X POST "$RDC_BASE_URL/warehouse/v1/counts" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "a23f419f-8068-42c1-85a8-f24186ea4ed1",
"locationCode": "A-02-01",
"sku": "ZA-0201",
"lot": "L26-0870",
"by": "mihai-stan"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/counts`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "a23f419f-8068-42c1-85a8-f24186ea4ed1",
"locationCode": "A-02-01",
"sku": "ZA-0201",
"lot": "L26-0870",
"by": "mihai-stan"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/counts',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'a23f419f-8068-42c1-85a8-f24186ea4ed1',
'locationCode': 'A-02-01',
'sku': 'ZA-0201',
'lot': 'L26-0870',
'by': 'mihai-stan',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "a23f419f-8068-42c1-85a8-f24186ea4ed1",
"locationCode": "A-02-01",
"sku": "ZA-0201",
"lot": "L26-0870",
"by": "mihai-stan"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/counts');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/counts");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "a23f419f-8068-42c1-85a8-f24186ea4ed1",
"locationCode": "A-02-01",
"sku": "ZA-0201",
"lot": "L26-0870",
"by": "mihai-stan"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "a23f419f-8068-42c1-85a8-f24186ea4ed1",
"status": "accepted",
"aggregateRevision": 1
} Get a count
GET /warehouse/v1/counts/{countId}
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
countId | path | string (uuid) | Yesrequired | The count. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | The record at its current revision. | Count |
401 | The token is missing, not valid or has ended. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The request was refused. The code is count_not_found. | 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/counts/a3000000-0000-4000-8000-000000000001" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001`, {
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/counts/a3000000-0000-4000-8000-000000000001',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001');
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/counts/a3000000-0000-4000-8000-000000000001");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 200
{
"id": "a3000000-0000-4000-8000-000000000001",
"number": "CT-0001",
"locationCode": "R-01-01",
"sku": "FA-0010",
"lot": "L26-1041",
"status": "counted",
"reason": "routine",
"requestedBy": "mihai-stan",
"system": "120",
"counted": "118",
"difference": "-2",
"countedBy": "dan-ilie",
"approvedBy": null,
"revision": 2
} Enter the count
POST /warehouse/v1/counts/{countId}/count
Enters what was counted. The stock the system holds at that moment is kept with it, and the difference is the counted quantity minus that stock. A shelf where a picker is scanning cannot be counted.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
countId | path | string (uuid) | Yesrequired | The count. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the count you read. |
quantity | string | Yesrequired | Units counted on the shelf, 0 or more. |
by | string | Yesrequired | Identifier of the person who counted. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result. | OperationResult |
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 |
404 | The request was refused. The code is count_not_found or worker_not_found. | Error |
409 | The request was refused. The code is revision_conflict or operation_reused. | Error |
422 | The request was refused. The code is count_not_open, count_not_valid or location_busy. | 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 -X POST "$RDC_BASE_URL/warehouse/v1/counts/a3000000-0000-4000-8000-000000000002/count" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "f68c9ace-1e54-4920-8b06-bef2039d1b20",
"expectedRevision": 1,
"quantity": "27",
"by": "dan-ilie"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000002/count`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "f68c9ace-1e54-4920-8b06-bef2039d1b20",
"expectedRevision": 1,
"quantity": "27",
"by": "dan-ilie"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000002/count',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'f68c9ace-1e54-4920-8b06-bef2039d1b20',
'expectedRevision': 1,
'quantity': '27',
'by': 'dan-ilie',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "f68c9ace-1e54-4920-8b06-bef2039d1b20",
"expectedRevision": 1,
"quantity": "27",
"by": "dan-ilie"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/counts/a3000000-0000-4000-8000-000000000002/count');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000002/count");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "f68c9ace-1e54-4920-8b06-bef2039d1b20",
"expectedRevision": 1,
"quantity": "27",
"by": "dan-ilie"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "f68c9ace-1e54-4920-8b06-bef2039d1b20",
"status": "accepted",
"aggregateRevision": 2
} Count again
POST /warehouse/v1/counts/{countId}/recount
Sends a counted shelf back to be counted again.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
countId | path | string (uuid) | Yesrequired | The count. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the count you read. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result. | OperationResult |
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 |
404 | The request was refused. The code is count_not_found. | Error |
409 | The request was refused. The code is revision_conflict or operation_reused. | Error |
422 | The request was refused. The code is count_not_counted. | 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 -X POST "$RDC_BASE_URL/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/recount" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "09f87735-539b-486b-8516-6f6b8d4b8f1b",
"expectedRevision": 2
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/recount`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "09f87735-539b-486b-8516-6f6b8d4b8f1b",
"expectedRevision": 2
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/recount',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '09f87735-539b-486b-8516-6f6b8d4b8f1b',
'expectedRevision': 2,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "09f87735-539b-486b-8516-6f6b8d4b8f1b",
"expectedRevision": 2
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/recount');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/recount");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "09f87735-539b-486b-8516-6f6b8d4b8f1b",
"expectedRevision": 2
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "09f87735-539b-486b-8516-6f6b8d4b8f1b",
"status": "accepted",
"aggregateRevision": 3
} Approve a count
POST /warehouse/v1/counts/{countId}/approve
Approves a count and adjusts the stock by its difference. Only the warehouse lead approves, never a count the lead entered, and never when the stock moved after the count.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
countId | path | string (uuid) | Yesrequired | The count. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the count you read. |
by | string | Yesrequired | Identifier of the person who approves. It has to be the warehouse lead, and not the person who counted. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result. | OperationResult |
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 |
404 | The request was refused. The code is count_not_found. | Error |
409 | The request was refused. The code is revision_conflict or operation_reused. | Error |
422 | The request was refused. The code is count_not_counted, approver_required, own_count or stock_changed. | 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 -X POST "$RDC_BASE_URL/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/approve" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "4fbe134b-31a3-4323-8804-56154bd99553",
"expectedRevision": 2,
"by": "mihai-stan"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/approve`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "4fbe134b-31a3-4323-8804-56154bd99553",
"expectedRevision": 2,
"by": "mihai-stan"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/approve',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '4fbe134b-31a3-4323-8804-56154bd99553',
'expectedRevision': 2,
'by': 'mihai-stan',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "4fbe134b-31a3-4323-8804-56154bd99553",
"expectedRevision": 2,
"by": "mihai-stan"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/approve');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/approve");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "4fbe134b-31a3-4323-8804-56154bd99553",
"expectedRevision": 2,
"by": "mihai-stan"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "4fbe134b-31a3-4323-8804-56154bd99553",
"status": "accepted",
"aggregateRevision": 3
}