Developers · Core concepts

Pagination

Cursor pagination on every list endpoint: limit, cursor, has_more and next_cursor, with complete loops in seven languages.

Version
v1.0.0
Base URL
https://dppapi-production.up.railway.app/v1
Format
JSON · OpenAPI 3.1
FeedbackLast updated

Bu makale İngilizce olarak mevcuttur.

On this pageParameters and envelope

List endpoints return one page at a time with an opaque cursor to the next. Cursors stay correct while records are being added, which offsets cannot promise.

Parameters and envelope

ParameterMeaning
limitPage size, 1–200. Default 50.
cursorThe next_cursor from the previous page. Omit for the first page.
Every list response
{"data": [ { "id": "…" } ],"has_more": true,"next_cursor": "eyJpZCI6ImNtMXE4eTBicTAwMDZsNzBmeDl5OHo3dzYifQ"}
  • Stop when has_more is false; next_cursor is then null.
  • Treat the cursor as opaque: do not build, decode or modify it.
  • Keep the same filters on every page of one walk; change filters, start again without a cursor.
  • Lists are newest first, and the cursor marks the position of the last row. Records created during a walk land before your starting point, so a walk never skips or repeats a row — pick them up on the next incremental run.

Paginated endpoints

EndpointFilters
`GET /models`category, updated_since, complete
`GET /passports`model_id, serial, unique_identifier, status, published, updated_since, created_since
`GET /passports/{id}/events`since, event_type
`GET /documents`model_id, type
`GET /audit`entity, entity_id, since
`GET /webhooks/{id}/deliveries`status

GET /models/{id}/items predates cursors and pages by number (page, pageSize); for syncing batteries use GET /passports?model_id= instead.

The first page

curl "https://dppapi-production.up.railway.app/v1/passports?model_id=cm1q8x2k40003l70f9a8s7d6e&limit=200" \-H "Authorization: Bearer $DPP_API_KEY"

Complete loops

Each of these walks every page and stops on its own:

// Node.js 18+. An async iterator over every passport, page by page.const BASE = 'https://dppapi-production.up.railway.app/v1';async function* passports(filters = {}) {let cursor;do {const qs = new URLSearchParams({ ...filters, limit: '200', ...(cursor && { cursor }) });const res = await fetch(`${BASE}/passports?${qs}`, {headers: { Authorization: `Bearer ${process.env.DPP_API_KEY}` },});if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);const page = await res.json();yield* page.data;cursor = page.has_more ? page.next_cursor : undefined;} while (cursor);}for await (const passport of passports({ model_id: 'cm1q8x2k40003l70f9a8s7d6e' })) {console.log(passport.id, passport.status);}

To keep a copy up to date after the first walk, see incremental sync.

Çerez tercihleri

Hangi çerezlerin kullanılacağını siz seçersiniz. Tercihinizi istediğiniz zaman alt bilgideki “Çerez ayarları”ndan değiştirebilirsiniz. Gizlilik politikası

Gerekli

Her zaman açık

Sitenin çalışması için gereklidir: açık/koyu tema seçiminiz ve bu çerez tercihiniz tarayıcınızda saklanır. Sizi izlemek için kullanılmazlar.

Analitik

Google Analytics 4, sayfaların nasıl kullanıldığını istatistiklerle ölçer ve siteyi iyileştirmemize yardımcı olur. Kabul ederseniz çerez bırakır ve ziyaretinizi tam olarak ölçer. Reddederseniz çerez bırakmaz, ancak Google yine de görüntülenen sayfa, tarayıcı türü ve IP adresi gibi teknik veriler alabilir.

_ga, _ga_* · en çok 2 yıl · Google