Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Lines

    Add what the scanner read, report the weight of the bagging scale and void a line.

    On this page

    List lines

    GET /selfcheckout/v1/baskets/{basketId}/lines

    Returns the lines of a basket in the order they were scanned, with the ones that were voided.

    Parameters

    NameInTypeRequiredMeaning
    basketId path string (uuid) Yesrequired The basket.
    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 lines. LinePage
    401 The token is missing, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The basket does not exist in your account. Error
    429 Too many requests. The request was not processed. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl "$RDC_BASE_URL/selfcheckout/v1/baskets/c37612e6-3f10-4a7d-b962-2afad36a4ab8/lines?limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/selfcheckout/v1/baskets/c37612e6-3f10-4a7d-b962-2afad36a4ab8/lines?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"]}/selfcheckout/v1/baskets/c37612e6-3f10-4a7d-b962-2afad36a4ab8/lines?limit=20',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/selfcheckout/v1/baskets/c37612e6-3f10-4a7d-b962-2afad36a4ab8/lines?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")}/selfcheckout/v1/baskets/c37612e6-3f10-4a7d-b962-2afad36a4ab8/lines?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": "7befa6fb-9f93-4bda-a605-9779f9d33f2a",
          "code": "20101015",
          "sku": "PN-0101",
          "name": "White bread, 500 g",
          "kind": "packaged",
          "status": "active",
          "grams": 520,
          "unitPrice": "4.90",
          "vatRate": "11",
          "total": "4.90",
          "ageApprovedBy": null
        },
        {
          "id": "57120a70-28dc-4ed0-bc26-64b21accb7b2",
          "code": "101",
          "sku": "MR-0001",
          "name": "Apples, per kg",
          "kind": "produce",
          "status": "active",
          "grams": 720,
          "unitPrice": "6.99",
          "vatRate": "11",
          "total": "5.03",
          "ageApprovedBy": null
        },
        {
          "id": "9cd3606d-0f2c-403e-af96-d862f58c03e0",
          "code": "102",
          "sku": "BN-0002",
          "name": "Bananas, per kg",
          "kind": "produce",
          "status": "active",
          "grams": 540,
          "unitPrice": "7.99",
          "vatRate": "11",
          "total": "4.31",
          "ageApprovedBy": null
        }
      ],
      "nextCursor": null
    }

    Add a line

    POST /selfcheckout/v1/baskets/{basketId}/lines

    Adds the item the scanner read, or the produce code typed or looked up, as a line. The line waits for its weight on the bagging scale (awaiting_weight). An age-restricted item is held (held) and raises an age check.

    Parameters

    NameInTypeRequiredMeaning
    basketId path string (uuid) Yesrequired The basket.

    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 basket you read.
    code string Yesrequired What the scanner read: the eight digits of a packaged item, or the produce code of a weighed item.

    Responses

    StatusMeaningBody
    202 The change was accepted. The body is the operation result: aggregateId is the record that was changed. OperationResult
    400 The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. Error
    401 The token is missing, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 basket_not_found: The basket does not exist in your account. code_not_found: No item of the store has this code. Error
    409 revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. basket_not_open: The basket is not the open basket of its lane: it is paid, voided or released, or it is being paid where the change needs it open. lane_out_of_service: The lane is out of service. weight_pending: The last line is still waiting for its weight on the bagging scale. assistance_pending: The lane is stopped until an attendant decides an intervention. wrong_state: The lane is in a state that does not allow this change. Error
    429 Too many requests. The request was not processed. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/selfcheckout/v1/baskets/094a0e7f-0541-49b0-b063-3fa75d8468a8/lines" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "d1941539-061a-404d-bd69-d2c545eb92f0",
      "expectedRevision": 1,
      "code": "20101015"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/selfcheckout/v1/baskets/094a0e7f-0541-49b0-b063-3fa75d8468a8/lines`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "d1941539-061a-404d-bd69-d2c545eb92f0",
        "expectedRevision": 1,
        "code": "20101015"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/selfcheckout/v1/baskets/094a0e7f-0541-49b0-b063-3fa75d8468a8/lines',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'd1941539-061a-404d-bd69-d2c545eb92f0',
            'expectedRevision': 1,
            'code': '20101015',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "d1941539-061a-404d-bd69-d2c545eb92f0",
      "expectedRevision": 1,
      "code": "20101015"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/selfcheckout/v1/baskets/094a0e7f-0541-49b0-b063-3fa75d8468a8/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")}/selfcheckout/v1/baskets/094a0e7f-0541-49b0-b063-3fa75d8468a8/lines");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "d1941539-061a-404d-bd69-d2c545eb92f0",
      "expectedRevision": 1,
      "code": "20101015"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "d1941539-061a-404d-bd69-d2c545eb92f0",
      "status": "accepted",
      "aggregateId": "094a0e7f-0541-49b0-b063-3fa75d8468a8",
      "aggregateRevision": 2
    }

    Report the weight

    POST /selfcheckout/v1/baskets/{basketId}/weight

    Reports what the bagging scale carries now, in grams. A packaged item counts when the change matches the weight it should have, within its tolerance. A weighed item counts with the weight read. Otherwise the lane stops and an intervention with the reason weight_differs carries the expected and the measured weight.

    Parameters

    NameInTypeRequiredMeaning
    basketId path string (uuid) Yesrequired The basket.

    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 basket you read.
    grams integer Yesrequired What the bagging scale carries now, in grams: the bag and every counted line, and the new item. Range 0 – 100000

    Responses

    StatusMeaningBody
    202 The change was accepted. The body is the operation result: aggregateId is the record that was changed. OperationResult
    400 The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. Error
    401 The token is missing, not valid or has ended. Error
    403 The token does not give access to this data. Error
    404 The basket does not exist in your account. Error
    409 revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. basket_not_open: The basket is not the open basket of its lane: it is paid, voided or released, or it is being paid where the change needs it open. lane_out_of_service: The lane is out of service. assistance_pending: The lane is stopped until an attendant decides an intervention. weight_pending: The last line is still waiting for its weight on the bagging scale. no_weight_expected: No line is waiting for a weight. wrong_state: The lane is in a state that does not allow this change. Error
    422 The weight is not a whole number of grams, or an own bag is lighter or heavier than the scale accepts. Error
    429 Too many requests. The request was not processed. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/selfcheckout/v1/baskets/094a0e7f-0541-49b0-b063-3fa75d8468a8/weight" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "42fe2ea0-c3f6-4500-9ac8-79c51d303864",
      "expectedRevision": 2,
      "grams": 526
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/selfcheckout/v1/baskets/094a0e7f-0541-49b0-b063-3fa75d8468a8/weight`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "42fe2ea0-c3f6-4500-9ac8-79c51d303864",
        "expectedRevision": 2,
        "grams": 526
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/selfcheckout/v1/baskets/094a0e7f-0541-49b0-b063-3fa75d8468a8/weight',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '42fe2ea0-c3f6-4500-9ac8-79c51d303864',
            'expectedRevision': 2,
            'grams': 526,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "42fe2ea0-c3f6-4500-9ac8-79c51d303864",
      "expectedRevision": 2,
      "grams": 526
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/selfcheckout/v1/baskets/094a0e7f-0541-49b0-b063-3fa75d8468a8/weight');
    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")}/selfcheckout/v1/baskets/094a0e7f-0541-49b0-b063-3fa75d8468a8/weight");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "42fe2ea0-c3f6-4500-9ac8-79c51d303864",
      "expectedRevision": 2,
      "grams": 526
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "42fe2ea0-c3f6-4500-9ac8-79c51d303864",
      "status": "accepted",
      "aggregateId": "094a0e7f-0541-49b0-b063-3fa75d8468a8",
      "aggregateRevision": 3
    }

    Void a line

    POST /selfcheckout/v1/baskets/{basketId}/lines/{lineId}/void

    An attendant removes a line from an open basket. The weight of a counted line leaves the scale. An intervention that waits on the line is closed as voided.

    Parameters

    NameInTypeRequiredMeaning
    basketId path string (uuid) Yesrequired The basket.
    lineId path string (uuid) Yesrequired The line.

    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 basket you read.
    attendantId string Yesrequired The attendant who decides. Only an attendant of the store is accepted; the decision is recorded under this identifier.

    Responses

    StatusMeaningBody
    202 The change was accepted. The body is the operation result: aggregateId is the record that was changed. OperationResult
    400 The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. Error
    401 The token is missing, not valid or has ended. Error
    403 forbidden: The token does not give access to this data. not_an_attendant: The person named in attendantId is not an attendant of the store, so the decision is not recorded. Error
    404 basket_not_found: The basket does not exist in your account. line_not_found: The basket has no line with this identifier. Error
    409 revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. basket_not_open: The basket is not the open basket of its lane: it is paid, voided or released, or it is being paid where the change needs it open. line_not_active: The line is already voided. Error
    429 Too many requests. The request was not processed. Error
    503 The service cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/selfcheckout/v1/baskets/c37612e6-3f10-4a7d-b962-2afad36a4ab8/lines/7befa6fb-9f93-4bda-a605-9779f9d33f2a/void" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "c190d5af-edff-47bd-85e5-099fd3de3306",
      "expectedRevision": 6,
      "attendantId": "cristina-lungu"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/selfcheckout/v1/baskets/c37612e6-3f10-4a7d-b962-2afad36a4ab8/lines/7befa6fb-9f93-4bda-a605-9779f9d33f2a/void`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "c190d5af-edff-47bd-85e5-099fd3de3306",
        "expectedRevision": 6,
        "attendantId": "cristina-lungu"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/selfcheckout/v1/baskets/c37612e6-3f10-4a7d-b962-2afad36a4ab8/lines/7befa6fb-9f93-4bda-a605-9779f9d33f2a/void',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'c190d5af-edff-47bd-85e5-099fd3de3306',
            'expectedRevision': 6,
            'attendantId': 'cristina-lungu',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "c190d5af-edff-47bd-85e5-099fd3de3306",
      "expectedRevision": 6,
      "attendantId": "cristina-lungu"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/selfcheckout/v1/baskets/c37612e6-3f10-4a7d-b962-2afad36a4ab8/lines/7befa6fb-9f93-4bda-a605-9779f9d33f2a/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")}/selfcheckout/v1/baskets/c37612e6-3f10-4a7d-b962-2afad36a4ab8/lines/7befa6fb-9f93-4bda-a605-9779f9d33f2a/void");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "c190d5af-edff-47bd-85e5-099fd3de3306",
      "expectedRevision": 6,
      "attendantId": "cristina-lungu"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "c190d5af-edff-47bd-85e5-099fd3de3306",
      "status": "accepted",
      "aggregateId": "c37612e6-3f10-4a7d-b962-2afad36a4ab8",
      "aggregateRevision": 7
    }