Exports
Download export
Download a finished export.
GET
/v1/exports/{id}/downloadexportsDownloadOn this page
The export file: a JSON document {data, meta, pages, truncated} of up to 64 MiB, with data as one array (or object) holding every row of every page.
Example request
curl -sS "https://api.ordermap.si/v1/exports/$EXPORT_ID/download" \
--compressed -o export.json \
-H "Authorization: Bearer $ORDERMAP_API_KEY"const id = "EXPORT_ID";
const res = await fetch(`https://api.ordermap.si/v1/exports/${id}/download`, {
headers: { Authorization: `Bearer ${process.env.ORDERMAP_API_KEY}` },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const file = await res.json(); // { data, meta, pages, truncated }
console.log(file.pages, file.truncated);Set ORDERMAP_API_KEY to your key. Replace the dates with a recent trading date.
Parameters
1 parameter, 1 required.
| Parameter | Type and limits | Description |
|---|---|---|
idpathrequired | stringat most 64 characters | Export id returned when the export was created. |
Response
| Status | Meaning | Body |
|---|---|---|
200 | The export file. | Schema below |
401 | Missing or invalid API key. | Error object |
404 | The export does not exist or is not ready (export_not_ready). | Error object |
429 | Rate limit, burst limit or cooldown; wait Retry-After seconds.Retry-After | Error object |
Authenticated responses carry the X-RateLimit-* headers (see rate limits); 429 and 503 add Retry-After.
200 response body
dataanyrequiredEvery row of every page, in order: an array for list endpoints, the object itself for single-object endpoints.metaobjectrequiredThe endpoint's meta (request_id is the export id); coverage.complete is false and coverage.truncated true when the data was cut.pagesintegerrequiredPages of the endpoint the export read.truncatedbooleanrequiredThe data was cut at the row (100,000), size (64 MiB) or page limit.