Bulk Update

This section talks about the API endpoints used for Bulk Update of product data for various use cases.

The difference between Bulk-Update and Import is that Bulk Update API allows you to update any set of fields for any number of products. This would be typically useful in the scenario when you want to same attribute value across multiple products.

In order to know which all fields are enabled for bulk update you can refer to Meta info document.


PUT/api/v1/bulk-update/any-field

Any Field

This endpoint allows to update a specific attribute with 1 specific value for multiple products. You can provide the list of products to be updated and the attribute code and attribute value to be updated.

For eg, you want to update weight to 12kg for set of 15 products, you can do that using 1 simple API call by passing fieldCode=weight, fieldValue=12, and list of ProductIds.

Request Parameters

NameTypeDescription
productIdsList stringList of Unique GUID of the products to be updated
fieldCodestringUnique attribute field code to be updated
fieldValuestringAttribute value to be updated

Sample Request

Request

PUT
/api/v1/bulk-update/any-field
curl --location '<api_url>/api/v1/bulk-update/any-field' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: bearer {{apiKey}}'
--data '{
"productIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"fieldCode": "string",
"fieldValue": "string"
}'

Response Model

Response

{
"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription
isValidboolWhether the transaction was successful or failure, true - success, false - Failure
messagestringMessage to display on front end (if any) in case of errors/success
errorsarrayList of error messages, if any.
messageCodestringResponse message code
recordIdstringRecord ID of the object updated / created


PUT/api/v1/bulk-update/multiple-fields

Multiple Fields

This endpoint allows you to update multiple fields for multiple products where in you can provide the required values for different fields / attributes.

Request Parameters

NameTypeDescription
productIdsList stringList of Unique GUID of the products to be updated
dataList objectList of attributes and specific values to be updated
data.fieldCodestringUnique attribute field code to be updated
data.fieldValuestringAttribute value to be updated

Sample Request

Request

PUT
/api/v1/bulk-update/multiple-field
curl --location '<api_url>/api/v1/bulk-update/multiple-field' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: bearer {{apiKey}}'
--data '[
{
"productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"data": [
  {
    "fieldCode": "string",
    "fieldValue": "string"
  }
]
}
]'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription
isValidboolWhether the transaction was successful or failure, true - success, false - Failure
messagestringMessage to display on front end (if any) in case of errors/success
errorsarrayList of error messages, if any.
messageCodestringResponse message code
recordIdstringRecord ID of the object updated / created


PUT/api/v1/bulk-update/tags

Tags

This endpoint is used to bulk update products with a same set of tags.

Request Parameters

NameTypeDescription
productIdsList stringList of Unique GUID of the products for which tags need to be updated
tagsList stringList of tags that needs to be updated for the products Provided

Sample Request

Request

PUT
/api/v1/bulk-update/tags
curl --location '<api_url>/api/v1/bulk-update/tags' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: bearer {{apiKey}}'
--data '{
"productIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"tags": [
"tag1"
]
}'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription
isValidboolWhether the transaction was successful or failure, true - success, false - Failure
messagestringMessage to display on front end (if any) in case of errors/success
errorsarrayList of error messages, if any.
messageCodestringResponse message code
recordIdstringRecord ID of the object updated / created


PUT/api/v1/bulk-update/collection

Collection

This endpoint allows to add multiple products to a product collection.

Request Parameters

NameTypeDescription
productIdsList stringList of Unique GUID of the products to be updated
collectionIdstringUnique Guid of the collection that needs to be updated

Sample Request

Request

PUT
/api/v1/bulk-update/collection
curl --location '<api_url>/api/v1/bulk-update/collection' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: bearer {{apiKey}}'
--data '{
"productIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"collectionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription
isValidboolWhether the transaction was successful or failure, true - success, false - Failure
messagestringMessage to display on front end (if any) in case of errors/success
errorsarrayList of error messages, if any.
messageCodestringResponse message code
recordIdstringRecord ID of the object updated / created


PUT/api/v1/bulk-update/vendor

Vendor

This endpoint updates vendor for multiple products in a single API call. User can provide the list of products to be updated and the vendor id that needs to be updated for these products as input.

Request Parameters

NameTypeDescription
productIdsList stringList of Unique GUID of the products to be updated
vendorIdstringUnique Guid of the Vendor that needs to be updated

Sample Request

Request

PUT
/api/v1/bulk-update/vendor
curl --location '<api_url>/api/v1/bulk-update/vendor' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: bearer {{apiKey}}'
--data '{
"productIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"vendorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription
isValidboolWhether the transaction was successful or failure, true - success, false - Failure
messagestringMessage to display on front end (if any) in case of errors/success
errorsarrayList of error messages, if any.
messageCodestringResponse message code
recordIdstringRecord ID of the object updated / created


PUT/api/v1/bulk-update/hsn-code

HSN Code

This endpoint allows you to update multiple products with the same HSN Code. You can provide the list of products that need to be updated with the HSN Code.

Request Parameters

NameTypeDescription
productIdsList stringList of Unique GUID of the products to be updated
hsnCodestringUnique Guid of the HSN code that needs to be updated

Sample Request

Request

PUT
/api/v1/bulk-update/hsn-code
curl --location '<api_url>/api/v1/bulk-update/hsn-code' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: bearer {{apiKey}}'
--data '{
"productIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"hsnCode": "abc12345"
}'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription
isValidboolWhether the transaction was successful or failure, true - success, false - Failure
messagestringMessage to display on front end (if any) in case of errors/success
errorsarrayList of error messages, if any.
messageCodestringResponse message code
recordIdstringRecord ID of the object updated / created


PUT/api/v1/bulk-update/coo

COO

This endpoint updates multiple products with the same country of origin. You can provide the list of products to be updated and the country with which they need to be updated.

Request Parameters

NameTypeDescription
productIdsList stringList of Unique GUID of the products to be updated
countryOfOriginstringCountry Of Origin that needs to be updated

Sample Request

Request

PUT
/api/v1/bulk-update/coo
curl --location '<api_url>/api/v1/bulk-update/coo' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: bearer {{apiKey}}'
--data '{
"productIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"countryOfOrigin": "India"
}'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription
isValidboolWhether the transaction was successful or failure, true - success, false - Failure
messagestringMessage to display on front end (if any) in case of errors/success
errorsarrayList of error messages, if any.
messageCodestringResponse message code
recordIdstringRecord ID of the object updated / created


PUT/api/v1/bulk-update/brand

Brand

This endpoint updates multiple products with the same brand. You can provide the list of the products to be updated and the brand that needs to be updated for these products.

Request Parameters

NameTypeDescription
productIdsList stringList of Unique GUID of the products to be updated
brandIdstringUnique Guid of the brand that needs to be updated

Sample Request

Request

PUT
/api/v1/bulk-update/brand
curl --location '<api_url>/api/v1/bulk-update/brand' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: bearer {{apiKey}}'
--data '{
"productIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"brandId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription
isValidboolWhether the transaction was successful or failure, true - success, false - Failure
messagestringMessage to display on front end (if any) in case of errors/success
errorsarrayList of error messages, if any.
messageCodestringResponse message code
recordIdstringRecord ID of the object updated / created


PUT/api/v1/bulk-update/status

Status

This endpoint Updates multiple products with the same status. You can provide the list of products that needs to be updated and the status with which they need to be updated with.

Request Parameters

NameTypeDescription
productIdsList stringList of Unique GUID of the products to be updated
statusintInteger Status id to be updated

Sample Request

Request

PUT
/api/v1/bulk-update/status
curl --location '<api_url>/api/v1/bulk-update/status' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: bearer {{apiKey}}'
--data '{
"productIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"status": 0
}'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription
isValidboolWhether the transaction was successful or failure, true - success, false - Failure
messagestringMessage to display on front end (if any) in case of errors/success
errorsarrayList of error messages, if any.
messageCodestringResponse message code
recordIdstringRecord ID of the object updated / created