Skip to main content

Bulk Update/Create Product Images

POST 

/api/products/:product/bulk-images

Bulk update or create multiple images for a product at once.

Required scope: products:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

By default this endpoint SYNCS: any image already on the product that is not in the request body is deleted. To ADD images without touching the existing gallery, send operation: "updateOrCreate" on each row; send operation: "delete" with an id to remove a single image.

Fields per image:

  • id (integer, optional) - an existing image on this product; required for delete
  • url (string, required unless id is given) - the image URL
  • name (string, optional, max 255)
  • sort_order (integer, optional) - gallery position
  • download (boolean, optional) - fetch and re-host the image instead of hot-linking it
  • is_primary (boolean, optional) - the product's main image
  • operation (string, optional) - updateOrCreate or delete. Omit for the sync behaviour above.

Authentication: Requires Bearer token.

Request​

Responses​

OK

Response Headers
    Content-Type