Returns
Receive goods a customer sends back: announce a return, count it, put the good units away and flag the rest.
A return is an inbound delivery with kind return. It is received, put away and closed the way a delivery from a supplier is: see Receive a delivery. Two things differ. supplier names the customer, and reference names the sales order the goods came from. The receipt is recorded as coming from the customer, not from a supplier.
Announce the return
Send
kindreturn, the customer, the number of the sales order and the units the customer says are coming back.Count it
Count each line when the goods arrive. Units that cannot be sold go in
damaged; they never enter the stock. An item with a date comes back with its lot and expiry, and a lot that has passed its date is refused like any other.Put away what can be sold
Put the good units away to a shelf of the right kind, and flag the damaged units and any gap.
curl
curl -X POST "$RDC_BASE_URL/warehouse/v1/inbound-deliveries" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "18de47ed-5dfd-4951-82ea-b5b33ddb6e61",
"kind": "return",
"supplier": "Hanul Ozana SRL",
"reference": "CV-1031",
"expectedAt": "2026-11-25T08:00:00Z",
"lines": [
{
"sku": "LA-0307",
"expected": "4"
}
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/inbound-deliveries`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "18de47ed-5dfd-4951-82ea-b5b33ddb6e61",
"kind": "return",
"supplier": "Hanul Ozana SRL",
"reference": "CV-1031",
"expectedAt": "2026-11-25T08:00:00Z",
"lines": [
{
"sku": "LA-0307",
"expected": "4"
}
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/inbound-deliveries',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '18de47ed-5dfd-4951-82ea-b5b33ddb6e61',
'kind': 'return',
'supplier': 'Hanul Ozana SRL',
'reference': 'CV-1031',
'expectedAt': '2026-11-25T08:00:00Z',
'lines': [
{
'sku': 'LA-0307',
'expected': '4',
},
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "18de47ed-5dfd-4951-82ea-b5b33ddb6e61",
"kind": "return",
"supplier": "Hanul Ozana SRL",
"reference": "CV-1031",
"expectedAt": "2026-11-25T08:00:00Z",
"lines": [
{
"sku": "LA-0307",
"expected": "4"
}
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/inbound-deliveries');
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/inbound-deliveries");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "18de47ed-5dfd-4951-82ea-b5b33ddb6e61",
"kind": "return",
"supplier": "Hanul Ozana SRL",
"reference": "CV-1031",
"expectedAt": "2026-11-25T08:00:00Z",
"lines": [
{
"sku": "LA-0307",
"expected": "4"
}
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "18de47ed-5dfd-4951-82ea-b5b33ddb6e61",
"status": "accepted",
"aggregateRevision": 1
}