Update Product
This operation allows you to update an existing Product within the catalog.
It follows REST principles and is aligned with the OData v4.01 standard.
[PATCH] Product Endpoint
https://api2.saleslayer.com/rest/Catalog/Products({productId})
Making a request
- Use the HTTP method: PATCH.
- Include the API key in the request headers for authentication.
- The body must be sent in JSON format with valid identifiers for each field
- The productId parameter is mandatory. Identifier of the product to be updated.
Request body example:
{
"prod_title": {
"es": "Zapatillas Urbanas",
"en": "Urban Sneakers"
},
"prod_stat": "V",
"prod_description": {
"es": "Calzado urbano con diseño moderno",
"en": "Urban shoes with modern design"
},
"prod_image": "urban_shoes.jpg"
}
ℹ️You can update one or more product fields in a single request. It is not allowed to edit prod_id
,
prod_clone_id
,
prod_creation
,
prod_ref
, or
cat_ref
fields, as they are auto-generated or internally managed.
Response
🟢 204 No content
The product was updated successfully. No content is returned.
🔴 400 Bad Request
Common errors include:
- Incorrect JSON format.
- Invalid or missing fields.
- Field values that do not meet constraints.
"cat_id does not exist or is invalid"
🔴 401 Unauthorized
Missing or invalid API key.
🔴 403 Forbidden
The user does not have permission to perform this operation.
🔴 404 Not Found
The product specified in productId
does not exist.
🔴 412 Precondition Failed
System is not in a valid state to perform the operation.
🔴 500 Internal Server Error
Unexpected system failure
Limitations and considerations
- Only one product can be updated per call.
- A valid, existing
productId
must be provided. - Batch updates are not supported.
- Files and images must already exist in the library.
- Only one category can be linked per product.
- All updates are automatically recorded in the changelog.
Multi-language fields support
You can include multilingual values for attributes that are configured to support multiple languages.
Multilingual body example:
{
"prod_title": {
"es": "Zapatillas Urbanas",
"en": "Urban Sneakers"
},
"prod_description": {
"es": "Calzado urbano para uso diario",
"en": "Urban footwear for everyday use"
}
}
📝Make sure the attribute supports multiple languages and that the languages are enabled in your account.
Multilingual field conditions
You can send multilingual values for fields only if:
- The field is defined as multilingual in the attribute set.
- The languages used are supported by your account.
Common errors:
- Unsupported language →
400 - Invalid language code
- Non-multilingual field →
400 - Attribute does not support multi-language