Update Multiple Products
The PUT endpoint allows you to update multiple products in a single request. This is useful for batch updating product details, including description, variants, and options.
Endpoint
- URL:
/products/multiple - Method:
PUT
Authentication
- Header:
accessToken - Type: Bearer Token
- Value:
<ACCESS-TOKEN>
Request Headers
| Header | Type | Description |
|---|---|---|
Content-Type | string | Must be application/json. |
accessToken | string | Access token for authentication. (required) |
Request Body
The request body should be a JSON array, where each element represents a product object to update. Each object contains the following fields:
| Field | Type | Description |
|---|---|---|
id | string | The unique identifier of the product. Required. |
sku | string | Stock Keeping Unit identifier. |
description | object | Detailed description structure. |
shortDescription | string | Short description of the product. |
specifications | array | List of product specifications. |
status | string | Status of the product (e.g., "active"). |
weight | number | Weight of the product. |
files | array | List of file attachments (currently empty). |
manufacturer | string | Name of the manufacturer. |
price | string | Price of the product. |
options | array | Product options (currently empty). |
variants | array | Product variants (currently empty). |
metaFields | array | Additional metadata fields (currently empty). |
mediaGallery | array | List of media objects with url, type, label, and isDefault. |
categories | array | List of category IDs the product belongs to. |
bundledProducts | array | List of bundled products (currently empty). |
groupedProducts | array | List of grouped product objects with productId, quantity, and dynamicQuantity. |
Sample Request Body
[
{
"id": "63ea47d7ceb093aad4692e12",
"name": "Murphy's Oil Soap",
"sku": "MUR 01163",
"description": {
"value": ""
},
"shortDescription": "",
"manufacturer": "R3 Metro",
"weight": 2109,
"status": "active",
"price": 58.92,
"variants": [
{
"sku": "MUR 01163-CS",
"name": "Case",
"price": 58.92,
"options": [
{
"optionName": "Unit",
"optionValueLabel": "Case",
"optionValue": "CS"
}
]
},
{
"sku": "MUR 01163-CS",
"name": "Each",
"price": 28.92,
"options": [
{
"optionName": "Unit",
"optionValueLabel": "Each",
"optionValue": "EA"
}
]
}
],
"options": [
{
"optionName": "Unit",
"optionType": "radio",
"optionValues": [
{
"label": "Case",
"value": "CS",
"isDefault": true
},
{
"label": "Each",
"value": "EA",
"isDefault": true
}
]
}
],
"metaFields": [
{
"code": "pim_id",
"value": "977"
},
{
"code": "p21_product_group",
"value": "CHEMICAL"
},
{
"code": "inv_mast_uid",
"value": "5009"
}
],
"specifications": [
{
"name": "Supplier Part Number",
"value": "CPC01163CT"
},
{
"name": "Manufacturer Name",
"value": "R3 Metro"
},
{
"name": "P21 Product Group",
"value": "CHEMICAL"
},
{
"name": "Size",
"value": "32oz"
},
{
"name": "Weight",
"value": "21.09 Pound"
},
{
"name": "Serialized",
"value": "No"
},
{
"name": "Inv Mast Uid",
"value": "5009"
}
],
"categories": []
}
]
Response
- Status Code: 200 OK
Sample Response Body
A successful response confirms product updates and may include details of each updated product:
{
"success": true,
"message": "Products updated successfully",
}
Success Response Body
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates the success status of the request, typically true for a successful operation. |
message | string | A message conveying the outcome of the operation, e.g., "Product updated Successfully". |
Error Responses
| Status Code | Description |
|---|---|
| 400 | Bad Request: Invalid input data. |
| 401 | Unauthorized: Access token is invalid or missing. |
| 500 | Internal Server Error: An error occurred on the server. |
Notes
- Ensure each product object has a valid
idfor an existing product. - Confirm the access token is active and has the necessary permissions to update products.