Get Order

Get a single order detail.


Resource URL

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


Parameter(s)

Name Description Type Length
id
Required
Sokochan order code or External ID
(Please prefix External ID with the @ symbol).
string 50
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
  },
  "attributes" : [],
}
		

Documentation

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

Name Description Type Length
external_id External ID is a unique key that allows you to link Sokochan order with the Order ID from your system. string 50
order_number
Order number string 20
comment
Order comment. string 50
special_order
Special requirement to this order. string 50
representative
Your representative string 50
cod_amount
COD amount decimal 7,2
insert_qty
Insert-item quantity number 2
wrap
Wrap is 1. No wrap is 0. number 1
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. string 20
package
Order package string 6
package_width
Order package width (cm.) number 4
package_length
Order package length (cm.) number 4
package_height
Order package height (cm.) number 4
weight
Order weight (g.) string 20
created
Created Date/Time datetime -
updated
Updated Date/Time datetime -
status
Order Status
  • draft
  • pending
  • processed
  • picked
  • packed
  • shipped
  • cancelled
string 30
shipping_status
Order Status
  • pending
  • shipping
  • delivered
  • delay
string 30
customer Customer object
order_items[] Array of item(s) in order
order_history[] Array of history item
billing Billing object
attributes[] Array of order atttributes

Customer Object

Name Description Type Length
name Customer full name string 200
address Customer address string 255
district
District name string 50
province Province name string 50
postal_code Postal Code string 20
mobile_no
Mobile number string 50
phone_no
Phone number string 20
email
Email string 180

Order Item Object

Name Description Type Length
item_sku
Item SKU string 60
item_code
Item code string 60
item_name
Item name string 100
item_qty
Item quantity number 11

History Item Object

Name Description Type Length
date_time
Display date time (fixed format) number 30
location
Location string 180
remark
Remark string 180
timestmap
Unix timestamp timestamp -

Billing Object

Name Description Type Length
no_of_item_1
No. of 1st item number -
no_of_item_2
No. of item 2-10 number -
no_of_item_3
No. of item 11+ number -
picking_fee
Picking Fee decimal -
packing_fee
Packing Fee decimal -
charge_bubble_wrap
Bubble wrap charge number 1
charge_insert_time
Insert item charge timestamp -
shipping_fee
Shipping Fee decimal -
cod_fee
COD Fee decimal -
total_fee
Total Fee decimal -