RemoveProduct
Definition
Use this call to remove an existing product. You can remove some SKUs in one product, or remove all SKUs in one product. System supports a maximum number of 50 SellerSkus in one request.
Request URI: https://api.sellercenter.lazada.sg?Action=RemoveProduct
Parameters
Field | Type | Description |
---|---|---|
Action | string | RemoveProduct Name of the API that is to be called. Mandatory. |
Format | string | The response format, with XML as the default. Can be XML or JSON. Optional. |
Timestamp | datetime | The current time in ISO8601 format (e.g., Timestamp=2016-04-01T10:00:00+02:00 for Berlin). Mandatory. |
UserID | string | The ID of the user making the call. Mandatory. |
Version | string | The API version against which this call is to be executed. The current version is "1.0". Mandatory. |
Signature | string | The cryptographic signature, authenticating the request. You must create this value by computing the SHA256 hash of the request, using the API key of the user specified in the UserID parameter. Mandatory. |
Code sample
# RemoveProduct cURL example
# to run, update Timestamp and recompute Signature
#
url = "https://api.sg.ali-lazada.com/"
post
data-urlencode Action=RemoveProduct
data-urlencode Timestamp=2016-07-18T11:11+0000
data-urlencode [email protected]
data-urlencode Version=1.0
data-urlencode Signature=9ade00fb4b9ab9ed1b8a4d189f1a13e1029edc25dd963235480ec69226fd9f39
Request body
The following request body shows how to remove some SKUs that belong to an existing product.
<?xml version="1.0" encoding="UTF-8" ?>
<Request>
<Product>
<Skus>
<Sku>
<SellerSku>Apple-SG-Black-128G</SellerSku>
<SellerSku>Apple-SG-Glod-64G</SellerSku>
<SellerSku>Apple-SG-RoseGlod-128G</SellerSku>
</Sku>
</Skus>
</Product>
</Request>
try {
//construct request by seller sku list
RemoveProduct request = new RemoveProduct(Arrays.asList("yucheng-test-sku-2017020305",
"yucheng-test-sku-2017020306"));
ModifyProductResponse response = request.execute();
System.out.println(String.format("RemoveProduct succeeded?%b",response.getBody()));
} catch (LazadaException e) {
System.out.println(e.getResponseStr());
}
Business parameters
Name | Type | Description |
---|---|---|
Skus | subsection | An array contains at least one SKU. Mandatory |
SellerSku | string | A unique identifier for the product within the Seller Center instance that is to be added to the system. This identifier is usually freely assigned. Harmonized identifiers, such as UPC or EAN can be set via ProductId. Mandatory |
Result sample
A success example is as follows.
<?xml version="1.0" encoding="UTF-8"?>
<SuccessResponse>
<Head>
<RequestId/>
<RequestAction>RemoveProduct</RequestAction>
<ResponseType>Product</ResponseType>
<Timestamp>2016-07-07T20:12:14+0700</Timestamp>
</Head>
<Body/>
</SuccessResponse>
{
"SuccessResponse": {
"Head": {
"RequestId": "",
"RequestAction": "RemoveProduct",
"ResponseType": "Product",
"Timestamp": "2016-07-07T20:12:14+0700"
},
"Body": {
"Warnings": []
}
}
}
Error messages
Error code | Message |
---|---|
5 | E005: Invalid Request Format |
6 | E006: Unexpected internal error |
30 | E030: Empty Request |
204 | E204: Too many SKU in one request |
503 | E503: Remove product failed |
1000 | Internal Application Error |
Updated over 6 years ago