ShopChill Partner Center
GET

orders-dt

เอกสารถูกนำเข้าจากไฟล์ Postman collection อัตโนมัติ

ใช้สำหรับดึงรายละเอียดคำสั่งซื้อของร้านค้า โดยระบุหมายเลขคำสั่งซื้อ (order_number) ที่ต้องการ

ระบบจะตรวจสอบว่าคำสั่งซื้อดังกล่าวเป็นของร้านค้าที่กำลังเรียก API เท่านั้น

Request

  • Method: GET

  • URL: {{api_url}}/v1/orders/get_dt

  • View common parameters

Query params

PropertiesTypeRequiredDescription
app_keystringYesPartner application key
app_secretstringYesPartner application secret
shop_idstringYesShop ID
access_tokenstringYesPartner access token
order_numberstringYesหมายเลขคำสั่งซื้อที่ต้องการดึงข้อมูล

Request example

Example response

Status: 200

Response fields

Order

PropertiesTypeDescription
statusbooleanสถานะการทำงานของ API
codestringResponse code
messagestringรายละเอียดผลลัพธ์
data.order_idintegerInternal order ID
data.order_numberstringหมายเลขคำสั่งซื้อ
data.buyer_user_idintegerUser ID ของผู้ซื้อ
data.buyer_user_namestring / nullชื่อผู้ซื้อ
data.buyer_usernamestring / nullUsername ของผู้ซื้อ
data.order_amountdecimal / stringมูลค่าสินค้ารวมก่อนค่าจัดส่งและส่วนลดตามข้อมูลของคำสั่งซื้อ
data.shipping_feedecimal / stringค่าจัดส่ง
data.discountdecimal / stringส่วนลดของคำสั่งซื้อ
data.total_amountdecimal / stringยอดรวมของคำสั่งซื้อ
data.codintegerสถานะ COD โดย 1 หมายถึง COD และ 0 หมายถึง Non-COD
data.recipient_namestring / nullชื่อผู้รับสินค้า
data.recipient_phonestring / nullเบอร์โทรศัพท์ผู้รับสินค้า
data.recipient_addressstring / nullที่อยู่ผู้รับสินค้า
data.recipient_sub_districtstring / nullแขวง/ตำบล
data.recipient_districtstring / nullเขต/อำเภอ
data.recipient_provincestring / nullจังหวัด
data.recipient_zipcodestring / nullรหัสไปรษณีย์
data.shipment_providerstring / nullรหัสผู้ให้บริการขนส่ง
data.tracking_numberstring / nullหมายเลขติดตามพัสดุ
data.package_weightnumber / nullน้ำหนักพัสดุ
data.package_widthnumber / nullความกว้างพัสดุ
data.package_lengthnumber / nullความยาวพัสดุ
data.package_heightnumber / nullความสูงพัสดุ
data.order_statusstring / nullรหัสสถานะคำสั่งซื้อ
data.create_timeintegerเวลาที่สร้างคำสั่งซื้อในรูปแบบ Unix timestamp (seconds)
data.update_timeintegerเวลาที่คำสั่งซื้อถูกแก้ไขล่าสุดในรูปแบบ Unix timestamp (seconds)
data.order_detailsarrayรายการสินค้าในคำสั่งซื้อ
request_idstringRequest reference ID สำหรับใช้ตรวจสอบ Log หรือแจ้งปัญหา

Order details

PropertiesTypeDescription
order_detail_idintegerOrder detail ID
product_idintegerProduct ID
product_namestringชื่อสินค้า
product_skustring / nullSKU ของสินค้า
product_imagestring / nullURL รูปภาพสินค้า
option_idinteger / nullProduct option ID หากสินค้ามีตัวเลือก
option_namestring / nullชื่อตัวเลือกสินค้า
option_skustring / nullSKU ของตัวเลือกสินค้า
option_imagestring / nullURL รูปภาพของตัวเลือกสินค้า
original_pricedecimal / numberราคาขายสินค้าต่อหน่วยก่อนส่วนลดตามข้อมูลที่บันทึกในคำสั่งซื้อ
discount_pricedecimal / numberส่วนลดสินค้าต่อหน่วยตามข้อมูลที่บันทึกในคำสั่งซื้อ
product_qtyintegerจำนวนสินค้า
total_amountdecimal / numberยอดรวมของรายการสินค้า

Error response

Missing order number

หากไม่ได้ส่ง order_number หรือข้อมูลไม่ผ่าน Validation API จะคืน HTTP Status 422

Status: 422

ข้อความ Validation ที่คืนจริงอาจแตกต่างตาม Validation helper ของระบบ

Order not found

หากไม่พบ order_number ที่ระบุ หรือคำสั่งซื้อไม่ได้เป็นของร้านค้าที่กำลังเรียก API ระบบจะไม่คืนรายละเอียดคำสั่งซื้อ

Status: 404

Example