Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Authentication

    Get client credentials, request a token and call the POS API with it.

    On this page

    Client credentials, your base address and a test company are issued with your account. Accounts are opened by our team: ask for one through the contact form and we set it up with you.

    Request an account

    Request a token

    The API uses OAuth 2.0 with the client credentials flow. Your client asks the sign-in service for a token with the scope pos.access and sends it as a bearer token on every request.

    Token request

    curl -X POST "$RDC_TOKEN_URL" \
      -d "grant_type=client_credentials" \
      -d "client_id=$RDC_CLIENT_ID" \
      -d "client_secret=$RDC_CLIENT_SECRET" \
      -d "scope=pos.access"

    The answer carries these fields.

    FieldMeaning
    access_tokenThe token. Send it as Authorization: Bearer $RDC_TOKEN.
    token_typeAlways Bearer.
    expires_inSeconds until the token ends. Reuse the token until then and ask for a new one before it ends. Never ask for a token per request.

    Call the API

    Every request carries the token. The sample lists records and shows the header in each language.

    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

    {
      "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
    }

    Refused requests

    StatusCodeCauseWhat to do
    401unauthorizedNo token, or a token that is not valid or has ended.Ask for a new token, then repeat the request.
    403forbiddenA valid token without the scope pos.access, or a request for data outside your account.Do not repeat it. Check the scope and the company.

    Build against the test company first. Read Sandbox and live.

    The full rule: Developer guide