3-1-1. 创建订单

3-1-1. 创建订单

接口说明:

url

接口功能

单个创建代理专线订单

支持格式

JSON

开发人员

 

请求方式

POST

发布日期

 

参数说明:

参数

必选

类型

说明

参数

必选

类型

说明

delivery_service_id

Y

INT(4)

请求的服务ID,即服务代码(文档最后有获取服务代码的接口示例)获取邮递服务

sales_reference

 

VARCHAR(50)

销售跟踪号

custom_identity_reference

 

VARCHAR(50)

自定义唯一跟踪号

(注: 如果填写了,会进行检测,同一种类型同一站点下的订单,6个月内不能有重复的标识)

contact

Y

VARCHAR(100)

联系人

business_name

 

VARCHAR(255)

公司名

telephone

 

VARCHAR(50)

电话

address_line1

Y

VARCHAR(100)

地址行1

address_line2

 

VARCHAR(100)

地址行2

address_line3

 

VARCHAR(100)

地址行3

city

Y

VARCHAR(50)

城市

county

 

VARCHAR(50)

省/郡

post_code

Y

VARCHAR(10)

邮编

country_iso

Y

CHAR(2)

国家

type

Y

'AGENT_DIRECT'

订单类型

omp_vat_number

选填(DPD服务按要求必填)

VARCHAR(50)

销售平台VAT号

英国发往非英国且公司不为空(“business_name“字段)的DPD订单 要求必填

shipper_eori

选填

VARCHAR(50)

客人的EORI号

英国发往EU必填

英国发往非英国的DPD服务必填

receiver_eori

选填(DPD服务按要求必填)

VARCHAR(50)

收件人EORI

英国发往非英国且公司不为空(“business_name“字段)的DPD订单 要求必填

receiver_pid_number

选填(DPD服务按要求必填)

VARCHAR(50)

收件人个人证件号

英国发往挪威、西班牙、意大利的DPD订单 要求必填

is_compensation_for_delay

选填

BOOL

是否需要“晚必赔”服务

(只支持部分邮递服务,且偏远地区除外)传0/1,默认0,非0传1

接口请求示例:

创建代理专线订单请求示例
http://test.birdsystem.com/client/Consignment/ api_key=a0366845436b4775e6c5caef5ebc0d0d&company_id=36 delivery_service_id=5198&contact=alert wert&address_line1=123&city=calne&post_code=sn11 9dn&county_iso=GB&type=AGENT_DIRECT

接口返回示例:

{ "data": { "commodity_code": null, "total_price_customs_export": null, "name_customs": null, "total_quantity": null, "weight": null, "price": null, "price_customs_export": null, "period": null, "total_of_consignments": null, "type": "AGENT_DIRECT", "total": null, "external_code": null, "external_code1": null, "external_code2": null, "max_length": null, "max_width": null, "max_depth": null, "handling_fee_first_item": null, "handling_fee_other_item": null, "handling_fee_first_product": null, "handling_fee_other_product": null, "handling_fee": null, "handling_fee_urgent_consignment": null, "handling_fee_limit": null, "delivery_fee": null, "delivery_fee_type": null, "return_consignment_id": null, "return_consignment_action_type": null, "return_consignment_action_name": null, "quantity": null, "total_price_customs_export_internal": null, "battery_type_name_list": null, "battery_type_id_list": null, "delivery_service_name": null, "sku_count": null, "product_company_ref": null, "id": 2011250360000309, "company_id": 36, "client_id": 47, "warehouse_id": null, "consignment_product_quantity": "0", "consignment_product_reference": null, "delivery_service_id": 5198, "delivery_service_id_internal": null, "delivery_package_size_id": 432, "delivery_package_size_id_internal": 432, "total_price": "0.00", "total_price_internal": "0.00", "total_cost": "0.000", "total_delivery_fee": "0.00", "total_delivery_cost": "0.000", "total_handling_fee": "0.00", "total_handling_cost": "0.000", "length": "0.00", "width": "0.00", "depth": "0.00", "total_weight": "0.00", "total_volume": "0.00", "total_volume_weight": "0.0000", "total_fee_weight": "0.0000", "actual_cost": "0.000", "guarantee_percentage": "0.00", "contact": "bess", "business_name": null, "address_line1": "123", "address_line2": null, "address_line3": null, "city": "calne", "county": null, "post_code": "sn11 9dn", "country_iso": "GB", "telephone": null, "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": null, "sales_price": "0.000", "customs_price": "0.000", "sales_order_id": null, "custom_identity_reference": null, "payment_reference": null, "delivery_reference": "", "tracking_reference": null, "special_instruction": null, "neighbour_instruction": null, "temp_consignment_info_id": null, "is_urgent": "0", "is_forced_delivery_service": "0", "create_time": "2020-11-25 11:11:34", "finish_time": null, "arrive_time": null, "update_time": "2020-11-25 11:11:34", "status": "PREPARING", "stock_status": "ONLY_ORI_STOCK_ENOUGH", "primary_keys": [ "id" ] }, "success": true, "moduleName": "client" }

返回字段说明:

字段名

说明

字段名

说明

type

订单类型

id

订单ID号,鸟系统自动生成

company_id

站点ID

client_id

客户ID,与下单填写的api_key相关

delivery_service_id

邮递服务ID,即渠道代码

delivery_package_size_id

邮递服务包裹尺寸ID

delivery_package_size_id_internal

内部服务包裹尺寸ID

create_time

创建订单时间

update_time

更新订单时间

status

订单状态

stock_status