Skip to main content

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

HeaderTypeDescription
Content-TypestringMust be application/json.
accessTokenstringAccess 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:

FieldTypeDescription
idstringThe unique identifier of the product. Required.
skustringStock Keeping Unit identifier.
descriptionobjectDetailed description structure.
shortDescriptionstringShort description of the product.
specificationsarrayList of product specifications.
statusstringStatus of the product (e.g., "active").
weightnumberWeight of the product.
filesarrayList of file attachments (currently empty).
manufacturerstringName of the manufacturer.
pricestringPrice of the product.
optionsarrayProduct options (currently empty).
variantsarrayProduct variants (currently empty).
metaFieldsarrayAdditional metadata fields (currently empty).
mediaGalleryarrayList of media objects with url, type, label, and isDefault.
categoriesarrayList of category IDs the product belongs to.
bundledProductsarrayList of bundled products (currently empty).
groupedProductsarrayList 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

FieldTypeDescription
successbooleanIndicates the success status of the request, typically true for a successful operation.
messagestringA message conveying the outcome of the operation, e.g., "Product updated Successfully".

Error Responses

Status CodeDescription
400Bad Request: Invalid input data.
401Unauthorized: Access token is invalid or missing.
500Internal Server Error: An error occurred on the server.

Notes

  • Ensure each product object has a valid id for an existing product.
  • Confirm the access token is active and has the necessary permissions to update products.