Skip to main content

bulkExportCreate

Requires at least one of the permissions customers:customer:list, inventory:stock_level:list, payments:invoice:list, payments:payment:list, products:product:list, sales:credit_note:list or sales:sales_order:list.

Starts a bulk export of one resource as JSONL. One export runs at a time per app: a second one is refused until bulk_export.finished arrives. Ids, codes, statuses, dates and quantities only: no money and no customer contact data. Needs the resource's read scope.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation BulkExportCreate($resource: BulkExportResource!) {
bulkExportCreate(resource: $resource) {
id
status
resource
updatedAfter
}
}

Variables:

{
"resource": "CREDIT_NOTES"
}

Response:

{
"data": {
"bulkExportCreate": {
"id": "id",
"status": "QUEUED",
"resource": "CREDIT_NOTES",
"updatedAfter": "2025-01-15T00:00:00Z"
}
}
}
bulkExportCreate(
resource: BulkExportResource!
updatedAfter: DateTime
): BulkExport!

Arguments​

bulkExportCreate.resource ● BulkExportResource! non-null enum​

What to export.

bulkExportCreate.updatedAfter ● DateTime scalar​

Export only rows changed after this moment.

Type​

BulkExport object​

A bulk export an app started. When it ends, the app's endpoint receives bulk_export.finished with a signed link to the JSONL file.