Appearance
Codes and constants
The keys and numbers used across the API. They also appear as enums in the API Reference.
Shipping types
shipping_type is one of the keys below. Combine it with is_cod:
is_cod: false(the default) uses the plain key, e.g."ems".is_cod: trueswitches to that courier's cash-on-delivery key, e.g."ems"becomesems_cod. Sending the_codkey directly works too — but thenis_codmust betrue, and a plain key withis_cod: trueis a400when the courier has no COD form.
Responses use these same keys, plus is_cod — an order booked as ems_cod comes back as "shipping_type": "ems_cod" with "is_cod": true. An order the store later switched, in the app, to a courier not on this list reads back under that courier's key; you just cannot ask for one.
The list is everything this API will book. XSelly itself carries a few more couriers, mostly small or retired ones; asking for one of those returns a 400.
shipping_type | courier | name in the XSelly app | is_cod available |
|---|---|---|---|
best | BEST Express | BEST Express | yes |
best_pickup | BEST Express [นัดรับ] | BEST Express [นัดรับ] | |
buyer_pickup | ผู้ซื้อรับด้วยตัวเอง | ผู้ซื้อรับด้วยตนเอง | |
dhl | DHL Express | DHL Express | yes |
dhl_bulky | DHL Bulky | DHL Bulky | yes |
dhl_pickup | DHL [นัดรับ] | DHL Express [นัดรับ] | |
ecopost | ปณ eCo-Post | ไปรษณีย์ eCo-Post | yes |
ems | EMS | ไปรษณีย์ด่วนพิเศษ (EMS) | yes |
ems_world | EMS World | EMS World (ระหว่างประเทศ) | |
fast_instant_delivery_pack_2_hrs | ส่งทันที (แพ็ค 2 ชั่วโมง) | ส่งทันที (แพ็ค 2 ชั่วโมง) | |
fast_instant_delivery_pack_30_mins | ส่งทันที (แพ็ค 30 นาที) | ส่งทันที (แพ็ค 30 นาที) | |
fedex | FedEx | FedEx | |
flash | FLASH Express | Flash Express | yes |
flash_bulky | Flash Bulky | Flash Bulky | yes |
flash_pickup | Flash Express [นัดรับ] | Flash Express [นัดรับ] | |
fuze | FUZE | FUZE | yes |
grab | Grab | Grab | |
inter | Inter Express Logistics | Inter Express Logistics | |
ittransport | IT Transport | IT Transport | |
jt | J&T Express | J&T Express | yes |
jt_cod_pickup | J&T Express [COD นัดรับ] | J&T Express [COD นัดรับ] | |
jt_pickup | J&T Express [นัดรับ] | J&T Express [นัดรับ] | |
kex | KEX Express | Kerry Express | yes |
kex_dropoff | KEX Express [Drop-Off] | Kerry Express [Drop-Off] | |
kex_pickup | KEX Express [นัดรับ] | Kerry Express [นัดรับ] | |
lalamove | Lalamove | Lalamove | |
lex | Lazada Express | Lazada Express | yes |
lineman | Lineman | Lineman | |
makesend | MAKESEND | MAKESEND | yes |
nim | NiM Express | NiM Express | yes |
normal | ปณ ธรรมดา | ไปรษณีย์ธรรมดา | |
other | ส่งแบบอื่นๆ | อื่นๆ | |
register | ปณ ลงทะเบียน | ไปรษณีย์ลงทะเบียน | yes |
scg | SCG EXPRESS | SCG Express | yes |
shopee_std_delivery | Shopee Standard Delivery | SPX Standard Delivery | |
shopee_std_delivery_bulky | Shopee Standard Delivery Bulky | SPX Standard Delivery Bulky | |
shopee_xpress | Shopee Xpress | SPX Express | yes |
shopee_xpress_bulky | Shopee Express Bulky | SPX Bulky | |
skootar | Skootar | Skootar | |
slow_instant_delivery | ส่งด่วน | ส่งด่วน | |
speedd | SPEED-D | SPEED-D | yes |
spx_dropoff | SPX Express [Dropoff] | SPX Express [Dropoff] | yes |
spx_pickup | SPX Express [Pickup] | SPX Express [Pickup] | yes |
store_front | ส่งมอบหน้าร้าน | ขายหน้าร้าน | |
tp | TP Logistics | TP Logistics | yes |
true | True e-Logistics | True e-Logistics | yes |
undefined | ไม่ระบุ | ไม่ระบุ | |
ups | ups | ups (United Parcel Service) | |
zto | ZTO Express | ZTO Express | yes |
One key exists only in its COD form, so send it directly with is_cod: true:
shipping_type | courier | name in the XSelly app |
|---|---|---|
spx_express_bulky_cod | SPX Bulky [COD] | SPX Bulky [COD] |
Not every courier here can be booked automatically — XShipping issues tracking numbers for the major ones (ems, ecopost, kex, flash, jt, spx_pickup, spx_dropoff), and for the rest the order is created with that shipping type and you supply the tracking number yourself. store_front, buyer_pickup and other are not couriers at all; they record that the customer collects the parcel.
Sales channels
Optional. channel tags the order with where the sale came from — it is the ช่องทางการขาย shown in the app and used in the sales reports.
| key | shown as | key | shown as | |
|---|---|---|---|---|
ai_chat | AI Chat | line_shopping | LINE SHOPPING | |
branch | สาขา | marketing | Marketing | |
claim | เคลม | others | อื่นๆ | |
consignment | ฝากขาย | repurchase | Repurchase | |
dealer | Dealer | resellers_not_yet_use_app | ตัวแทนที่ไม่ได้ใช้ XSelly | |
distributor | Distributor | robinhood | Robinhood | |
eleven_street | 11st | sales_page | Sales Page | |
event | Event | shop | หน้าร้าน | |
facebook | shopee | Shopee | ||
facebook_page | Facebook Page | shopee_food | ShopeeFood | |
foodpanda | foodpanda | shopify | Shopify | |
friend | เพื่อน | telesales | Telesales | |
grab | Grab | tiktok | TikTok Shop | |
influencer | Influencer | twitter | ||
instagram | vrich | V Rich | ||
japanesepartner | Japanese Partner | website | Website | |
lazada | Lazada | |||
line | LINE | |||
line_add | LINE @ | |||
line_man | LINE MAN |
Legal entity types
legal_entity_type says what the customer is, and with it what legal_entity_id holds. Both are only needed for a tax invoice.
An individual (legal_entity_id is a national id, เลขประจำตัวประชาชน):
| value | meaning |
|---|---|
1 | บุคคลธรรมดา — a person |
3 | ห้างหุ้นส่วนสามัญ — ordinary partnership |
4 | ร้านค้า — a shop |
5 | คณะบุคคล — group of persons |
A juristic person (legal_entity_id is a tax id, เลขประจำตัวผู้เสียภาษี):
| value | meaning |
|---|---|
11 | บริษัทจำกัด — limited company (the common one) |
12 | บริษัทมหาชนจำกัด — public limited company |
13 | ห้างหุ้นส่วนจำกัด — limited partnership |
14 | มูลนิธิ — foundation |
15 | สมาคม — association |
16 | กิจการร่วมค้า — joint venture |
19 | อื่นๆ — other |
2 | นิติบุคคล — a legacy catch-all, still stored on older addresses |
branch_type goes with these: "h" for a head office (สำนักงานใหญ่), or "b" plus a branch_number for a branch.
Order state
order_state is where the order sits in its own lifecycle.
| value | meaning |
|---|---|
101 | Waiting to be confirmed. |
102 | Confirmed by the buyer, waiting on the seller (reseller chains). |
103 | Confirmed by the seller, waiting on the buyer (reseller chains). |
109 | Confirmed. An order created through this API starts here. |
181 | Cancelled by the seller. |
182 | Cancelled by the buyer. |
183 | Cancelled by the system. |
184 | Cancelled — expired unpaid. |
Any value from 181 up means cancelled; cancel_time is then set.
Payment state
| value | meaning |
|---|---|
111 | Awaiting payment. A new order starts here. |
112 | Overpaid — more was received than the order is worth. |
113 | Both a payment and a refund are open. |
114 | A payment is recorded and waiting to be confirmed. |
115 | A refund is waiting to be confirmed. |
119 | Paid in full. payment_complete_time is set. |
Shipping state
| value | meaning |
|---|---|
121 | Nothing shipped yet. A new order starts here. |
122 | Only lines sourced from a supplier are left to ship. |
129 | Everything shipped. shipping_complete_time is set. |
