Overview & authentication
The read API v1 lives on your organization's own origin — every endpoint is under https://{your-org}.leidang.app/api/v1/. It is read-only by design: the integration groundwork for pulling inventory into other systems, not a write channel.
Tokens
Create tokens under Admin → API tokens (requires the api_access plan feature). A token is shown once at creation — it is stored hashed and cannot be recovered, only revoked and reissued. Each token carries the read scopes you grant it (for example items.view, stock.view); economy fields appear in responses only when the token also holds economy.view.
curl https://your-org.leidang.app/api/v1/items?status=active \ -H "Authorization: Bearer ldg_XXXXXXXXXXXXXXXX"
Pagination
- List endpoints return up to
limitrows (1–200, default 50), ordered by id. - A response with more rows available carries
nextCursor— pass it back as?cursor=to continue. A missingnextCursormeans you have everything. updatedSince(ISO-8601) turns any list into an incremental sync feed.
Errors
Errors are JSON with a human-readable message. 401 — missing, malformed, unknown, or revoked token (the response carries WWW-Authenticate: Bearer); 403 — the token lacks the scope the endpoint checks; 400 — a filter you sent is invalid, with the reason spelled out.