external_product_id
determines whether to update or create a new product. If the identifier already exists in the database, the product information gets updated, and if not, then a new product gets generated. See the Body Object Example below.{"results": [{"success": {"request_id": "string","product_id": "string","external_product_id": "string"},"error": {"request_id": "string","external_product_id": "string","error_message": "string"}}]}
{"error_code": "REAL_CODES_ARE_IN_ENDPOINT_DESCRIPTION","message": "Additional details about error are not static and can be changed"}
auth.tokenNotFound
, auth.tokenExpired
, auth.tokenInvalid
, auth.tokenRequired
.{"code": "auth.tokenNotFound"}
This is unexpected response, something is wrong on our side, please contact: help@whisk.com
{"batch":[{"request_id":"1","payload":{"external_product_id":"551d2f0b-fba9-43ac-9a4b-7737e53823cf","name":"UpdateProduct","description":"Updated product description","brand":"Whisk","language":"en"}},{"request_id":"2","payload":{"external_product_id":"551d2f0b-fba9-43ac-9a4b-7737e53823cl","name":"NewProduct","description":"New product","brand":"Whisk","language":"en"}}],"integration_id":"e07032d4-ab74-4736-ae84-57091fae6210"}
The body
object contains the following attributes that you can specify to create or update products:
Attribute | Type | Description | Example |
| array | It contains a group of definitions to update or create products. |
|
| string | An identifier to indicate the integration type. See Integration API for more information. |
|
The batch
object contains the following attributes:
Attribute | Type | Description | Example |
| string | An identifier for each product data submission request. |
|
| object | It contains individual product definitions for either data creation or update. To understand the data structure of a product definition, see the Product Object. |
|
curl -X POST "https://api.studio.whisk.com/products/v1/upsert/batch"-H "Accept: application/json"-H "Authorization: Bearer <YOUR-API-ACCESS-KEY>"-H "Content-Type: application/json"-d "{ \"batch\":[ { \"request_id\":\"1\", \"payload\":{ \"external_product_id\":\"551d2f0b-fba9-43ac-9a4b-7737e53823cf\", \"name\":\"UpdateProduct\", \"description\":\"Updated product description\", \"brand\":\"Whisk\", \"language\":\"en\" } }, { \"request_id\":\"2\", \"payload\":{ \"external_product_id\":\"551d2f0b-fba9-43ac-9a4b-7737e53823cl\", \"name\":\"NewProduct\", \"description\":\"New product\", \"brand\":\"Whisk\", \"language\":\"en\" } } ], \"integration_id\":\"e07032d4-ab74-4736-ae84-57091fae6210\"}"
Note: Whisk allows you to discover and understand its API capabilities on the Swagger interface with the ability to try out the API calls directly in your browser. You can call this endpoint here.
{"results": [{"success": {"request_id": "1","product_id": "5ff46349642e29bec3731026","external_product_id": "551d2f0b-fba9-43ac-9a4b-7737e53823cf"}},{"success": {"request_id": "2","product_id": "5ff4671f642e29bec3777d76","external_product_id": "551d2f0b-fba9-43ac-9a4b-7737e53823cl"}}]}