XM

Add Products In Bulk

Path:

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

Enables you to add 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 add products in bulk.

Required: true

Sample Request

Path:

POST https://{baseurl}/api-product/v1/product/bulk/insert
[
{
"nodeName": "MASTER->Furniture->Living->Sofas",
"sku": "capio-product",
"attributeValues": [
{
"name": "Display Name",
"value": "capio product two"
},
{
"name": "Vendor Id",
"value": "abc"
}
]
}
]

Sample Response

Success Code: 200

Message: OK

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

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

Sample Response

Success Code: 200

Message: OK

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

{
"success": [],
"failed": [
{
"sku": "capio-product",
"message": "SKU duplicate Value"
}
],
"itemIds": []
}

Sample Response

Success Code: 200

Message: OK

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

{
"success": [],
"failed": [
{
"sku": "capio-test-one",
"message": "SKU node 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