Admin API / Types
OrderExport
ObjectAn NDJSON export of every order that Query.orders gives with includeCancelled: true, in parts. One JSON record a line, in ascending order ID across all parts. A record holds the buyer's and seller's usernames and the IDs of the products, variants and live stream of the order, so the client needs admin:orders:read, admin:account:read, admin:products:read and admin:livestreams:read. Each ADMIN or higher reads the exports that this client started. It lives 7 days.
admin:orders:readThe requirement applies to every field of OrderExport unless that field declares its own scopes.
type OrderExport implements NodeFields
| Field | Type | Description |
|---|---|---|
createdAt | DateTime! | When the export was requested. |
expiresAt | DateTime! | When the export is deleted. The export resolves null after this instant. |
failureCode | OrderExportFailureCode | Why the export failed. Null unless the status is FAILED. |
id | ID! | A globally unique ID. Treat this value as an opaque string. |
parts | [OrderExportPart!] | The parts in index order. The export file is the bytes of all parts in this order. Null until READY. An empty list when there are no orders. |
recordCount | NonNegativeInt | The number of order records in all parts. Null until READY. |
sizeBytes | NonNegativeInt | The byte size of all parts. Null until READY. |
snapshotAt | DateTime | The createdAt of the export, set with READY. The file holds every change that ended before it, and can hold later changes. Null until READY. |
sortKey | OrderExportSortKey! | The sort key of the records across all parts. Always ORDER_ID. |
status | GeneratedFileStatus! | The export state. A PENDING export older than 1 hour reads FAILED. |