Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Receive a delivery

    Announce a delivery, record its arrival, count each line with its lot and expiry, flag what is missing or damaged, and close it.

    On this page

    A delivery moves from scheduled to arrived, receiving, put-away and closed. Every call below changes one delivery and sends the revision that was read as expectedRevision. The statuses are in Statuses.

    Announce it

    Send the lines your purchase order has. kind is supplier for goods you bought and return for goods a customer sends back.

    curl

    curl -X POST "$RDC_BASE_URL/warehouse/v1/inbound-deliveries" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "bb6a1b3c-6b4d-48e6-81d9-4c442021d746",
      "kind": "supplier",
      "supplier": "Moara Vadului SRL",
      "reference": "CA-2026-0320",
      "expectedAt": "2026-11-24T06:00:00Z",
      "lines": [
        {
          "sku": "FA-0010",
          "expected": "80"
        },
        {
          "sku": "ZA-0201",
          "expected": "120"
        }
      ]
    }'

    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": "bb6a1b3c-6b4d-48e6-81d9-4c442021d746",
        "kind": "supplier",
        "supplier": "Moara Vadului SRL",
        "reference": "CA-2026-0320",
        "expectedAt": "2026-11-24T06:00:00Z",
        "lines": [
          {
            "sku": "FA-0010",
            "expected": "80"
          },
          {
            "sku": "ZA-0201",
            "expected": "120"
          }
        ]
      }),
    });
    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': 'bb6a1b3c-6b4d-48e6-81d9-4c442021d746',
            'kind': 'supplier',
            'supplier': 'Moara Vadului SRL',
            'reference': 'CA-2026-0320',
            'expectedAt': '2026-11-24T06:00:00Z',
            'lines': [
                {
                    'sku': 'FA-0010',
                    'expected': '80',
                },
                {
                    'sku': 'ZA-0201',
                    'expected': '120',
                },
            ],
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "bb6a1b3c-6b4d-48e6-81d9-4c442021d746",
      "kind": "supplier",
      "supplier": "Moara Vadului SRL",
      "reference": "CA-2026-0320",
      "expectedAt": "2026-11-24T06:00:00Z",
      "lines": [
        {
          "sku": "FA-0010",
          "expected": "80"
        },
        {
          "sku": "ZA-0201",
          "expected": "120"
        }
      ]
    }
    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": "bb6a1b3c-6b4d-48e6-81d9-4c442021d746",
      "kind": "supplier",
      "supplier": "Moara Vadului SRL",
      "reference": "CA-2026-0320",
      "expectedAt": "2026-11-24T06:00:00Z",
      "lines": [
        {
          "sku": "FA-0010",
          "expected": "80"
        },
        {
          "sku": "ZA-0201",
          "expected": "120"
        }
      ]
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "bb6a1b3c-6b4d-48e6-81d9-4c442021d746",
      "status": "accepted",
      "aggregateRevision": 1
    }

    Record the arrival

    Name the dock the truck stands at. A dock holds one delivery at a time; a second delivery at the same dock is refused with dock_busy until the first is closed.

    curl

    curl -X POST "$RDC_BASE_URL/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000409/arrive" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "ccf715e9-baee-4005-81eb-a73769ce0055",
      "expectedRevision": 1,
      "dock": "DOCK-2"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000409/arrive`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "ccf715e9-baee-4005-81eb-a73769ce0055",
        "expectedRevision": 1,
        "dock": "DOCK-2"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000409/arrive',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'ccf715e9-baee-4005-81eb-a73769ce0055',
            'expectedRevision': 1,
            'dock': 'DOCK-2',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "ccf715e9-baee-4005-81eb-a73769ce0055",
      "expectedRevision": 1,
      "dock": "DOCK-2"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000409/arrive');
    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/a2000000-0000-4000-8000-000000000409/arrive");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "ccf715e9-baee-4005-81eb-a73769ce0055",
      "expectedRevision": 1,
      "dock": "DOCK-2"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "ccf715e9-baee-4005-81eb-a73769ce0055",
      "status": "accepted",
      "aggregateRevision": 2
    }

    Count a line

    Send the good units and the damaged units of the line. The good units enter the stock at the dock. The damaged ones never do. Together they cannot exceed what was expected: more is refused with quantity_over_expected, and the surplus is flagged instead. An item with a date needs its lot and expiry.

    curl

    curl -X POST "$RDC_BASE_URL/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/receive" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "5940993b-2e4d-45e3-8ed2-8e251326f413",
      "expectedRevision": 2,
      "sku": "FA-0010",
      "received": "100",
      "damaged": "4",
      "lot": "L26-1160",
      "expiry": "2027-06-30",
      "by": "dan-ilie"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/receive`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "5940993b-2e4d-45e3-8ed2-8e251326f413",
        "expectedRevision": 2,
        "sku": "FA-0010",
        "received": "100",
        "damaged": "4",
        "lot": "L26-1160",
        "expiry": "2027-06-30",
        "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/inbound-deliveries/a2000000-0000-4000-8000-000000000407/receive',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '5940993b-2e4d-45e3-8ed2-8e251326f413',
            'expectedRevision': 2,
            'sku': 'FA-0010',
            'received': '100',
            'damaged': '4',
            'lot': 'L26-1160',
            'expiry': '2027-06-30',
            'by': 'dan-ilie',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "5940993b-2e4d-45e3-8ed2-8e251326f413",
      "expectedRevision": 2,
      "sku": "FA-0010",
      "received": "100",
      "damaged": "4",
      "lot": "L26-1160",
      "expiry": "2027-06-30",
      "by": "dan-ilie"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/receive');
    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/a2000000-0000-4000-8000-000000000407/receive");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "5940993b-2e4d-45e3-8ed2-8e251326f413",
      "expectedRevision": 2,
      "sku": "FA-0010",
      "received": "100",
      "damaged": "4",
      "lot": "L26-1160",
      "expiry": "2027-06-30",
      "by": "dan-ilie"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "5940993b-2e4d-45e3-8ed2-8e251326f413",
      "status": "accepted",
      "aggregateRevision": 3
    }

    Flag what is missing or damaged

    A gap against what was expected, and the damaged units of a line, have to be flagged for the supplier before the delivery can close. Flag the whole gap as short, and all the damaged units as damaged. surplus records units beyond what was expected.

    curl

    curl -X POST "$RDC_BASE_URL/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/differences" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "ee9cef99-87c5-4239-8501-03870420d5c9",
      "expectedRevision": 3,
      "sku": "FA-0010",
      "kind": "short",
      "quantity": "16"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/differences`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "ee9cef99-87c5-4239-8501-03870420d5c9",
        "expectedRevision": 3,
        "sku": "FA-0010",
        "kind": "short",
        "quantity": "16"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/differences',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'ee9cef99-87c5-4239-8501-03870420d5c9',
            'expectedRevision': 3,
            'sku': 'FA-0010',
            'kind': 'short',
            'quantity': '16',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "ee9cef99-87c5-4239-8501-03870420d5c9",
      "expectedRevision": 3,
      "sku": "FA-0010",
      "kind": "short",
      "quantity": "16"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/differences');
    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/a2000000-0000-4000-8000-000000000407/differences");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "ee9cef99-87c5-4239-8501-03870420d5c9",
      "expectedRevision": 3,
      "sku": "FA-0010",
      "kind": "short",
      "quantity": "16"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "ee9cef99-87c5-4239-8501-03870420d5c9",
      "status": "accepted",
      "aggregateRevision": 4
    }

    A flag that does not match the line is refused: no_difference when the quantity is not the gap or the damaged units of the line, difference_flagged when it was flagged already.

    Put away and close

    Put away every line. When every counted unit is on a shelf and every difference is flagged, the status is put-away, and the delivery can close.

    curl

    curl -X POST "$RDC_BASE_URL/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000408/close" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "4f0aaaa6-1816-4cfc-824a-aa1a99806cbc",
      "expectedRevision": 4
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000408/close`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "4f0aaaa6-1816-4cfc-824a-aa1a99806cbc",
        "expectedRevision": 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/a2000000-0000-4000-8000-000000000408/close',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '4f0aaaa6-1816-4cfc-824a-aa1a99806cbc',
            'expectedRevision': 4,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "4f0aaaa6-1816-4cfc-824a-aa1a99806cbc",
      "expectedRevision": 4
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000408/close');
    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/a2000000-0000-4000-8000-000000000408/close");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "4f0aaaa6-1816-4cfc-824a-aa1a99806cbc",
      "expectedRevision": 4
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "4f0aaaa6-1816-4cfc-824a-aa1a99806cbc",
      "status": "accepted",
      "aggregateRevision": 5
    }

    A delivery closed with a difference has the status difference. Closing one that is not ready is refused with not_put_away, or with difference_not_flagged when a gap or damaged units are not flagged.