Create Order

Create a new order.


Resource URL

https://oms.sokochan.com/api/1.0/orders


Request body

NameDescriptionTypeLength
external_id
Required
External ID is a unique key that allows you to link Sokochan order with the Order ID from your system without the need to store additional data on your side.string50
order_number
Your order number on your system.string20
comment
Order comment.string50
special_order
Special requirement to this order.string50
representative
Your representativestring50
cod_amount
COD amount (allowed on KND, K2D, KSD shipping)decimal7,2
wrap
If you need wrap the package, set it to 1. Default is 0 (no wrap)number1
shipping
Required
The shipping method code.
  • EMS is ไปรษณีย์ไทย Express / ThaiPost EMS
  • KND is Kerry Express (วันรุ่งขึ้น/Next Day)
  • K2D is Kerry Express (2 วัน/2 Day)
  • KSD is Kerry Express (ส่งภายในวันเดียว)
string 3
customer
Required
Customer detail
name
Required
Customer full namestring200
address
Required
Customer addressstring255
district
Required
District namestring50
province
Required
Province namestring50
postal_code
Required
Postcal Codestring20
mobile_no
Required
Mobile numberstring50
phone_no
Phone numberstring20
email
Emailstring180
order_items[]
Required
Array of item(s) in order
You can use [item_code, item_sku, lazada_sku, shopee_sku] in the array but all cannot be blank
item_sku Item SKU string60
item_code
Item codestring60
lazada_sku
Lazada SKUstring60
shopee_sku
Shopee SKUstring60
item_qty
Item quantitynumber11
curl -X POST -H "Authorization: Basic ZnJlZDpmcmVk="\
-H "Content-Type: application/json"\ -d '{ "external_id":"111016-00004", "order_number":"SH000004", "comment":"ใส่ถงใสด้วย", "special_order" : "คำสั่งพิเศษ", "representative":"Agent 01", "cod_amount":258.50, "wrap":1, "shipping":"EMS", "customer":{ "name": "นายรัก การเรียนรู้", "address": "0000/00 เทิคราชัน สีกัน ดอนเมือง", "district":"ดอนเมือง", "province":"กรุงเทพ", "postal_code":"10210", "mobile_no":"", "phone_no":"", "email":"" }, "order_items":[ {"item_sku":"10755251_3773070","item_code":"", "lazada_sku":"", "shopee_sku":"", "item_qty":1} ] }' "https://oms.sokochan.com/api/1.0/order"
{
  "code": 200,
  "external_id": "111016-00004",
  "order_code": "1610-006-00004",
  "created": "2016-10-18 15:02:51"
}