Model phản hồi Order API
Các kiểu trong packages/shared/src/ (order-preview-result.ts, order-create-result.ts, trade.ts, logistics-trace.ts). Tất cả số tiền: fen.
StandardOrderPreviewResult {#standard-order-preview-result}
Từ order preview.
| Field | Type | Description |
|---|---|---|
success | boolean | false khi dòng hàng không thể mua; kiểm tra unavailable_lines |
total.payment | Money | Tổng cần thanh toán |
total.shipping | Money | Phần vận chuyển nội địa |
sellers[] | array | Nhóm theo người bán với lines[], phí |
unavailable_lines[] | array | Validate hoặc tồn kho thất bại |
trade_types[] | array | Chỉ 1688 |
promotions | object | Khuyến mãi 1688 khi có |
StandardOrderCreateResult {#standard-order-create-result}
| Field | Type | Description |
|---|---|---|
order_id | string | Dùng cho pay, detail, trace |
total.payment | Money | Số tiền cần thanh toán |
order_list[] | array | Sub-orders / tách theo người bán |
failed_offers[] | array | Có thể create một phần với success: true |
outer_purchase_id | string | Idempotency key Taobao |
payment_url | string | URL thanh toán Taobao tùy chọn |
StandardOrderPayResult {#standard-order-pay-result}
| Field | Description |
|---|---|
success | Thanh toán được chấp nhận |
pay_channel | Phương thức thanh toán 1688 |
error_code / error_message | Khi success: false |
StandardOrderDetail {#standard-order-detail}
| Field | Description |
|---|---|
status | ví dụ wait_payment, wait_shipment, shipped |
refund_status | Chỉ đọc; refund APIs không public |
amounts | total, product_total, shipping_fee, refund (fen) |
line_items[] | Dòng sản phẩm với sku_specs, status |
times | created_at, paid_at, shipped_at, … |
domestic_parcels[] | Chế độ kho → fulfillment |
UnifiedLogisticsTrace {#unified-logistics-trace}
Từ domestic trace.
| Field | Description |
|---|---|
packages[] | tracking_number, carrier, steps[] |
cross_border_packages[] | Node xuyên biên giới 1688 — không phải fulfillment quốc tế |
StandardOrderCancelResult {#standard-order-cancel-result}
| Field | Description |
|---|---|
success | Hủy được chấp nhận (có thể vẫn đang xử lý) |
pending | Hủy bất đồng bộ Taobao |
sub_order_ids | Id bị ảnh hưởng khi hủy một phần |