GetOrder
Definition
Use this call to get the list of items for a single order. It is different from GetOrders, which gets the customer details.
Request URI: https://api.sellercenter.lazada.sg?Action=GetOrder
Parameters
Field | Type | Description |
---|---|---|
Action | string | GetOrder 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. |
OrderId | long | The identifier that was assigned to the order by the Seller Center. |
Code sample
# GetOrder cURL example
# to run, update Timestamp and recompute Signature
#
url = "https://api.sg.ali-lazada.com/"
get
data-urlencode Action=GetOrder
data-urlencode OrderId=1
data-urlencode Timestamp=2015-07-01T11:11+0000
data-urlencode [email protected]
data-urlencode Version=1.0
data-urlencode Signature=d4ff93cccb165295ed8357fe42082208b781a3b576bbb7d3fe7a624270b047b9
//init request with orderId
GetOrder request = new GetOrder(6642038L);
//fire request and handle result Order
try {
GetOrderResponse response = request.execute();
System.out.println(response.getBody());
} catch (LazadaException e) {
System.out.println(e.getResponseStr());
}
Response
Name | Type | Description |
---|---|---|
OrderId | long | Identifier of this order as assigned by the Seller Center. |
CustomerFirstName | string | The customer's first name. |
CustomerLastName | string | The customer's last name. |
OrderNumber | long | The human-readable order number. |
PaymentMethod | string | The method of payment. |
Remarks | string | A human-readable remark. |
DeliveryInfo | string | Order delivery information. |
Price | float | Total amount for this order. |
GiftOption | boolean | 1 if item is a gift, and 0 if it is not. |
GiftMessage | string | Gift message as specified by the customer. |
CreatedAt | datetime | Date and time when the order was placed. |
UpdatedAt | datetime | Date and time of the last change to the order. |
AddressBilling | subsection | Node that contains additional nodes, which makes up the billing address: FirstName, LastName, Phone, Phone2, Address1, Address2, City, PostCode, and Country. |
AddressShipping | subsection | Node that contains additional nodes, which makes up the shipping address: FirstName, LastName, Phone, Phone2, Address1, Address2, City, PostCode, and Country. |
NationalRegistrationNumber | string | Required in some countries. |
ExtraAttributes | string | Extra attributes which were passed to the Seller Center on getMarketPlaceOrders call. It is JSON string which client should parse it. |
ItemsCount | integer | Number of items in the order. |
Statuses | array | Unique status of the items in the order (hint: you can find all of the different status codes in the response example). |
TaxCode | string | (For Thailand and Vietnam only) The customer's VAT tax code, provided by the customer when placing the order. |
BranchNumber | string | (For Thailand only) The tax branch code for corporate customers, provided by the customer when placing the order. |
Result sample
A success result sample is as follows.
<?xml version="1.0" encoding="UTF-8"?>
<SuccessResponse>
<Head>
<RequestId/>
<RequestAction>GetOrder</RequestAction>
<ResponseType>Order</ResponseType>
<Timestamp>2015-08-03T11:16:14+0200</Timestamp>
</Head>
<Body>
<Orders>
<Order>
<OrderId>190</OrderId>
<CustomerFirstName>ภัทรนิดา แสนสุข</CustomerFirstName>
<CustomerLastName/>
<OrderNumber>300125759</OrderNumber>
<PaymentMethod>CashOnDelivery</PaymentMethod>
<Remarks/>
<DeliveryInfo/>
<Price>100.00</Price>
<GiftOption>0</GiftOption>
<GiftMessage/>
<VoucherCode/>
<CreatedAt>2015-03-24 16:09:22</CreatedAt>
<UpdatedAt>2015-03-24 16:09:22</UpdatedAt>
<AddressBilling>
<FirstName>First Name 3 Test</FirstName>
<LastName>First Name 3 Test</LastName>
<Phone>0925090880</Phone>
<Phone2/>
<Address1>Configure this street and number</Address1>
<Address2/>
<Address3/>
<Address4/>
<Address5/>
<CustomerEmail>[email protected]</CustomerEmail>
<City>Configure city</City>
<Ward/>
<Region/>
<PostCode>33333</PostCode>
<Country>Thailand</Country>
</AddressBilling>
<AddressShipping>
<FirstName>??????? ???????????</FirstName>
<LastName/>
<Phone>0925090880</Phone>
<Phone2/>
<Address1>121 ???? 4 </Address1>
<Address2>?????????????????</Address2>
<Address3/>
<Address4/>
<Address5/>
<CustomerEmail>[email protected]</CustomerEmail>
<City>?????????????-??????-10400</City>
<Ward/>
<Region/>
<PostCode>10400</PostCode>
<Country>Thailand</Country>
</AddressShipping>
<NationalRegistrationNumber/>
<ItemsCount>12</ItemsCount>
<ExtraAttributes>{"TaxInvoiceRequested":"true"}</ExtraAttributes>
<Statuses>
<Status>shipped</Status>
<Status>returned</Status>
<Status>return_waiting_for_approval</Status>
<Status>return_shipped_by_customer</Status>
<Status>return_rejected</Status>
<Status>ready_to_ship</Status>
<Status>processing</Status>
<Status>pending</Status>
<Status>failed</Status>
<Status>delivered</Status>
<Status>canceled</Status>
</Statuses>
<TaxCode>1234</TaxCode>
<BranchNumber>2222</BranchNumber>
</Order>
</Orders>
</Body>
</SuccessResponse>
Error messages
Error code | Message |
---|---|
16 | E016: "%s" Invalid Order ID |
Updated almost 7 years ago