XM

Update Products In Bulk

Path:

POST https://{baseurl}/api-product/v1/product/bulk/update

Enables you to update products in bulk.

Headers

Content-Type : application/json

x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

Authorization: The JWT access token from the Login API. This is applicable only for a logged in user (not for guest user).

Parameters

Type : requestBody

Name : The criteria to update products in bulk.

Required: true

Sample Request

Path:

POST https://{baseurl}/api-product/v1/product/bulk/update
{
"skus": [
"capio-product"
],
"action": "UPDATE",
"attributeValues": [
{
"name": "Display Name",
"value": "capio product name update"
}
]
}

Sample Response

Success Code: 200

Message: OK

Description: You will see this message when the products are successfully updated in bulk.

{
"success": [
{
"sku": "capio-product",
"itemIdSeq": 169,
"message": "SKU updated successfully"
}
],
"failed": [],
"itemIds": [
"60c7e6c73db9ec0008723078"
]
}

Sample Response

Success Code: 200

Message: OK

Description: You will see this message when the products are updated in bulk.

{
"success": [
{
"sku": "capio-product",
"itemIdSeq": 255,
"message": "SKU partially updated",
"errorAttributes": [
{
"name": "Display image",
"message": "Attribute not found"
}
]
}
],
"failed": [],
"itemIds": [
"60c7e6c73db9ec0008723078"
]
}

Sample Response

Success Code: 200

Message: OK

Description: You will see this message when the SKU is not found.

{
"success": [],
"failed": [
{
"sku": "capio-blah blah",
"message": "SKU not found"
}
],
"itemIds": []
}

Error Code: 401

Message: Unauthorized

Description: You will see this error when the Authorization (JWT token from the Login APIs) is not valid.

{
"code": "INVALID_AUTHORIZATION_TOKEN",
"message": "Invalid Authorization Token"
}

Change Log

  • June - 2021 First Updated