Order Create Self Logistics V2
POST: https://salework.net/api/open/stock/v2
Tạo đơn trong Salework Kho Vận và liên kết với các đơn vị vận chuyển
Request Headers
client-id: 123456
token: 50000601c30atpedfgu3LVvik87Ixlsvle3mSoB7701ceb156fPunYZ43GBgRequest Body
{
"method": "orderCreateSelfLogistics",
"params": {
"warehouse_id": "warehouse_id",
"order": {
"selected_payment": "cash",
"price_policy": "retail_price",
"discount": 0,
"discount_type": "VND",
"prepaid": 0,
"note": "This is order note!",
"complete_now": false
},
"products": [
{
"productCode": "PRODUCT_CODE",
"amount": 1
}
],
"customer": {
"name": "John Doe",
"phone": "0123456789",
"phone_alt": "",
"address": "123 ABC Street",
"province_id": "01",
"district_id": "011",
"ward_id": "00111",
"note": "This is customer note!",
"use_new_address": false,
"buyer_invoice": {}
},
"delivery": {
"logistic": "JNT",
"delivery_fee_paid_by": 1,
"shipping_fee": 111,
"additional_fee": 222,
"note": "This is delivery note!",
"package": {
"height": 10,
"width": 10,
"length": 10,
"weight": 0.2
}
}
}
}Response Body
Parameters
warehouse_id
string
yes
order
object
yes
selected_payment
string
yes
cash || bank_transfer || card
price_policy
string
yes
retail_price || wholesale_price
discount
number
no
discount_type
string
no
percent || VND
prepaid
number
no
Khách trả trước
note
string
no
complete_now
boolean
no
Đơn hoàn thành luôn (chỉ áp dụng với đơn hàng TVC và inStore )
productCode
string
yes
Mã sản phẩm
amount
number
yes
Số lượng
customer
object
yes
Thông tin người mua
name
string
yes
phone
number
yes
address
string
yes
district_id
number
no
Mã huyện (áp dụng với địa chỉ hành chính 3 cấp)
ward_id
number
yes
Mã xã
note
string
no
Ghi chú đơn hàng
use_new_address
boolean
no
yes : sử dụng địa chỉ hành chính mới
no : yêu cầu district_id có giá trị hợp lệ
delivery
object
yes
logistic
string
yes
GHN, GHTK, JNT, CNTSHIP, SUPERSHIP, Viettel Post, Shopee Express: các đơn vị vận chuyển được hỗ trợ
TVC: đơn tự vận chuyển
inStore: bán tại cửa hàng
delivery_fee_paid_by
number
yes
Bên trả phí vận chuyển:
1: Người bán
2: Người mua
shipping_fee
number
yes
Phí vận chuyển
additional_fee
number
yes
Phí khác
note
string
no
Ghi chú vận chuyển
package
object
yes
Thông tin đóng gói đơn hàng
height
number
yes
width
number
yes
length
number
yes
weight
number
yes
Last updated