GetFailureReasons
Definition
Use this call to get additional error context for SetStatusToCanceled.
Request URI: https://api.sellercenter.lazada.sg?Action=GetFailureReasons
Parameters
Field | Type | Description |
---|---|---|
Action | string | GetFailureReasons 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 | long | 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
GetFailureReasons cURL example
# to run, update Timestamp and recompute Signature
#
url = "https://api.sg.ali-lazada.com/"
get
data-urlencode Action=GetFailureReasons
data-urlencode Timestamp=2015-07-01T11:11+0000
data-urlencode [email protected]
data-urlencode Version=1.0
data-urlencode Signature=d4ff93cccb165295ed8357fe42082208b781a3b576bbb7d3fe7a624270b047b9
GetFailureReasons request = new GetFailureReasons();
try {
GetFailureReasonsResponse response = request.execute();
for (FailureReason reason: response.getBody()) {
System.out.println(reason);
}
} catch (LazadaException e) {
System.out.println(e.getResponseStr());
}
Response
The reason for each failure is given inside the following elements of the XML response.
Name | Type | Description |
---|---|---|
Type | string | Type of failure. Possible values are 'canceled', 'failed' and 'returned'. |
ReasonId | long | ID of the failure reason, which is used by SetStatusToCanceled. |
Name | string | Short description of the failure reason. |
Result sample
<?xml version="1.0" encoding="UTF-8"?>
<SuccessResponse>
<Head>
<RequestId></RequestId>
<RequestAction>GetFailureReasons</RequestAction>
<ResponseType>Reasons</ResponseType>
<Timestamp>2013-08-27T14:44:13+0000</Timestamp>
</Head>
<Body>
<Reasons>
<Reason>
<Type>canceled</Type>
<Name>Out of stock</Name>
<ReasonId>15</ReasonId>
</Reason>
<Reason>
<Type>canceled</Type>
<Name>Wrong Price or Pricing Error</Name>
<ReasonId>21</ReasonId>
</Reason>
</Reasons>
</Body>
</SuccessResponse>
Error messages
No specific errors.
Updated almost 7 years ago