Receipts
Record goods that arrived against a purchase order.
On this page
List receipts
GET /erp/v1/receipts
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
purchaseOrderId | query | string (uuid) | Nooptional | Only the receipts of this purchase order. |
limit | query | integer | Nooptional | Records per page, from 1 to 500. Default 100 Range 1 – 500 |
cursor | query | string | Nooptional | The nextCursor of the previous page. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | A page of receipts. | ReceiptPage |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | The service cannot answer now. | Error |
Request
curl
curl "$RDC_BASE_URL/erp/v1/receipts?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/erp/v1/receipts?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"]}/erp/v1/receipts?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/erp/v1/receipts?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")}/erp/v1/receipts?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": "d91237a7-26f6-405f-a2cc-c0df90ea13c7",
"number": "RE-0458",
"purchaseOrderId": "f5085807-5ee6-47b4-92e1-6144464b73ed",
"purchaseOrderNumber": "CA-0730",
"date": "2026-11-16",
"warehouseId": "418d35c2-d9c8-4021-917a-04c8ebe593a7",
"lines": [
{
"code": "CT-0610",
"quantity": "60"
}
]
},
{
"id": "d7123481-24e3-4135-8ad2-90f77b36a0a1",
"number": "RE-0456",
"purchaseOrderId": "403660ee-f721-4e98-b224-59e59e245387",
"purchaseOrderNumber": "CA-0729",
"date": "2026-11-13",
"warehouseId": "418d35c2-d9c8-4021-917a-04c8ebe593a7",
"lines": [
{
"code": "LA-0307",
"quantity": "90"
}
]
}
],
"nextCursor": null
} Create a receipt
POST /erp/v1/receipts
Records goods that arrived. The quantities go into stock at once and reduce what the order still waits for; a receipt cannot take more than the open quantity of a line.
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
purchaseOrderId | string (uuid) | Yesrequired | The purchase order the goods came on. |
warehouseId | string (uuid) | Nooptional | The warehouse the goods go into. Leave it out when the company has one warehouse. |
lines | OrderLineInput[] | Yesrequired | What arrived: an item once each. |
lines[].code | string | Yesrequired | Code of the item. |
lines[].quantity | string | Yesrequired | Whole units, at least 1. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | purchase_order_not_found: The purchase order does not exist. warehouse_not_found: The warehouse does not exist. | Error |
409 | operation_reused: The operationId was used before with a different request. over_receipt: A quantity is more than the purchase order still waits for. | Error |
422 | no_lines: The document has no line. duplicate_item: An item appears on more than one line. invalid_quantity: A quantity is not a whole number from 1 to 1000000. item_not_on_order: The item is not on the purchase order. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | The service cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/erp/v1/receipts" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "59655cae-f4d3-4844-99eb-50f999e798aa",
"purchaseOrderId": "fb086179-5513-43e2-a802-1a277c3b0d01",
"warehouseId": "418d35c2-d9c8-4021-917a-04c8ebe593a7",
"lines": [
{
"code": "FA-0010",
"quantity": "4"
}
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/erp/v1/receipts`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "59655cae-f4d3-4844-99eb-50f999e798aa",
"purchaseOrderId": "fb086179-5513-43e2-a802-1a277c3b0d01",
"warehouseId": "418d35c2-d9c8-4021-917a-04c8ebe593a7",
"lines": [
{
"code": "FA-0010",
"quantity": "4"
}
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/erp/v1/receipts',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '59655cae-f4d3-4844-99eb-50f999e798aa',
'purchaseOrderId': 'fb086179-5513-43e2-a802-1a277c3b0d01',
'warehouseId': '418d35c2-d9c8-4021-917a-04c8ebe593a7',
'lines': [
{
'code': 'FA-0010',
'quantity': '4',
},
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "59655cae-f4d3-4844-99eb-50f999e798aa",
"purchaseOrderId": "fb086179-5513-43e2-a802-1a277c3b0d01",
"warehouseId": "418d35c2-d9c8-4021-917a-04c8ebe593a7",
"lines": [
{
"code": "FA-0010",
"quantity": "4"
}
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/erp/v1/receipts');
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")}/erp/v1/receipts");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "59655cae-f4d3-4844-99eb-50f999e798aa",
"purchaseOrderId": "fb086179-5513-43e2-a802-1a277c3b0d01",
"warehouseId": "418d35c2-d9c8-4021-917a-04c8ebe593a7",
"lines": [
{
"code": "FA-0010",
"quantity": "4"
}
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "59655cae-f4d3-4844-99eb-50f999e798aa",
"status": "accepted",
"aggregateId": "da12393a-27f3-47f4-adc2-e29c9c937f5a",
"aggregateRevision": 1
} Get a receipt
GET /erp/v1/receipts/{receiptId}
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
receiptId | path | string (uuid) | Yesrequired | The receipt. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | The receipt. | Receipt |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The receipt does not exist. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | The service cannot answer now. | Error |
Request
curl
curl "$RDC_BASE_URL/erp/v1/receipts/d7123481-24e3-4135-8ad2-90f77b36a0a1" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/erp/v1/receipts/d7123481-24e3-4135-8ad2-90f77b36a0a1`, {
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"]}/erp/v1/receipts/d7123481-24e3-4135-8ad2-90f77b36a0a1',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/erp/v1/receipts/d7123481-24e3-4135-8ad2-90f77b36a0a1');
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")}/erp/v1/receipts/d7123481-24e3-4135-8ad2-90f77b36a0a1");
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": "d7123481-24e3-4135-8ad2-90f77b36a0a1",
"number": "RE-0456",
"purchaseOrderId": "403660ee-f721-4e98-b224-59e59e245387",
"purchaseOrderNumber": "CA-0729",
"date": "2026-11-13",
"warehouseId": "418d35c2-d9c8-4021-917a-04c8ebe593a7",
"lines": [
{
"code": "LA-0307",
"quantity": "90"
}
]
}