Update Custom Entity Item
This operation allows updating an existing item within a custom entity of the catalog.
It follows REST principles and aligns with the OData v4.01 standard.
[PATCH] Custom Entities Item Endpoint
/rest/Catalog/CustomEntities('{customEntityDenominator}')/item({itemId})
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 customEntityDenominator parameter is mandatory (name of the custom entity).
- The itemId parameter is mandatory (ID of the item to update).
Request body example:
{
"xxxx_title": {
"es": "Nueva descripción del elemento",
"en": "New item description"
},
"xxxx_stat": "V",
"xxxx_image": "item_image.png",
"xxxx_description": "Additional description of the updated item."
}
ℹ️You can update one or more variant fields in the same request.
Response
🟢 204 No content
The custom entity item was successfully updated. No additional content is returned.
🔴 400 Bad Request
Common errors include:
- Incorrect JSON format.
- Invalid or missing fields.
- Field values that do not meet constraints.
"xxxx_id not found 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 specified entity or item indicated in customEntityDenominator
or itemId
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 item per call can be updated.
- You must provide valid and existing
customEntityDenominator
anditemId
. - Bulk updates are not supported.
- Files and images must previously exist in the system's media library.
- All changes made are automatically recorded in the activity log (activity).
Multi-language fields support
You can include multilingual values for attributes that are configured to support multiple languages.
Multilingual body example:
{
"xxxx_title": {
"es": "Título del elemento personalizado en español",
"en": "Custom entity item title in English"
},
"xxxx_description": {
"es": "Descripción completa del elemento personalizado en español",
"en": "Complete description of the custom entity item in English"
}
}
📝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