Create Bulk Operation
Create a new bulk operation.
Authorizations
API Scope: "Bulk Operations (write)"
Body
The JSONL file containing the data for the bulk operations.
Each line contains an individual operation, formatted as follows:
{"type": "{job type}", "parameters": {}, "payload": {}}
The following job types are supported:
order_createorder_updateorder_upsertorder_deleteproduct_createproduct_updateproduct_upsertproduct_deleteproduct_variant_createproduct_variant_updateproduct_variant_upsertproduct_variant_deletecollection_createcollection_updatecollection_upsertcollection_deleteinventory_upsertinventory_delete
Addressing records in job parameters
The following delete and upsert job types accept an optional addressing
parameter that controls how the target record is identified:
global(default) — use Loop global IDs inparametersexternal— use your platform's external IDs inparameters
When addressing is omitted, these jobs default to global. An invalid
addressing value causes the job to fail with a validation error. If the
external ID does not resolve to an existing record, the job fails as not found.
For each supported job type, Global is the default parameters shape.
External applies when addressing is "external":
order_delete,product_delete,collection_delete- Global:
id - External:
externalId
- Global:
product_variant_delete- Global:
id,productId - External:
productExternalId,externalId
- Global:
product_variant_upsert- Global:
productId - External:
productExternalId
- Global:
order_upsert, product_upsert, and collection_upsert always match by
external_id in the payload and do not use an addressing parameter.
Create and update, and inventory jobs use only global addressing (for example, id or
productId in parameters).
Payload details can be found in the documentation for each job, linked above.
Example job lines
Examples below are pretty-printed for readability. In the JSONL file, each job must be a single line with no embedded newlines.
Update a product by Loop global ID (default addressing)
Delete an order by external ID
Upsert a product variant by external product ID
Lines must be separated with \n.
There is no limit to the number of lines that can be included in a file, but bulk operation files are limited to 2 MB in size.
Response
Success