Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Orders

    The sale at the counter: the order of a till, its lines, its customer, and holding, resuming and voiding it.

    On this page

    List orders

    GET /pos/v1/orders

    Returns the orders in pages, newest first. Each order carries its lines, its totals with the VAT of each rate, its payments and its refunds.

    Parameters

    NameInTypeRequiredMeaning
    tillId query string (uuid) Nooptional Only orders of this till.
    businessDayId query string (uuid) Nooptional Only orders of this business day.
    status query string Nooptional Only orders in this status. One of open, on_hold, awaiting_payment, partially_paid, paid, refunded, voided
    sync query string Nooptional Only orders in this sync state: queued finds the sales a till stored while it had no network. One of posted, queued
    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

    StatusMeaningBody
    200 A page of orders. OrderPage
    401 The token is missing, not valid or has ended. Error
    403 The token does not give access to this data. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl "$RDC_BASE_URL/pos/v1/orders?limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/orders?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"]}/pos/v1/orders?limit=20',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/orders?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")}/pos/v1/orders?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

    JSON

    {
      "items": [
        {
          "id": "2f3dc72e-67d0-42c7-9d92-98e4dac497d0",
          "number": "Bon 1041",
          "tillId": "e57a3b65-d690-4e6c-8a6b-8f946c4e6610",
          "businessDayId": "aaed5ba1-2a19-4c94-ac7f-119c9288a12c",
          "cashier": "Cristina Lungu",
          "customerId": null,
          "createdAt": "2026-11-23T07:05:00Z",
          "status": "paid",
          "lines": [
            {
              "sku": "FA-0001",
              "name": "White flour, 1 kg",
              "quantity": "2",
              "unitPrice": "4.60",
              "discountPercent": 0,
              "discount": "0.00",
              "total": "9.20"
            },
            {
              "sku": "OR-0201",
              "name": "Rice, 1 kg",
              "quantity": "1",
              "unitPrice": "5.90",
              "discountPercent": 0,
              "discount": "0.00",
              "total": "5.90"
            }
          ],
          "subtotal": "15.10",
          "discount": "0.00",
          "total": "15.10",
          "vatBreakdown": [
            {
              "rate": "11",
              "total": "15.10",
              "vat": "1.50",
              "base": "13.60"
            }
          ],
          "vat": "1.50",
          "currency": "RON",
          "paid": "15.10",
          "due": "0.00",
          "refunded": "0.00",
          "payments": [
            {
              "id": "f099a81c-de0a-42a2-8deb-538b33cd414b",
              "orderId": "2f3dc72e-67d0-42c7-9d92-98e4dac497d0",
              "method": "cash",
              "status": "approved",
              "amount": "15.10",
              "given": "30.00",
              "change": "14.90",
              "card": null,
              "at": "2026-11-23T07:06:50Z"
            }
          ],
          "refunds": [],
          "sync": "posted",
          "revision": 3
        },
        {
          "id": "0b39c62b-20fe-4403-9406-806a653e8b61",
          "number": "Bon 1038",
          "tillId": "e57a3b65-d690-4e6c-8a6b-8f946c4e6610",
          "businessDayId": "aaed5ba1-2a19-4c94-ac7f-119c9288a12c",
          "cashier": "Cristina Lungu",
          "customerId": null,
          "createdAt": "2026-11-23T06:41:00Z",
          "status": "voided",
          "lines": [
            {
              "sku": "BA-0101",
              "name": "Batteries AA, 4 pcs",
              "quantity": "1",
              "unitPrice": "15.90",
              "discountPercent": 0,
              "discount": "0.00",
              "total": "15.90"
            }
          ],
          "subtotal": "15.90",
          "discount": "0.00",
          "total": "15.90",
          "vatBreakdown": [
            {
              "rate": "21",
              "total": "15.90",
              "vat": "2.76",
              "base": "13.14"
            }
          ],
          "vat": "2.76",
          "currency": "RON",
          "paid": "0.00",
          "due": "0.00",
          "refunded": "0.00",
          "payments": [
            {
              "id": "5853e8bb-a7bc-4d0c-82bc-ff88a9003d95",
              "orderId": "0b39c62b-20fe-4403-9406-806a653e8b61",
              "method": "card",
              "status": "declined",
              "amount": "15.90",
              "given": null,
              "change": null,
              "card": {
                "brand": "mastercard",
                "last4": "9204",
                "entry": "contactless",
                "authCode": null,
                "declineReason": "insufficient_funds"
              },
              "at": "2026-11-23T06:42:15Z"
            }
          ],
          "refunds": [],
          "sync": null,
          "revision": 4
        }
      ],
      "nextCursor": null
    }

    Get an order

    GET /pos/v1/orders/{orderId}

    Parameters

    NameInTypeRequiredMeaning
    orderId path string (uuid) Yesrequired The order.

    Responses

    StatusMeaningBody
    200 The order at its current revision. Order
    401 The token is missing, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The order does not exist in your account. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl "$RDC_BASE_URL/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62`, {
      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"]}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62');
    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")}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    JSON

    {
      "id": "9d8c072d-afa0-4272-97ab-4443d54d5b62",
      "number": "Bon 1042",
      "tillId": "e57a3b65-d690-4e6c-8a6b-8f946c4e6610",
      "businessDayId": "aaed5ba1-2a19-4c94-ac7f-119c9288a12c",
      "cashier": "Cristina Lungu",
      "customerId": null,
      "createdAt": "2026-11-23T07:08:00Z",
      "status": "open",
      "lines": [
        {
          "sku": "PA-0101",
          "name": "White bread, 500 g",
          "quantity": "2",
          "unitPrice": "4.80",
          "discountPercent": 0,
          "discount": "0.00",
          "total": "9.60"
        },
        {
          "sku": "UL-0101",
          "name": "Sunflower oil, 1 l",
          "quantity": "2",
          "unitPrice": "9.80",
          "discountPercent": 0,
          "discount": "0.00",
          "total": "19.60"
        },
        {
          "sku": "LA-0307",
          "name": "Cheese, 400 g",
          "quantity": "1",
          "unitPrice": "21.50",
          "discountPercent": 0,
          "discount": "0.00",
          "total": "21.50"
        },
        {
          "sku": "DT-0101",
          "name": "Dishwashing liquid, 1 l",
          "quantity": "1",
          "unitPrice": "12.50",
          "discountPercent": 10,
          "discount": "1.25",
          "total": "11.25"
        }
      ],
      "subtotal": "63.20",
      "discount": "1.25",
      "total": "61.95",
      "vatBreakdown": [
        {
          "rate": "21",
          "total": "11.25",
          "vat": "1.95",
          "base": "9.30"
        },
        {
          "rate": "11",
          "total": "50.70",
          "vat": "5.02",
          "base": "45.68"
        }
      ],
      "vat": "6.97",
      "currency": "RON",
      "paid": "0.00",
      "due": "61.95",
      "refunded": "0.00",
      "payments": [],
      "refunds": [],
      "sync": null,
      "revision": 5
    }

    Set the customer of an order

    PATCH /pos/v1/orders/{orderId}

    Attaches a customer to an order that is still open, or removes it with null. The customer travels with the order in its events.

    Parameters

    NameInTypeRequiredMeaning
    orderId path string (uuid) Yesrequired The order.

    Request body

    FieldTypeRequiredMeaning
    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 order you read.
    customerId string (uuid) Yesrequired The customer, or null to remove it.

    Responses

    StatusMeaningBody
    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, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The order does not exist in your account. Error
    409 operation_reused: The operationId was already used with a different request. revision_conflict: The record changed since the revision you sent. Nothing was applied. Error
    422 invalid_status: The order is not in a status that allows this. day_closed: The business day of the till is closed. Nothing was changed. unknown_customer: No customer has this id. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl -X PATCH "$RDC_BASE_URL/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "b7524930-fd30-4f83-a52b-35e949eff03b",
      "expectedRevision": 5,
      "customerId": "bc49ac2e-8df5-4c19-8a06-d14e714cb74a"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62`, {
      method: 'PATCH',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "b7524930-fd30-4f83-a52b-35e949eff03b",
        "expectedRevision": 5,
        "customerId": "bc49ac2e-8df5-4c19-8a06-d14e714cb74a"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'PATCH',
        f'{os.environ["RDC_BASE_URL"]}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'b7524930-fd30-4f83-a52b-35e949eff03b',
            'expectedRevision': 5,
            'customerId': 'bc49ac2e-8df5-4c19-8a06-d14e714cb74a',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "b7524930-fd30-4f83-a52b-35e949eff03b",
      "expectedRevision": 5,
      "customerId": "bc49ac2e-8df5-4c19-8a06-d14e714cb74a"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'PATCH',
        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.Patch, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "b7524930-fd30-4f83-a52b-35e949eff03b",
      "expectedRevision": 5,
      "customerId": "bc49ac2e-8df5-4c19-8a06-d14e714cb74a"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "b7524930-fd30-4f83-a52b-35e949eff03b",
      "status": "accepted",
      "aggregateId": "9d8c072d-afa0-4272-97ab-4443d54d5b62",
      "aggregateRevision": 6
    }

    Add a line

    POST /pos/v1/orders/{orderId}/lines

    Adds units of an item to an open order, by sku or by barcode. Units of an item already on the order are added to its line. The units must be on the shelf.

    Parameters

    NameInTypeRequiredMeaning
    orderId path string (uuid) Yesrequired The order.

    Request body

    FieldTypeRequiredMeaning
    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 order you read.
    sku string Nooptional The code of the item. Send sku or barcode.
    barcode string Nooptional The barcode of the item. Send sku or barcode.
    quantity string Yesrequired Units to add, a whole number from 1, as a decimal string.

    Responses

    StatusMeaningBody
    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, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The order does not exist in your account. Error
    409 operation_reused: The operationId was already used with a different request. revision_conflict: The record changed since the revision you sent. Nothing was applied. Error
    422 invalid_status: The order is not in a status that allows this. day_closed: The business day of the till is closed. Nothing was changed. out_of_stock: The shelf does not hold the quantity asked for. The check runs when an item is added and again when payment starts. unknown_item: No item of the catalogue has this sku. unknown_barcode: No item of the catalogue has this barcode. invalid_quantity: A quantity is a whole number from 1. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "fa72d355-ece7-4ef3-877a-21e26eef40b1",
      "expectedRevision": 5,
      "sku": "SA-0101",
      "quantity": "1"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "fa72d355-ece7-4ef3-877a-21e26eef40b1",
        "expectedRevision": 5,
        "sku": "SA-0101",
        "quantity": "1"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'fa72d355-ece7-4ef3-877a-21e26eef40b1',
            'expectedRevision': 5,
            'sku': 'SA-0101',
            'quantity': '1',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "fa72d355-ece7-4ef3-877a-21e26eef40b1",
      "expectedRevision": 5,
      "sku": "SA-0101",
      "quantity": "1"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines');
    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")}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "fa72d355-ece7-4ef3-877a-21e26eef40b1",
      "expectedRevision": 5,
      "sku": "SA-0101",
      "quantity": "1"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "fa72d355-ece7-4ef3-877a-21e26eef40b1",
      "status": "accepted",
      "aggregateId": "9d8c072d-afa0-4272-97ab-4443d54d5b62",
      "aggregateRevision": 6
    }

    Change a line

    PATCH /pos/v1/orders/{orderId}/lines/{sku}

    Sets the quantity of a line, its discount, or both. Each field that changes adds one to the revision of the order. The discount is a whole percentage of the line, up to the limit of the cashier profile.

    Parameters

    NameInTypeRequiredMeaning
    orderId path string (uuid) Yesrequired The order.
    sku path string Yesrequired The sku of a line of the order.

    Request body

    FieldTypeRequiredMeaning
    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 order you read.
    quantity string Nooptional The new quantity, a whole number from 1. Omit it to leave the quantity as it is.
    discountPercent integer Nooptional The new discount, a whole percentage from 0. Omit it to leave the discount as it is. Range 0 – 100

    Responses

    StatusMeaningBody
    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, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The order does not exist in your account. Error
    409 operation_reused: The operationId was already used with a different request. revision_conflict: The record changed since the revision you sent. Nothing was applied. Error
    422 invalid_status: The order is not in a status that allows this. day_closed: The business day of the till is closed. Nothing was changed. out_of_stock: The shelf does not hold the quantity asked for. The check runs when an item is added and again when payment starts. no_such_line: The order has no line with this sku. invalid_quantity: A quantity is a whole number from 1. invalid_discount: A discount is a whole percentage from 0 to 100. discount_limit: The discount is above the limit of the cashier profile. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl -X PATCH "$RDC_BASE_URL/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines/PA-0101" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "f507753f-036c-4437-bc2f-159f880ba272",
      "expectedRevision": 5,
      "quantity": "3",
      "discountPercent": 5
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines/PA-0101`, {
      method: 'PATCH',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "f507753f-036c-4437-bc2f-159f880ba272",
        "expectedRevision": 5,
        "quantity": "3",
        "discountPercent": 5
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'PATCH',
        f'{os.environ["RDC_BASE_URL"]}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines/PA-0101',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'f507753f-036c-4437-bc2f-159f880ba272',
            'expectedRevision': 5,
            'quantity': '3',
            'discountPercent': 5,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "f507753f-036c-4437-bc2f-159f880ba272",
      "expectedRevision": 5,
      "quantity": "3",
      "discountPercent": 5
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines/PA-0101');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'PATCH',
        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.Patch, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines/PA-0101");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "f507753f-036c-4437-bc2f-159f880ba272",
      "expectedRevision": 5,
      "quantity": "3",
      "discountPercent": 5
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "f507753f-036c-4437-bc2f-159f880ba272",
      "status": "accepted",
      "aggregateId": "9d8c072d-afa0-4272-97ab-4443d54d5b62",
      "aggregateRevision": 7
    }

    Remove a line

    POST /pos/v1/orders/{orderId}/lines/{sku}/remove

    Parameters

    NameInTypeRequiredMeaning
    orderId path string (uuid) Yesrequired The order.
    sku path string Yesrequired The sku of a line of the order.

    Request body

    FieldTypeRequiredMeaning
    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 order you read.

    Responses

    StatusMeaningBody
    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, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The order does not exist in your account. Error
    409 operation_reused: The operationId was already used with a different request. revision_conflict: The record changed since the revision you sent. Nothing was applied. Error
    422 invalid_status: The order is not in a status that allows this. day_closed: The business day of the till is closed. Nothing was changed. no_such_line: The order has no line with this sku. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines/DT-0101/remove" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "93c2dda3-9697-43ba-95b4-d41936caa240",
      "expectedRevision": 5
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines/DT-0101/remove`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "93c2dda3-9697-43ba-95b4-d41936caa240",
        "expectedRevision": 5
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines/DT-0101/remove',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '93c2dda3-9697-43ba-95b4-d41936caa240',
            'expectedRevision': 5,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "93c2dda3-9697-43ba-95b4-d41936caa240",
      "expectedRevision": 5
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines/DT-0101/remove');
    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")}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/lines/DT-0101/remove");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "93c2dda3-9697-43ba-95b4-d41936caa240",
      "expectedRevision": 5
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "93c2dda3-9697-43ba-95b4-d41936caa240",
      "status": "accepted",
      "aggregateId": "9d8c072d-afa0-4272-97ab-4443d54d5b62",
      "aggregateRevision": 6
    }

    Put an order on hold

    POST /pos/v1/orders/{orderId}/hold

    Parks an open order with its lines so the till can serve the next customer. The till gets a new empty order. Held orders do not keep their units on the shelf.

    Parameters

    NameInTypeRequiredMeaning
    orderId path string (uuid) Yesrequired The order.

    Request body

    FieldTypeRequiredMeaning
    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 order you read.

    Responses

    StatusMeaningBody
    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, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The order does not exist in your account. Error
    409 operation_reused: The operationId was already used with a different request. revision_conflict: The record changed since the revision you sent. Nothing was applied. Error
    422 invalid_status: The order is not in a status that allows this. day_closed: The business day of the till is closed. Nothing was changed. empty_order: The order has no lines. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/hold" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "0160d947-e58b-4076-8181-65b4675524a8",
      "expectedRevision": 5
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/hold`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "0160d947-e58b-4076-8181-65b4675524a8",
        "expectedRevision": 5
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/hold',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '0160d947-e58b-4076-8181-65b4675524a8',
            'expectedRevision': 5,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "0160d947-e58b-4076-8181-65b4675524a8",
      "expectedRevision": 5
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/hold');
    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")}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/hold");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "0160d947-e58b-4076-8181-65b4675524a8",
      "expectedRevision": 5
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "0160d947-e58b-4076-8181-65b4675524a8",
      "status": "accepted",
      "aggregateId": "9d8c072d-afa0-4272-97ab-4443d54d5b62",
      "aggregateRevision": 6
    }

    Resume a held order

    POST /pos/v1/orders/{orderId}/resume

    Makes a held order the current order of its till. The current order must be empty.

    Parameters

    NameInTypeRequiredMeaning
    orderId path string (uuid) Yesrequired The order.

    Request body

    FieldTypeRequiredMeaning
    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 order you read.

    Responses

    StatusMeaningBody
    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, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The order does not exist in your account. Error
    409 operation_reused: The operationId was already used with a different request. revision_conflict: The record changed since the revision you sent. Nothing was applied. Error
    422 invalid_status: The order is not in a status that allows this. sale_in_progress: The till has a sale in progress. A held order resumes only on a till whose current order is empty. day_closed: The business day of the till is closed. Nothing was changed. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/resume" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "80876168-0f55-4c74-af06-910d6e6ba062",
      "expectedRevision": 6
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/resume`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "80876168-0f55-4c74-af06-910d6e6ba062",
        "expectedRevision": 6
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/resume',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '80876168-0f55-4c74-af06-910d6e6ba062',
            'expectedRevision': 6,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "80876168-0f55-4c74-af06-910d6e6ba062",
      "expectedRevision": 6
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/resume');
    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")}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/resume");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "80876168-0f55-4c74-af06-910d6e6ba062",
      "expectedRevision": 6
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "80876168-0f55-4c74-af06-910d6e6ba062",
      "status": "accepted",
      "aggregateId": "9d8c072d-afa0-4272-97ab-4443d54d5b62",
      "aggregateRevision": 7
    }

    Void an order

    POST /pos/v1/orders/{orderId}/void

    Ends an order that has no payment: open, on hold or awaiting payment. An order with a payment is refunded, never voided.

    Parameters

    NameInTypeRequiredMeaning
    orderId path string (uuid) Yesrequired The order.

    Request body

    FieldTypeRequiredMeaning
    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 order you read.

    Responses

    StatusMeaningBody
    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, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The order does not exist in your account. Error
    409 operation_reused: The operationId was already used with a different request. revision_conflict: The record changed since the revision you sent. Nothing was applied. Error
    422 invalid_status: The order is not in a status that allows this. order_paid: A paid order cannot be voided. payments_taken: A payment has been taken on the order, so it cannot be voided. reader_busy: The card reader of the till is working on a payment. day_closed: The business day of the till is closed. Nothing was changed. empty_order: The order has no lines. Error
    429 Too many requests. The request was not processed. Retry-After gives the seconds to wait. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/void" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "544c56ff-8ff1-4a1a-a5ae-3809d22c0931",
      "expectedRevision": 5
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/void`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "544c56ff-8ff1-4a1a-a5ae-3809d22c0931",
        "expectedRevision": 5
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/void',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '544c56ff-8ff1-4a1a-a5ae-3809d22c0931',
            'expectedRevision': 5,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "544c56ff-8ff1-4a1a-a5ae-3809d22c0931",
      "expectedRevision": 5
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/void');
    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")}/pos/v1/orders/9d8c072d-afa0-4272-97ab-4443d54d5b62/void");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "544c56ff-8ff1-4a1a-a5ae-3809d22c0931",
      "expectedRevision": 5
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "544c56ff-8ff1-4a1a-a5ae-3809d22c0931",
      "status": "accepted",
      "aggregateId": "9d8c072d-afa0-4272-97ab-4443d54d5b62",
      "aggregateRevision": 6
    }