# Pagination

For designers and integrators.

**Lists** return `{ "object": "list", "data": [...], "has_more": true, "next_cursor": "..." }`. Pass `next_cursor` back as `cursor` for the next page.

## Parameters

- **`limit`**: How many results per page, from 1 to 100. Defaults to 20.

- **`cursor`**: Where to continue from: the `next_cursor` of the previous page. Omit for the first page.

## The list object

Every list answers with the same envelope. When `has_more` is false, you have reached the end.

**GET /v2/orders**

```json
{
  "object": "list",
  "data": [
    {
      "id": "ord_bfP0GSqKoZFrD72H5Os0rc7HV9XP6eQJu",
      "object": "order",
      "number": "PV-SCN-1701A372",
      "channel": "storefront",
      "status": "in_production",
      "customer": {
        "name": "Ana Popescu",
        "email": "ana@example.com",
        "phone": null,
        "company": null
      },
      "shipping_address": {
        "formatted": "Str. Test 1, Cluj, RO",
        "city": "Cluj",
        "country": "Romania",
        "country_code": "RO"
      },
      "charges": {
        "paid_by": "buyer",
        "items": {
          "amount": 1800,
          "currency": "usd"
        },
        "shipping": {
          "amount": 600,
          "currency": "usd"
        },
        "vat": {
          "amount": {
            "amount": 0,
            "currency": "usd"
          },
          "rate": 0,
          "included": false,
          "country": null
        },
        "sample_credit": null,
        "total": {
          "amount": 2400,
          "currency": "usd"
        }
      },
      "earnings": {
        "manufacturing": {
          "amount": 900,
          "currency": "usd"
        },
        "platform_fee": {
          "amount": 300,
          "currency": "usd"
        },
        "payment_processing": {
          "amount": 102,
          "currency": "usd"
        },
        "refunded": {
          "amount": 0,
          "currency": "usd"
        },
        "net": {
          "amount": 498,
          "currency": "usd"
        }
      },
      "shipping": {
        "tier": "small",
        "carrier": null,
        "tracking_number": null,
        "shipped_at": null
      },
      "external": null,
      "customer_notes": null,
      "qc": {
        "open_tickets": 1,
        "blocks_shipping": true
      },
      "created_at": "2026-10-09T08:39:29Z",
      "updated_at": "2026-10-09T08:40:02Z",
      "item_count": 1
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## Cursors

**Cursors** are signed: pass `next_cursor` back exactly as received. An edited cursor is refused with `invalid_cursor`.

**Fetch every page (Node.js)**

```javascript
let cursor;
const orders = [];

do {
  const url = new URL('/v2/orders', process.env.DAPI_API_URL);
  url.searchParams.set('limit', '100');
  if (cursor) url.searchParams.set('cursor', cursor);

  const response = await fetch(url, {
    headers: { 'x-api-key': process.env.DAPI_API_KEY },
  });
  const page = await response.json();
  orders.push(...page.data);
  cursor = page.has_more ? page.next_cursor : undefined;
} while (cursor);
```

**Fetch every page (Python)**

```python
import os
import requests

orders = []
params = {"limit": 100}

while True:
    page = requests.get(
        f"{os.environ['DAPI_API_URL']}/v2/orders",
        params=params,
        headers={"x-api-key": os.environ["DAPI_API_KEY"]},
    ).json()
    orders.extend(page["data"])
    if not page["has_more"]:
        break
    params["cursor"] = page["next_cursor"]
```

## Syncing changes

Only orders changed after this time. Use it to sync status changes since your last poll.

For changes as they happen, prefer [webhooks](https://public-api.dapi.digital/docs/guides/webhooks.md).

-   [GET List products `/v2/products`](https://public-api.dapi.digital/docs/reference/products.md#list_products)
-   [GET List orders `/v2/orders`](https://public-api.dapi.digital/docs/reference/orders.md#list_orders)

## Paginated lists

-   [GET List quotes `/v2/quotes`](https://public-api.dapi.digital/docs/reference/quotes.md#list_quotes)
-   [GET List approval requests `/v2/integrator/approval-requests`](https://public-api.dapi.digital/docs/reference/integrator-onboarding.md#list_approval_requests)
-   [GET List your API requests `/v2/api-requests`](https://public-api.dapi.digital/docs/reference/logs.md#list_api_requests)
-   [GET List products `/v2/products`](https://public-api.dapi.digital/docs/reference/products.md#list_products)
-   [GET List orders `/v2/orders`](https://public-api.dapi.digital/docs/reference/orders.md#list_orders)
-   [GET List your orders `/v2/integrator/orders`](https://public-api.dapi.digital/docs/reference/integrator-orders.md#list_integrator_orders)
-   [GET List import issues `/v2/import-issues`](https://public-api.dapi.digital/docs/reference/orders.md#list_import_issues)
-   [GET List QC tickets `/v2/qc-tickets`](https://public-api.dapi.digital/docs/reference/quality-control.md#list_qc_tickets)
-   [GET List stocks `/v2/stocks`](https://public-api.dapi.digital/docs/reference/stocks.md#list_stocks)
-   [GET List batches across stocks `/v2/stock-batches`](https://public-api.dapi.digital/docs/reference/stocks.md#list_all_stock_batches)
-   [GET List what used a batch `/v2/stocks/{id}/batches/{batch_id}/usage`](https://public-api.dapi.digital/docs/reference/stocks.md#list_stock_batch_usage)
-   [GET List the batches of a stock `/v2/stocks/{id}/batches`](https://public-api.dapi.digital/docs/reference/stocks.md#list_stock_batches)
-   [GET List extra parts `/v2/extras`](https://public-api.dapi.digital/docs/reference/extras.md#list_extras)
-   [GET List transactions `/v2/transactions`](https://public-api.dapi.digital/docs/reference/wallet.md#list_transactions)
-   [GET List withdrawals `/v2/withdrawals`](https://public-api.dapi.digital/docs/reference/wallet.md#list_withdrawals)
-   [GET List events `/v2/events`](https://public-api.dapi.digital/docs/reference/webhooks.md#list_events)
-   [GET List webhook endpoints `/v2/webhook-endpoints`](https://public-api.dapi.digital/docs/reference/webhooks.md#list_webhook_endpoints)
-   [GET List deliveries to an endpoint `/v2/webhook-endpoints/{id}/deliveries`](https://public-api.dapi.digital/docs/reference/webhooks.md#list_webhook_endpoint_deliveries)
-   [GET List catalog materials `/v2/materials`](https://public-api.dapi.digital/docs/reference/materials.md#list_materials)
-   [GET List product categories `/v2/categories`](https://public-api.dapi.digital/docs/reference/categories.md#list_categories)

---

3DAPI API Docs. This page on the web: https://public-api.dapi.digital/docs/guides/pagination. Index of every page: https://public-api.dapi.digital/docs/llms.txt.
