Delete SKU
Description
Delete SKUs (stock keeping units) in the marketplace. The method supports both single deletion and batch deletion of multiple SKUs 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/sku/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 SKU identifiers |
| external_ids | array of strings | ["sku_1", "sku_2"] | No, if ids is provided | Array of external SKU 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": ["sku_123"]
}
{
"token": "abcdefghijklmnqrstuvwxyz",
"ids": [1, 2],
"external_ids": ["sku_3"]
}
Identification by parameter: "ids":
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<ids>1</ids>
</xml>
Identification by parameter: "external_ids":
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<external_ids>sku_123</external_ids>
</xml>
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<ids>1</ids>
<ids>2</ids>
<external_ids>sku_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 SKUs |
| error | int | Error code |
| error_text | string | Error text |