Delete Variant
This operation allows you to delete an existing variant from the catalog.
It follows REST principles and aligns with the OData v4.01 standard.
[DELETE] Variant Endpoint
https://api2.saleslayer.com/rest/Catalog/Variants({variantId})
Making a request
- Use the HTTP method: DELETE.
- Include the API key in the request headers for authentication.
- It does not require a body (request body).
- The variantId parameter is required and indicates the variant you want to delete.
Request example:
DELETE /rest/Catalog/Variants(3501)
Response
🟢 204 No content
The variant was successfully updated. No additional content is returned.
🔴 400 Bad Request
Common errors include:
- The provided ID is in an incorrect format (must be numeric).
- Required parameters are missing or invalid.
"The identifier frmt_id is invalid or not found"
🔴 401 Unauthorized
Missing or invalid API key.
🔴 403 Forbidden
The user does not have permission to perform this operation.
🔴 404 Not Found
The variant specified by variantId
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 variant can be deleted per request.
- Deletion is not supported in environments with multi-table attributes.