Cập nhật đơn hàng (Integration)
Chỉ cho phép cập nhật khi fulfillment_status thuộc một trong các trạng thái: on_hold, unfulfilled, payment_awaiting, ready
API : /api/integration/orders/:id.json
Method: PATCH
Request Header
| key | value |
|---|---|
| X-pawdo-access-token | API KEY |
Path Params
| key | type | required | note |
|---|---|---|---|
| id | uuid | Required | ID của đơn hàng cần cập nhật |
Request Body
- Content-Type: application/json
| key | type | required | note |
|---|---|---|---|
| skip_verify_address | boolean | Optional | Bỏ qua bước verify địa chỉ |
| shipping_address | object | Optional | Thông tin địa chỉ giao hàng |
| line_items | array object | Optional | Danh sách sản phẩm cần cập nhật |
Chi tiết field
shipping_address
| key | type | required | note |
|---|---|---|---|
| name | string | Optional | Tên người nhận |
| string | Optional | Email người nhận | |
| phone | string | Optional | Số điện thoại |
| address1 | string | Optional | Địa chỉ 1 |
| address2 | string | Optional | Địa chỉ 2 |
| city | string | Optional | Thành phố |
| state | string | Optional | Bang / tỉnh |
| country | string | Optional | Quốc gia |
| postal_code | string | Optional | Mã bưu điện |
| country_code | string | Optional | Mã quốc gia (ISO) |
| province_code | string | Optional | Mã bang / tỉnh |
| option_ship | string | Optional | Phương thức vận chuyển |
| label_ship | url | Optional | URL label shipping: : Bắt buộc cho option tiktok |
| tax | number | Optional | Thuế |
line_items(required)
| key | type | required | note |
|---|---|---|---|
| id | uuid | Required | ID của line item |
| sku | string | Optional | SKU từ hệ thống ngoài |
| system_sku | string | Required | SKU nội bộ hệ thống |
| title | string | Optional | Tên sản phẩm |
| note | string | Optional | Ghi chú |
| mockup1..mockup4 | url | Optional | URL hình mockup |
| design1..design4 | url | Optional | URL file thiết kế |
| quantity | number | Required | Số lượng sản phẩm |
Example (Request)
json
{
"skip_verify_address": true,
"shipping_address": {
"tax": 1.2,
"city": "Corryton",
"name": "John Doe",
"email": "[email protected]",
"phone": "",
"state": "Tennessee",
"country": "United States",
"address1": "6056 Whisper Ridge Lane",
"address2": "1234 Whisper Ridge Lane",
"label_ship": "https://example.pdf",
"option_ship": "standard",
"postal_code": "37721",
"country_code": "US",
"province_code": "TN"
},
"line_items": [
{
"id": "b6828234-82ec-47df-88f5-9bc9a81b6ba6",
"sku": "",
"system_sku": "QTR-XS2",
"title": "no title",
"note": "bom ne",
"mockup1": "https://example.com/mockup1.png",
"mockup2": "",
"mockup3": "",
"mockup4": "",
"design1": "https://example.com/design1.png",
"design2": "",
"design3": "",
"design4": "",
"quantity": 13
}
]
}Example (Response thành công)
json
{
"message": "order updated",
"status": true
}Nếu cần hỗ trợ thêm về thông tin hoặc cách sử dụng API, vui lòng liên hệ đội ngũ hỗ trợ Pawdo qua Facebook để được hỗ trợ.