API reference · Contracts · Store Management
Remove Products from Contract
- Method
- DELETE
- Route
-
/pricing/contract/:contractId/items - Base URL
https://ws.autorei.net- Path parameters
:contractId- Token
- Requires Bearer token
Opens this request in the public API documentation, the official source of the reference.
Description
Removes products from the contract. The products go back to being sold at the store's list price.
Send from 1 to 100 products per request, identified the same way as in the addition. The price is not sent in the removal.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
contractId |
integer | Yes | Contract id, returned in id at creation. |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
items |
array | Yes | From 1 to 100 products. |
| Product identification — not a field, it is a group | — | Yes | One of the two forms in the How to identify the product section: items[].partnerPartCode · items[].skuAttributeValue with skuAttributeName. |
skuAttributeName |
string | Conditional | Name of the attribute used to resolve items[].skuAttributeValue. Required when you identify the products by attribute. Applies to the whole submission, not per item. |
How to identify the product
Each product must carry one of the two forms, in this order of precedence:
| Form | Fields | When to use |
|---|---|---|
| By partner code | partnerPartCode |
You identify the product by your own code. |
| By attribute | skuAttributeValue with skuAttributeName in the envelope |
You have contracted the product catalog service with your own attribute. |
Business rules
A product outside the contract comes back in notFound
A product that is not in the contract does not interrupt the request: it comes back in notFound.items and the rest are removed. The response is 200 even when no product was removed.
To empty the whole list at once, use deleteAllItems in Update Contract.
Response · 200
| Field | Description |
|---|---|
id |
Contract id. |
items[].skuId |
Id of the SKU removed. |
items[].price |
Price the product had in the contract, before removal. |
items[].targetMargin · items[].totalCost |
Target margin and cost the product had in the contract. |
items[].partnerPartCode · items[].skuAttributeValue |
Echo of the identification you sent. |
notFound.items |
Products you sent that were not in the contract, or that were not resolved in the store catalog. |
Errors
| Code | When |
|---|---|
| 400 | The route's contractId is not a number greater than zero: {"error":"invalid contract id: \"...\""}. |
| 400 | The body is not valid JSON. The detail comes in error. |
| 400 | The contract does not exist or does not belong to the token's store: {"error":"priceContract.notFound"}. |
| 422 | items missing, empty or with more than 100 entries. The detail comes in error. |
| 401 | Token missing, malformed or expired. |
Example request
curl --request DELETE 'https://ws.autorei.net/pricing/contract/:contractId/items' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"items": [
{
"partnerPartCode": "SKU-A-001"
},
{
"partnerPartCode": "SKU-Z-999"
}
]
}' Example responses
200Success — product removed
{
"id": 4610001,
"items": [
{
"skuId": 500101,
"partnerPartCode": "SKU-A-001",
"price": 139.9,
"targetMargin": null,
"totalCost": null
}
],
"notFound": {
"items": [
{
"partnerPartCode": "SKU-Z-999",
"price": null,
"targetMargin": null,
"totalCost": null
}
]
}
} Used in
Related endpoints
Generated from the public API collection, published on 2026-09-04: api-docs.cws.digital.