Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

接口说明

批量创建代理专线订单接口

...

参数


参数说明是否必填类型

is_urgent

是否是紧急订单


TINYINT(1)

delivery_service_id

邮递服务ID

必填

INT(4)

sales_reference销售跟踪号
VARCHAR(50)
sales_order_id
销售订单号
VARCHAR(50)
custom_identity_reference


自定义惟一标识

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

重复的话会返回: {"success":false,"message":"Duplicate consignment identity reference [....]"}


VARCHAR(50)

contact

联系人

必填

VARCHAR(100)

business_name

公司


VARCHAR(255)

address_line1

地址行1


VARCHAR(100)

address_line2

地址行2


VARCHAR(100)

address_line3

地址行3


VARCHAR(100)

city

城市


VARCHAR(50)

county

省/郡


VARCHAR(50)

post_code

邮编


VARCHAR(10)

country_iso

国家

必填

CHAR(2)

telephone

电话


VARCHAR(50)

email

电子邮件


VARCHAR(255)

special_instruction
备注1
VARCHAR(255)

type

订单类型
'AGENT_DIRECT'

products

产品

必填

包含 
字段详情查看产品接口

id /client_sku/reference 和quantity的json对象例如:
请求参数

     
Code Block
languagexml
   "products":[
           {
            "product_name": "3apple29",
            "product_name_cn":"3苹果29",
            "brand":"asd品牌",
            "client_ref":"a4624",
            "price_customs_export": "3",
            "sales_price":"10",
            "weight": "300",
            "quantity": "1",
            "product_customs_property":["其它"],
            "attachment-url":"http://www.qqma.com/imgpic2/cpimagenew/2018/4/5/6e1de60ce43d4bf4b9671d7661024e7a.jpg"
           }
        ]


parcel_pieces多包裹信息(如果仅一个包裹时可不用填)

数据结构如下:

[

{"weight":500, "length":25, "width":20, "depth":15, "description":"table"},

{"weight":400, "length":22, "width":18, "depth":13, "description":"chair"},

]

备注:重量为克(g),长度为毫米(mm)


payment_reference
付款凭证
string
temp_consignment_info_id
临时订单号
int


返回字段

返回字段字段类型说明
success
int返回结果状态。true:正常,false:失败
id
int订单ID
company_id
int公司ID
client_id
int客户ID
warehouse_id
int仓库ID
consignment_product_quantity
int订单产品数量
consignment_product_reference
int产品英文名称
delivery_service_id
int邮递服务ID
delivery_service_id_internal
int内部邮递服务
delivery_package_size_id
int包装尺寸
total_price
int产品总价格
total_delivery_fee
int邮递服务费用
total_handling_fee
int手续费
length
int
width
int
depth
int
total_weight
int总重量
total_volume
int总体积
total_volume_weight
int总体积重
total_fee_weight
int计费重
guarantee_percentage
int
contact
string联系人
business_name
string公司名称
address_line1
string地址行1
address_line2
string地址行2
address_line3
string地址行3
city
string城市
county
string省/郡
post_code
string邮编
country_iso
string国家简称
telephone
int电话
email
string邮箱
sender_contact
string发件人
sender_business_name
string发件人公司名称
sender_address_line1
string发件人地址行1
sender_address_line2
string发件人地址行2
sender_address_line3
string发件人地址行3
sender_city
string发件人城市
sender_county
string发件人省/郡
sender_post_code
int发件人邮编
sender_country_iso
string发件人国家简称
sender_email
string发件人邮箱
sender_telephone
string发件人电话
sales_reference
string销售跟踪号
sales_price
int销售价格
customs_price
int报关价格
custom_identity_reference
string自定义唯一跟踪号
sales_order_id
string销售订单号
payment_reference
string付款凭证
delivery_reference
string运输跟踪号
tracking_reference
string17tarck跟踪号
special_instruction
string备注1
neighbour_instruction
string备注2
temp_consignment_info_id
int临时订单号
is_urgent
int是否为紧急订单,1:是,0:否
is_forced_delivery_service
int是否强制选择一种邮递服务
create_time
string创建时间
finish_time
string完成时间
arrive_time
string抵达时间
update_time
string更新时间
type
string订单类型
status
string订单状态
stock_status
string库存状态
is_hide_delivery_reference_to_consignment
string是否隐藏订单运输跟踪号
delivery_service_is_signature
string邮递服务是否签名服务
delivery_service_is_tracking
string邮递服务是否跟踪服务

接口示例

接口请求示例

地址:https://test.birdsystem.co.uk/client/consignment/post-pending-consignment-with-products-json

Code Block
languagexml
linenumberstrue
collapsetrue
"success": true,
    "data": [{
	"company_id":"{{bs.default_company_id}}",
	"api_key":"{{bs.default_api_key}}"
}

接口请求参数示例


Code Block
languagexml
linenumberstrue
collapsetrue
[
    {
    {    "contact": "Norman Drury",
        "idbusiness_name": 2012010010000334null,
            "companyaddress_idline1": 1"3, Northam Close",
          "client_id"address_line2": 4790"Marshside",
            "warehouseaddress_idline3": null,
        "city": "Southport",
        "consignment_product_quantitycounty": "1Merseyside",
            "consignmentpost_product_referencecode": "3apple29PR9 9GA",

           "deliverycountry_service_idiso": 5947"GB",
            "delivery_service_id_internal"telephone": "01704 5947226830",
            "delivery_package_size_id"email": 1"mm",
            "total_price"delivery_service_id": "0.005947",
   
        "totalsales_delivery_feereference": "0.002",
            "totalsales_handlingorder_feeid": "110222319566-0.10",
 
          "lengthproducts":[
"0.00",           {
 "width": "0.00",             "depth	"product_name": "0.003apple29",
            "total_weight	"product_name_cn": "300.003苹果29",
            "total_volume	"brand": "0.00asd品牌",
            "total_volume_weight	"client_ref": "0.0000a4624",
            "total_fee_weight	"price_customs_export": "300.00003",
            "guarantee_percentage	"sales_price": "0.0010",
            "contact	"weight": "Norman Drury300",
            "business_name": null	"quantity": "1",
            "address_line1": "3, Northam Close"	"product_customs_property":["其它"],
            "address_line2	"attachment-url": "Marshside","http://www.qqma.com/imgpic2/cpimagenew/2018/4/5/6e1de60ce43d4bf4b9671d7661024e7a.jpg"
           }
   "address_line3": null,    ],
        "citytype": "SouthportAGENT_DIRECT",
    }
]


接口反馈示例

Code Block
collapsetrue
{
      "countysuccess": "Merseyside"true,
    "data": [
      "post_code": "PR9 9GA",{
            "country_isoid": "GB"2012010010000341,
            "telephonecompany_id": "01704 226830"1,
            "emailclient_id": "mm"4790,
            "senderwarehouse_contactid": null,
            "senderconsignment_businessproduct_namequantity": null"1",
            "senderconsignment_addressproduct_line1reference": null"3apple29",
            "senderdelivery_addressservice_line2id": null5947,
            "senderdelivery_service_addressid_line3internal": null5947,
            "sender_citydelivery_package_size_id": null1,
            "sendertotal_countyprice": null"0.00",
            "sendertotal_postdelivery_codefee": null"0.30",
            "sendertotal_countryhandling_isofee": null"0.10",
            "sender_emaillength": null"0.00",
            "sender_telephonewidth": null"0.00",
            "sales_referencedepth": "20.00",
            "salestotal_priceweight": "0300.00000",
            "customstotal_pricevolume": "30.00000",
            "customtotal_identityvolume_referenceweight": null"0.0000",
            "salestotal_orderfee_idweight": "110222319566-0300.0000",
            "paymentguarantee_referencepercentage": null"0.00",
            "delivery_referencecontact": "Norman nullDrury",
            "trackingbusiness_referencename": null,
            "specialaddress_instructionline1": "mm3, Northam Close",
            "neighbouraddress_instructionline2": null"Marshside",
            "temp_consignment_info_idaddress_line3": null,
            "is_urgentcity": "0Southport",
            "is_forced_delivery_servicecounty": "0Merseyside",
            "createpost_timecode": "2020-12-01 15:16:23PR9 9GA",
            "finishcountry_timeiso": "2020-12-01 15:16:24GB",
            "arrive_timetelephone": null"01704 226830",
            "update_timeemail": "2020-12-01 15:16:24mm",
            "typesender_contact": "AGENT_DIRECT"null,
            "statussender_business_name": "FINISHED"null,
            "stocksender_statusaddress_line1": "ONLY_ORI_STOCK_ENOUGH"null,
            "issender_hide_delivery_reference_to_consignmentaddress_line2": "0"null,
            "deliverysender_serviceaddress_is_signatureline3": "0"null,
            "delivery_service_is_trackingsender_city": "1"null,
        }     ]"sender_county": null,
    "moduleName": "client"
}

line: 创建失败的时候, 会告知是哪一个line出错.

返回

Code Block
collapsetrue
{        "successsender_post_code": truenull,
    "data": [         {"sender_country_iso": null,
            "idsender_email": 2001210360000027null,
            "companysender_idtelephone": 36null,
            "clientsales_idreference": 47"2",
            "warehousesales_idprice": null"0.000",
            "consignmentcustoms_product_quantityprice": "23.000",
            "consignmentcustom_productidentity_reference": "3apple29,4apple29"null,
            "deliverysales_serviceorder_id": 5198"110222319566-0",
            "delivery_service_id_internalpayment_reference": 5198null,
            "delivery_package_size_idreference": 877null,
            "totaltracking_pricereference": "0.00"null,
            "totalspecial_delivery_feeinstruction": "9.00"null,
            "totalneighbour_handling_feeinstruction": "0.00"null,
            "lengthtemp_consignment_info_id": "0.00"null,
            "widthis_urgent": "0.00",
            "depthis_forced_delivery_service": "0.00",
            "totalcreate_weighttime": "600.00",
 2020-12-01 18:06:19",
            "totalfinish_volumetime": "0.002020-12-01 18:06:20",
            "totalarrive_volume_weighttime": "0.0000"null,
            "guaranteeupdate_percentagetime": "0.002020-12-01 18:06:20",
            "contacttype": "Rochelle KerrAGENT_DIRECT",
            "business_namestatus": null"FINISHED",
            "addressstock_line1status": "23 Portelet CourtONLY_ORI_STOCK_ENOUGH",
            "address_line2is_hide_delivery_reference_to_consignment": null"0",
            "address_line3delivery_service_is_signature": null"0",
            "citydelivery_service_is_tracking": "London1",
        }
    ],
    "countymoduleName": "London",client"
}

line: 创建失败的时候, 会告知是哪一个line出错.
data是创建成功的订单号和跟踪号的键值对 json对象

返回异常示例


Code Block
languagexml
linenumberstrue
collapsetrue
{
      "success": false,
     "post_codemessage": "N1You 5TL",
            "country_iso": "GB",
            "telephone": "07983-467763-467763",
            "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": "6.000",
            "custom_identity_reference": "224SF242321",
            "sales_order_id": null,
            "payment_reference": null,
            "delivery_reference": "0B043873700001DFE9790",
            "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-01-21 18:22:57",
            "finish_time": null,
            "arrive_time": null,
            "update_time": "2020-01-21 18:22:57",
            "type": "AGENT_DIRECT",
            "status": "ADDRESS_LABEL_PRINTED",
            "stock_status": "ONLY_ORI_STOCK_ENOUGH",
            "is_hide_delivery_reference_to_consignment": "0"
        }
    ],
    "moduleName": "client"
}

...

must provide valid contact for consignment at line ."
}

1.1、查询邮递服务

1.1.1接口接口说明

1urlhttp://test.birdsystem.com/client/delivery-service?consignment_type=LOCAL


2接口功能查询邮递服务信息以及邮递服务限制条件


3支持格式URL开发人员
4请求方式GET发布日期

...


返回字段字段类型说明
1idint邮递服务ID
2company_idint站点ID
3restrict_max_length_contactint联系人最大长度
4restrict_max_length_address_line1int地址行1最大长度
5restrict_max_length_address_line2int地址行2最大长度
6restrict_max_length_address_line3int地址行3最大长度
7restrict_max_length_post_codeint邮编最大长度
8restrict_regex_post_codestring邮编正则表达式
9restrict_regex_telephonestring电话正则表达式
10namestring邮递服务名称
11locale_namestring本地名称(当地区域语言)
12is_signatureint(1或0)是否签名服务()
13
is_tracking
int(1或0)是否跟踪服务
14
is_express
int(1或0)是否为快递
15
is_international
int(1或0)是否为国际服务
16
is_customs_required
int(1或0)是否需要报关
17
is_check_post_code
int(1或0)是否检查邮编正确性
18
is_check_telephone
int(1或0)是否检查电话正确性
19
is_allow_urgent_consignment
int(1或0)是否允许设置紧急订单
20
is_hide_delivery_reference_to_consignment
int(1或0)是否隐藏订单运输跟踪号
21
special_type
string邮递服务特殊类别
22
consignment_type
string邮递服务所属订单类型
23
consignment_notice_enable
int(1或0)是否开启下单提示
24
consignment_notice
status下单提示
25
status
string邮递服务当前状态

1.2接口示例

接口请求示例

URL:http://test.birdsystem.com/client/delivery-service?id=5217


Code Block
languagexml
linenumberstrue
collapsetrue
{
	"company_id":"{{bs.default_company_id}}

...

",
	"api_key":"{{bs.default_api_key}}

...

",
	"id":5217
}

接口返回示例

Code Block
languagexml
title接口返回示例
linenumberstrue
collapsetrue
{
    "total": 1,
    "data": [
        {
            "id": 5217,
            "company_id": 36,
            "restrict_max_length_contact": "20",
            "restrict_max_length_address_line1": "20",
            "restrict_max_length_address_line2": "35",
            "restrict_max_length_address_line3": "35",
            "restrict_max_length_post_code": "0",
            "restrict_regex_post_code": null,
            "restrict_regex_telephone": null,
            "name": "飞鸟小包",
            "locale_name": "",
            "is_signature": "0",
            "is_tracking": "0",
            "is_express": "0",
            "is_international": "0",
            "is_customs_required": "0",
            "is_check_post_code": "0",
            "is_check_telephone": "0",
            "is_allow_urgent_consignment": "1",
            "is_hide_delivery_reference_to_consignment": "0",
            "special_type": null,
            "consignment_type": "LOCAL",
            "consignment_notice_enable": "0",
            "consignment_notice": "",
            "status": "ACTIVE"
        }
    ],
    "success": true,
    "moduleName": "client"
}

...

接口请求示例:
地址:http://test.birdsystem.com/client/product-customs-property


Code Block
languagexml
linenumberstrue
collapsetrue
{
	"company_id":"{{bs.default_company_id}}

...

",
	"api_key":"{{bs.default_api_key}}

...

",
	"id":1
}


接口返回示例:

Code Block
languagexml
title请求返回结果
linenumberstrue
collapsetrue
{
    "total": 1,
    "data": [
        {
            "id": 1,
            "name": "内置锂离子电池",
            "value_type": "BOOL",
            "default_value": "sdsf",
            "symbol": "#",
            "is_separate_picking_list": "1",
            "is_separate_warehouse_transfer": "1",
            "consignment_priority": "2",
            "picking_list_group": "HK",
            "create_time": "2015-07-07 10:12:52",
            "special_type": "BETTERY",
            "primary_keys": [
                "id"
            ]
        }
    ],
    "success": true,
    "moduleName": "client"
}

...