Skip to main content
POST
Create Bulk Operation

Authorizations

X-Authorization
string
header
required

API Scope: "Bulk Operations (write)"

Body

multipart/form-data
file
file
required

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:

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 in parameters
  • external — use your platform's external IDs in parameters

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
  • product_variant_delete
    • Global: id, productId
    • External: productExternalId, externalId
  • product_variant_upsert
    • Global: productId
    • External: productExternalId

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

bulk_operation
object