---
title: "Pagination | Docs | POS by R&D Copilot"
description: "Lists come in pages. Follow the cursor until it is empty."
canonical: "https://pos.rdcopilot.com/docs/reference/pagination/"
language: en
updated: 2026-11-22
---

# Pagination

Lists come in pages. Follow the cursor until it is empty.

Every list takes `limit` and `cursor` and answers `{items, nextCursor}`.

| Name | Meaning |
| --- | --- |
| `limit` | Records per page, from 1 to 500. The default is 100. |
| `cursor` | Opaque text from `nextCursor` of the previous page. Leave it out for the first page. |
| `nextCursor` | The cursor of the next page, or `null` after the last page. |

curl

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

JavaScript

```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

```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
<?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#

```csharp
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
}
```

## Read every page

JavaScript

```javascript
let cursor = null;
do {
  const query = new URLSearchParams({limit: '100'});
  if (cursor) query.set('cursor', cursor);
  const response = await fetch(`${process.env.RDC_BASE_URL}/pos/v1/orders?${query}`, {
    headers: {Authorization: `Bearer ${process.env.RDC_TOKEN}`},
  });
  const page = await response.json();
  for (const item of page.items) console.log(item);
  cursor = page.nextCursor;
} while (cursor);
```

Treat the cursor as opaque text. Do not build, edit or store it for later: it is meant for the next request of the same walk.

The full rule: [Developer guide](https://rdcopilot.com/docs/pagination/)
