Send a mutation to the Admin GraphQL API using the `bulkOperationRunQuery` mutation, passing your query (e.g., all products or orders with desired fields) as the `query` argument.
Poll the bulk operation status by querying `currentBulkOperation { id status errorCode }` until the status transitions to `COMPLETED`.
Once completed, retrieve the `url` field from `currentBulkOperation` — this is a temporary signed URL pointing to a JSONL file containing the results.
Download the JSONL file from the URL (it expires after a short window) and parse each line as an independent JSON object.
If the operation has sub-objects (e.g., variants under products), use the `__parentId` field on child records to associate them with their parent.
Handle `FAILED` or `CANCELED` statuses by inspecting `errorCode` and retrying with a corrected query as needed.
Known gotchas
The result JSONL URL is only valid for a short period (typically a few minutes); download it immediately after detecting COMPLETED status.
Only one bulk operation can run at a time per shop; attempting to start a second returns an error referencing the in-progress operation.
Deeply nested connections in the query can cause the operation to fail with a complexity error — flatten or limit nested fields as needed.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp