1-2. 批量创建本地订单--
批量创建本地订单(接口)
接口说明
批量创建本地订单接口
URL | |||
---|---|---|---|
接口功能 |
| ||
支持格式 | JSON | 开发人员 | |
请求方式 | POST | 发布日期 |
请求参数
参数 | 必填 | 类型 | 说明 |
---|---|---|---|
is_urgent | 选填 | BOOL | 是否紧急订单 |
delivery_service_id | 必填 | INT | 邮递服务ID ,参考接口: 获取邮递服务 |
return_consignment-return_consignment_action_type | 选填 | VARCHAR | 退货服务种类 ( CONTAINER: 上架, ) |
sales_reference | 选填 | VARCHAR | 销售跟踪号 |
sales_price | 必填 | VARCHAR | 销售价格 |
sales_order_id | 选填 | VARCHAR | 销售订单ID(YODEL服务必填) |
custom_identity_reference | 选填 | VARCHAR | 自定义唯一标识 |
omp_name | 选填 | VARCHAR | 销售平台名称,(必须是英文), ebay, amazon 等(royal mail,yodel 出口必填) |
omp_vat_number | 选填 英国发往非英国且公司不为空(“business_name“字段)的DPD订单 要求必填 | VARCHAR | 销售平台VAT号 |
shipper_eori | 选填 英国发往EU必填 英国发往非英国的DPD服务必填 | VARCHAR | EORI号(royal mail,dpd 出口必填), 是国家代码+12位数字,例如: GB000000777888, 必须提前在鸟系统中备案, 详询客服。 参考接口: 获取VAT账号 |
contact | 选填 | VARCHAR | 联系人 |
business_name | 选填 | VARCHAR | 公司名称 |
address_line1 | 选填 | VARCHAR | 地址行1 |
address_line2 | 选填 | VARCHAR | 地址行2 |
address_line3 | 选填 | VARCHAR | 地址行3 |
city | 选填 | VARCHAR | 城市 |
county | 选填 | VARCHAR | 省/郡 |
post_code | 选填 | VARCHAR | 邮编 |
country_iso | 必填 | CHAR(2) | 国家编码 |
telephone | 选填 | VARCHAR | 电话号码 |
选填 | VARCHAR | 电子邮箱 | |
special_instruction | 选填 | VARCHAR | 备注1 |
neighbour_instruction | 选填 | VARCHAR | 备注2 |
reason_for_expot | 选填 | VARCHAR | 出口原因, 值 【SALE:销售;RETURNREPLACEMENT :退换; GIFT:礼物】dpd 出口必填 |
content_type | 选填 | VARCHAR | 包裹类型,值【GIFT 礼物;DOCUMENTS 文件和 OTHER 其他】 |
type | 选填 | VARCHAR | 订单类型(LOCAL) |
omp_vat_number | 选填 | VARCHAR | 销售平台的vat号(yodel 出口必填) |
product_id | 必填 | INT(10) | 产品id , 参考接口: 产品的增删改查 |
consignment_id | 必填 | BINGINT(16) | 订单ID |
product_type | 选填 | VARCHAR | 产品类型,默认“NORMAL” |
quantity | 必填 | INT | 数量 |
is_directional_shared_product | 选填 | BOOL | 是否定向共享产品 |
ebay_transaction_id | 选填 | VARCHAR | eBay订单交易号 |
ebay_item_no | 选填 | VARCHAR | eBay产品ID |
sales_price | 选填 | FLOAT(‘%.2f’) | 销售价格 |
receiver_eori | 收件人EORI | 选填(DPD服务按要求必填) | 英国发往非英国且公司不为空(“business_name“字段)的DPD订单 要求必填 |
receiver_pid_number | 收件人个人证件号 | 选填(DPD服务按要求必填) | 英国发往挪威、西班牙、意大利的DPD订单 要求必填 |
is_compensation_for_delay | 选填 | BOOL | 是否需要“晚必赔”服务 (只支持部分邮递服务,且偏远地区除外)传0/1,默认为0,非0传1 |
返回字段
返回字段 | 字段类型 | 说明 |
---|---|---|
commodity_code | VARCHAR | 客户专线订单包裹代码 |
total_price_customs_export | float(‘%.2f’) | 海关报关价格 |
name_customs | VARCHAR | 产品英文名称 |
total_quantity | VARCHAR | 总数量 |
weight | VARCHAR | 重量 |
price | float(‘%.2f’) | 价格 |
price_customs_export | float('%.2f') | 海关出口价格 |
period | DATA | 订单所在期间 |
total_of_consignments | float(‘%.2f’) | 总邮递费用 |
type | VARCHAR | 订单类型 |
total | int | 拣货单产品总数 |
external_code | VARCHAR | 外部服务代码 |
external_code1 | VARCHAR | 外部服务代码1 |
external_code2 | VARCHAR | 外部服务代码2 |
max_length | INT | 最大长度 |
max_width | INT | 最大宽度 |
max_depth | INT | 最大高度 |
handling_fee_first_item | float('%.2f') | 第一件产品手续费 |
handling_fee_other_item | float('%.2f') | 其他产品手续费 |
handling_fee_first_product | float('%.2f') | 第一件SKU手续费 |
handling_fee_other_product | float('%.2f') | 其他SKU手续费 |
handling_fee | float('%.2f') | 手续费 |
handling_fee_urgent_consignment | float('%.2f') | 订单紧急手续费 |
handling_fee_limit | float('%.2f') | 手续费列表 |
delivery_fee | float('%.2f') | 邮递费用 |
delivery_fee_type | int | 邮递费用类型 |
return_consignment_id | INT | 退货订单ID |
return_consignment_action_type | VARCHAR | 退货订单类型 |
return_consignment_action_name | VARCHAR | 退货服务名称 |
quantity | INT | 产品数量 |
total_price_customs_export_INTernal | float('%.3f') | 国际出口总报关价 |
battery_type_name_list | VARCHAR | 电池类型名称 |
battery_type_id_list | INT | 电池类型ID |
delivery_service_name | VARCHAR | 邮递服务名称 |
sku_count | INT | SKU数量 |
product_company_ref | VARCHAR | 批量订单产品代码 |
id | INT | 订单ID |
company_id | INT | 站点ID |
client_id | INT | 客户ID |
warehouse_id | INT | 仓库ID |
consignment_product_quantity | INT | 订单产品数量 |
consignment_product_reference | VARCHAR | 订单产品英文名称 |
delivery_service_id | INT | 邮递服务ID |
delivery_service_id_INTernal | INT | 邮递服务ID内部 |
delivery_package_size_id | INT | 包裹尺寸ID |
delivery_package_size_id_INTernal | INT | 包裹尺寸ID内部 |
total_price | float('%.2f') | 产品总价格 |
total_price_INTernal | float('%.2f') | 内部总价格 |
total_cost | float('%.2f') | 产品成本 |
total_delivery_fee | float('%.2f') | 总邮递服务费用 |
total_delivery_cost | float('%.3f') | 总邮递服务成本 |
total_handling_fee | float('%.2f') | 手续费 |
total_handling_cost | float('%.3f') | 手续成本 |
length | float('%.2f') | 长 |
width | float('%.2f') | 宽 |
depth | float('%.2f') | 高 |
total_weight | float('%.2f') | 总重量 |
total_volume | float('%.2f') | 总体积 |
total_volume_weight | float('%.2f') | 总体积重 |
total_fee_weight | float('%.2f') | 计费重 |
actual_cost | float('%.2f') | 实际成本 |
guarantee_percentage | VARCHAR | 担保比例 |
contact | VARCHAR | 联系人 |
business_name | VARCHAR | 公司名称 |
address_line1 | VARCHAR | 地址行1 |
address_line2 | VARCHAR | 地址行2 |
address_line3 | VARCHAR | 地址行3 |
city | VARCHAR | 城市 |
county | VARCHAR | 省/郡 |
post_code | VARCHAR | 邮编 |
country_iso | CHAR(2) | 国家 |
telephone | VARCHAR | 电话号码 |
VARCHAR | 电子邮箱 | |
sender_contact | VARCHAR | 发件人 |
sender_business_name | VARCHAR | 发件公司名称 |
sender_address_line1 | VARCHAR | 发件地址行1 |
sender_address_line2 | VARCHAR | 发件地址行2 |
sender_address_line3 | VARCHAR | 发件地址行3 |
sender_city | VARCHAR | 发件城市 |
sender_county | VARCHAR | 发件省/郡 |
sender_post_code | VARCHAR | 发件邮编 |
sender_country_iso | CHAR(2) | 发件国家 |
sender_email | VARCHAR | 发件人电子邮箱 |
sender_telephone | CARCHAR | 发件人电话号码 |
sales_reference | VARCHAR | 销售跟踪号 |
sales_price | float('%.2f') | 销售价格 |
customs_price | float('%.2f') | 报关价格 |
sales_order_id | VARCHAR | 销售订单ID |
custom_identity_reference | VARCHAR | 自定义唯一标识 |
omp_name | VARCHAR | 销售平台名称 |
omp_vat_number | VARCHAR | 销售平台vat号 |
shipper_eori | VARCHAR | eori号 |
payment_reference | VARCHAR | 付款凭证 |
delivery_reference | VARCHAR | 运输跟踪号 |
tracking_reference | VARCHAR | 17tarck运输跟踪号 |
special_instruction | VARCHAR | 备注1 |
neighbour_instruction | VARCHAR | 备注2 |
temp_consignment_info_id | VARCHAR | 批量订单ID |
is_urgent | BOOL | 是否为紧急订单 |
is_forced_delivery_service | BOOL | 是否强制选择一种邮递服务 |
create_time | DATATIME | 创建时间 |
finish_time | DATATIME | 完成时间 |
arrive_time | DATATIME | 抵达时间 |
update_time | DATATIME | 更新时间 |
status | VARCHAR | 订单状态 |
stock_status | VARCHAR | 库存状态 |
reason_for_expot | VARCHAR | 出口原因 |
content_type | VARCHAR | 包裹类型 |
primary_keys | VARCHAR(ID) | 主键 |
count | INT | 产品数量 |
product_customs_name | VARCHAR | 海关属性名称 |
product_weight | FLOAT(‘%.2f’) | 产品重量 |
total_price_customs_export | FLOAT(‘%.3f’) | 总出口报关价 |
product_client_ref | VARCHAR | 产品SKU |
id | INT | 订单产品列表ID |
product_id | INT | 产品ID |
consignment_id | INT | 订单ID |
接口示例
接口请求示例
地址:https://test.birdsystem.co.uk/client/consignment/post-pending-consignment-with-products-json
{
"company_id":"{{bs.default_company_id}}",
"api_key":"{{bs.default_api_key}}"
}
接口请求参数示例
[
{
"contact": "yuhao",
"business_name": "FN",
"address_line1": "DPF4",
"address_line2": "D474",
"address_line3": null,
"city": "Atlanta",
"county": "Georgia",
"post_code": "30309",
"country_iso": "CN",
"telephone": "01704 226830",
"email": null,
"delivery_service_id": "5315",
"sales_reference": "2",
"sales_order_id": "110222319566-0",
"special_instruction": null,
"type":"LOCAL",
"products":[
{"id":1,"quantity":1,"sales_price":"10"}
],
"omp_name": "ebay",
"omp_vat_number": "1",
"shipper_eori": "191966856000",
"reason_for_export": "Sale",
"content_type": "Gift",
"ioss_vat_number":"",
"receiver_eori":"1",
"receiver_pid_number":"",
"is_compensation_for_delay": "1"
}
]
接口返回示例
{
"success": true,
"data": [
{
"id": 2111050020000095,
"company_id": 2,
"client_id": 1,
"warehouse_id": null,
"consignment_product_quantity": "1",
"consignment_product_reference": "1",
"delivery_service_id": 5315,
"delivery_service_id_internal": 5315,
"delivery_package_size_id": 958,
"total_price": "0.00",
"total_sales_price": "10.00",
"total_delivery_fee": "1.00",
"total_handling_fee": "0.00",
"length": "0.00",
"width": "0.00",
"depth": "0.00",
"total_weight": "50.00",
"total_volume": "504000.00",
"total_volume_weight": "504000.0000",
"total_fee_weight": "50.0000",
"guarantee_percentage": "0.00",
"contact": "yuhao",
"business_name": "FN",
"address_line1": "DPF4",
"address_line2": "D474",
"address_line3": null,
"city": "Atlanta",
"county": "Georgia",
"post_code": "30309",
"country_iso": "CN",
"telephone": "01704 226830",
"email": null,
"sender_contact": null,
"sender_business_name": null,
"sender_address_line1": null,
"sender_address_line2": null,
"sender_address_line3": null,
"sender_city": null,
"sender_county": null,
"sender_post_code": null,
"sender_country_iso": null,
"sender_email": null,
"sender_telephone": null,
"sales_reference": "2",
"sales_price": "0.000",
"customs_price": "2.000",
"sales_order_id": null,
"custom_identity_reference": null,
"payment_reference": null,
"delivery_reference": null,
"tracking_reference": null,
"special_instruction": null,
"neighbour_instruction": null,
"omp_name": "ebay",
"omp_vat_number": "1",
"shipper_eori": "191966856000",
"receiver_eori": "1",
"receiver_pid_number": null,
"ioss_vat_number": null,
"temp_consignment_info_id": null,
"is_urgent": "0",
"is_forced_delivery_service": "0",
"create_time": "2021-11-05 18:19:53",
"finish_time": null,
"arrive_time": null,
"update_time": "2021-11-05 18:19:53",
"type": "LOCAL",
"status": "PENDING",
"stock_status": "ONLY_ORI_STOCK_ENOUGH",
"reason_for_export": "SALE",
"content_type": "GIFT",
"is_hide_delivery_reference_to_consignment": "0",
"delivery_service_is_signature": "1",
"delivery_service_is_tracking": "0"
}
],
"moduleName": "client"
}
line: 创建失败的时候, 会告知是哪一个line出错.
data是创建成功的订单号和跟踪号的键值对 json对象
返回异常示例