Get Order

Get a single order detail.


Resource URL

https://oms.sokochan.com/api/1.0/orders/{id}


Parameter(s)

NameDescriptionTypeLength
id
Required
Sokochan order code or External ID
(Please prefix External ID with the @ symbol).
string50
curl -X GET -H "Authorization: Basic ZnJlZDpmcmVk="\
"https://oms.sokochan.com/api/1.0/orders/@00100001"
curl -X GET -H "Authorization: Basic ZnJlZDpmcmVk="\
"https://oms.sokochan.com/api/1.0/orders/1610-006-00004"
{
  "external_id": "111016-00004",
  "order_code": "1610-006-00004",
  "order_number": "SH000004",
  "comment": "ใส่ถงใสด้วย",
  "special_order" : "คำสั่งพิเศษ",
  "representative":"Agent 01",
  "cod_amount": "258.50",
  "insert_qty": "0",
  "wrap": 1,
  "shipping": "EMS",
  "tracking_no": "ABCD12367890",
  "package": "BOX-C",
  "package_width": 20,
  "package_length": 30,
  "package_height": 11,
  "weight" : 200,
  "status": "pending",
  "shipping_status": "pending",
  "created": "2016-10-18 15:02:51",
  "updated": "2016-10-18 15:02:51",
  "customer": {
    "name": "นายรัก การเรียนรู้",
    "address": "0000/00 เทิคราชัน สีกัน ดอนเมือง",
    "district": "ดอนเมือง",
    "province": "กรุงเทพ",
    "postal_code": "10210",
    "mobile_no": "",
    "phone_no" : "",
    "email": ""
  },
  "order_items": [
    {
      "item_number": "EU004",
      "item_sku": "10755251_3773070",
      "item_code": "00600012",
      "item_name": "EU004",
      "item_qty": "1"
    }
  ],
  "order_history": [
    {
        "date_time": "18/10/2559 15:02",
        "location": "Demo Merchant",
        "status": "สร้างออเดอร์ / Order Created",
        "remark": "1706-044-00010",
        "timestamp": 1497927458
    },
    {
        "date_time": "18/10/2559 15:10",
        "location": "SKC WH1 (Warehouse)",
        "status": "เข้าสู่กระบวนการ / Order Processed",
        "remark": "",
        "timestamp": 1497927610
    },
    {
        "date_time": "18/10/2559 15:11",
        "location": "SKC WH1 (Warehouse)",
        "status": "หยิบออเดอร์ / Order Picked",
        "remark": "",
        "timestamp": 1497927729
    },
    {
        "date_time": "18/10/2559 15:13",
        "location": "SKC WH1 (Warehouse)",
        "status": "แพ็คออเดอร์ / Order Packed",
        "remark": "",
        "timestamp": 1497928015
    },
    {
        "date_time": "18/10/2559 15:30",
        "location": "SKC WH1 (Warehouse)",
        "status": "จัดส่งโดย / Shipped via KND",
        "remark": "CSKC200004986",
        "timestamp": 1497942715
    },
    {
        "datetime": "18/10/2559 16:00",
        "location": "",
        "status_title": "พัสดุถึงศูนย์คัดแยกสินค้า",
        "remark": "",
        "status_code": "102"
    },
    {
        "datetime": "18/10/2559 16:09",
        "location": "Bangkok",
        "status_title": "เคอรี่เข้ารับพัสดุแล้ว",
        "remark": "",
        "status_code": "010"
    },
    {
        "datetime": "19/10/2559 07:27",
        "location": "Bangkok",
        "status_title": "พัสดุถึงสาขาปลายทาง",
        "remark": "",
        "status_code": "103"
    },
    {
        "datetime": "19/10/2559 07:32",
        "location": "Bangkok",
        "status_title": "พัสดุรอนำส่ง",
        "remark": "",
        "status_code": "045"
    },
    {
        "datetime": "19/10/2559 10:19",
        "location": "Bangkok",
        "status_title": "ปลายทางได้รับเรียบร้อยแล้ว",
        "remark": "ชื่อผู้รับ สัณหณัฐ",
        "status_code": "POD"
    }
  ],
  "billing": {
      "no_of_item_1": 1,
      "no_of_item_2": 0,
      "no_of_item_3": 0,
      "picking_fee": 9,
      "packing_fee": 5,
      "charge_bubble_wrap": 0,
      "charge_insert_item": 0,
      "shipping_fee": 42,
      "cod_fee": 0,
      "total_fee": 56
  }
}
		

Documentation

The fields of the result have the following type and meaning:

NameDescriptionTypeLength
external_idExternal ID is a unique key that allows you to link Sokochan order with the Order ID from your system.string50
order_number
Order numberstring20
comment
Order comment.string50
special_order
Special requirement to this order.string50
representative
Your representativestring50
cod_amount
COD amountdecimal7,2
insert_qty
Insert-item quantitynumber2
wrap
Wrap is 1. No wrap is 0.number1
shipping The shipping method code.
  • EMS is ไปรษณีย์ไทย Express / ThaiPost EMS
  • REG is ไปรษณีย์ไทย ลงทะเบียน / ThaiPost Registered
  • KND is Kerry Express (วันรุ่งขึ้น/Next Day)
  • K2D is Kerry Express (2 วัน/2 Day)
  • KSD is Kerry Express (ส่งภายในวันเดียว)
string 3
tracking_no
Tracking No.string20
package
Order packagestring6
package_width
Order package width (cm.)number4
package_length
Order package length (cm.)number4
package_height
Order package height (cm.)number4
weight
Order weight (g.)string20
created
Created Date/Timedatetime-
updated
Updated Date/Timedatetime-
status
Order Status
  • draft
  • pending
  • processed
  • picked
  • packed
  • shipped
  • cancelled
string 30
shipping_status
Order Status
  • pending
  • shipping
  • delivered
  • delay
string 30
customerCustomer object
order_items[]Array of item(s) in order
order_history[]Array of history item
billingBilling object

Customer Object

NameDescriptionTypeLength
nameCustomer full namestring200
addressCustomer addressstring255
district
District namestring50
provinceProvince namestring50
postal_codePostal Codestring20
mobile_no
Mobile numberstring50
phone_no
Phone numberstring20
email
Emailstring180

Order Item Object

NameDescriptionTypeLength
item_sku
Item SKUstring60
item_code
Item codestring60
item_name
Item namestring100
item_qty
Item quantitynumber11

History Item Object

NameDescriptionTypeLength
date_time
Display date time (fixed format)number30
location
Locationstring180
remark
Remarkstring180
timestmap
Unix timestamptimestamp-

Billing Object

NameDescriptionTypeLength
no_of_item_1
No. of 1st itemnumber-
no_of_item_2
No. of item 2-10number-
no_of_item_3
No. of item 11+number-
picking_fee
Picking Feedecimal-
packing_fee
Packing Feedecimal-
charge_bubble_wrap
Bubble wrap chargenumber1
charge_insert_time
Insert item chargetimestamp-
shipping_fee
Shipping Feedecimal-
cod_fee
COD Feedecimal-
total_fee
Total Feedecimal-