Integrate ShopChill Dropoff into your own applications
Download Postman Collection: ShopChill-Dropoff-API.postman_collection.json
ลูกค้า / Postman: ใช้ Basic Auth (Base64 ของ username:password) กับ endpoint ที่ระบุว่า “ต้อง auth”
หน้าเว็บที่ล็อกอินแล้วเรียก API เดียวกันได้ด้วย session cookie — คำขอแบบ POST/PUT/PATCH ต้องส่ง header X-CSRF-TOKEN ให้ตรงกับ meta csrf ในหน้า
Register a new shop/point of service. This endpoint is public but requires valid data.
| Field | Type | Required | Description |
|---|---|---|---|
| AUTHENTICATION & CORE | |||
| platform_name | String | Yes | ชื่อแพลตฟอร์ม (ภาษาอังกฤษและตัวเลขเท่านั้น) |
| CONTACT INFORMATION | |||
| contact_name | String | No | ชื่อผู้ติดต่อ |
| phone_number | String | No | เบอร์โทรศัพท์ |
| No | อีเมล | ||
| LOCATION & ADDRESS | |||
| address_sub_district | String | No | ตำบล / แขวง |
| address_district | String | No | อำเภอ / เขต |
| address_province | String | No | จังหวัด |
| postal_code | String | No | รหัสไปรษณีย์ |
| map_link | String | No | ลิงก์แผนที่ (Google Maps) |
| OPERATIONAL INFO | |||
| open_day_type | String | No | วันเปิดทำการ (เช่น Mon-Fri, Mon-Sun) |
| open_time | String | No | เวลาเปิด (HH:MM) |
| close_time | String | No | เวลาปิด (HH:MM) |
| FACILITIES & FEATURES | |||
| cctv_recorded | Boolean | No | มีกล้องวงจรปิดหรือไม่ |
| barcode_scanner | Boolean | No | มีเครื่องแสกนบาร์โค้ดหรือไม่ |
| has_computer | Boolean | No | มีคอมพิวเตอร์หรือไม่ |
| OPERATIONAL ASSETS (IMAGES) | |||
| store_front_image | File | No | รูปหน้าร้าน |
| storage_area_image | File | No | รูปบริเวณพื้นที่เก็บของ |
| parking_area_image | File | No | รูปที่จอดรถ |
| recommended_parking_image | File | No | รูปที่จอดรถที่แนะนำ |
| 201 Created | Member registered and username generated. |
| 422 Error | Validation failed (missing required fields or invalid format). |
เช็กสถานะหลายรายการในครั้งเดียว (public endpoint)
pickedup_date ส่งเป็น unix time จาก orders.pickedup_at (ถ้าไม่มีค่า จะได้ null) และส่ง updated_at เป็น unix time เพิ่มเติม โดย status map จาก orders.status ไป order_statuses.name
Record a new dropoff scan. Requires Authentication.
| Field | Type | Required | Description |
|---|---|---|---|
| tracking_number | String | Yes | เลข tracking หรือรหัส order (orders.tracking / orders.code) — ต้องมีในระบบหลักก่อนบันทึก |
| received_by_username | String | Yes | The username (SCDXX) of the service point |
| 201 Created | Scan recorded successfully. |
| 404 Not Found | ค่าที่ส่งไม่ตรง orders.tracking หรือ orders.code ในตารางหลัก หรือไม่พบ member — not found in main orders. |
| 409 Conflict | Tracking number already exists in the system. |
| 401 Error | Authentication failed (Check Basic Auth header). |
ดึงรายการสแกนพร้อม ผู้นำฝาก จาก orders.src_name (จับคู่ tracking หรือ code กับค่าที่สแกน) — ต้อง auth เหมือน endpoint อื่น
/api/v1/dropoff/reports/scanners — รายชื่อผู้แสกน (received_by) สำหรับ dropdown/api/v1/dropoff/reports/scans — รายงานแบบแบ่งหน้า/api/v1/dropoff/reports/scans/{dropoffOrder} — ลบรายการสแกนตาม id| พารามิเตอร์ | ค่า | หมายเหตุ |
|---|---|---|
| preset | today | week | month |
ช่วงเวลาเริ่มจันทร์–อาทิตย์สำหรับ week (เวลาไทย) |
| date_from | วันที่ (YYYY-MM-DD) | ถ้ามี date_from / date_to จะไม่ใช้ preset |
| date_to | วันที่ (YYYY-MM-DD) | — |
| scanner | string | กรองตาม received_by (ผู้แสกน) ตรงกับค่าจาก reports/scanners |
| per_page | 1–100 | ค่าเริ่มต้น 50 |
| page | integer | แบ่งหน้า |
ถ้าไม่ส่ง preset และไม่ส่งช่วงวันที่ ระบบใช้ช่วง วันนี้ (Asia/Bangkok)
อ่าน/แก้ข้อมูลเดียวกับตอนสมัคร และเปลี่ยนรหัสผ่าน — ใช้ Basic Auth (หรือ session จากเว็บพร้อม CSRF)
/api/v1/dropoff/me — ข้อมูลโปรไฟล์ (JSON)/api/v1/dropoff/profile — อัปเดตข้อมูล + รูป (multipart/form-data) ฟิลด์เหมือน register/api/v1/dropoff/password — body JSON: current_password, new_password, new_password_confirmation