Delete products
Description
Delete products in the marketplace. The method supports both single deletion and batch deletion of multiple products in one request.
To delete, you must use a token for which a role with the appropriate access rights is assigned.
Request URL
Method: POST
https://example.com/api/v1.1/market/products/delete
Request parameters
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
| ids | array of integers | [1, 2, 3] | No, if external_ids is provided | Array of internal product identifiers |
| external_ids | array of strings | ["product_1", "product_2"] | No, if ids is provided | Array of external product identifiers |
Request example
- Single JSON
- Batch JSON
- Single XML
- Batch XML
Identification by parameter: "ids":
{
"token": "abcdefghijklmnqrstuvwxyz",
"ids": [1]
}
Identification by parameter: "external_ids":
{
"token": "abcdefghijklmnqrstuvwxyz",
"external_ids": ["product_123"]
}
{
"token": "abcdefghijklmnqrstuvwxyz",
"ids": [1, 2],
"external_ids": ["product_3"]
}
Identification by parameter: "ids":
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<ids>1</ids>
</xml>
Identification by parameter: "external_ids":
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<external_ids>product_123</external_ids>
</xml>
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<ids>1</ids>
<ids>2</ids>
<external_ids>product_3</external_ids>
</xml>
Response example
- JSON
- XML
{
"deleted_count": 2,
"error": 0,
"error_text": ""
}
<xml>
<deleted_count>2</deleted_count>
<error>0</error>
<error_text></error_text>
</xml>
Response parameters
| Parameter | Type | Description |
|---|---|---|
| deleted_count | int | Number of actually deleted products |
| error | int | Error code |
| error_text | string | Error text |