1.1、查询邮递服务
1.1.1接口接口说明
...
创建订单
地址: POST http://test.birdsystem.com/client/
...
1.1.2请求参数
...
1.1.3返回字段
1表示为是,0表示为否
...
...
...
...
...
...
...
...
...
...
...
...
...
...
1.2接口示例
...
consignment/Post-Pending-Consignment-With-Products-Json
参数 |
|
参数 说明
product_customs_property: 产品属性性可以用名称,也可以用ID,获取途径如上。 [必填]
product_name_cn:产品中文名称 ,不填写会影响清关文件 [必填]
sales_price: 订单在销售平台的价格,(不填的话会自动调用产品申报价格)。
sales_reference:需要填写销售跟踪号请自行添加参数 sales_reference, 例如 "sales_reference":"12345"
weight:重量,单位为g [必填]
price_customs_export:海关出口报关价,单位为美元。(用product_name或name、product_name_cn,或name_cn、price_customs_export或 price都可以上传对应的值) [必填]
client_ref:对应客户sku 是产品的唯一标识即可,可配置在面单显示此字段,便于拣货。 [必填]
custom_identity_reference:自定义唯一跟踪号,属于排重字段,防止重复订单,填写后会检查同一订单类型下6个月内是否有重复订单,重复则报错提示。
brand:品牌
attachment-url:产品图片URL,传送图片链接供飞鸟质检审核产品(只能传网上的图片,不能传本地的)
returnLabel:直接对接获取面单参数标识 ,returnLable =1 时可以直接获取面单,=0 不直接获取面单。(只适用于下一个订单的情况,批量创建多个订单的时候不起作用)
接口:http://test.birdsystem.com/client
...
company_id:{{bs.default_company_id}}
api_key:{{bs.default_api_key}}
id:5217
接口返回示例
...
language | xml |
---|---|
title | 接口返回示例 |
linenumbers | true |
collapse | true |
Code Block |
---|
[ { "totaldelivery_service_id": 1,"5198", "datatype": ["AGENT_DIRECT", "business_name": "", { "contact": "Rochelle Kerr", "id"address_line1": 5217,"23 Portelet Court", "city": "London", "company_idcounty": 36"London", "post_code": "N1 5TL", "restrict_max_length_contactcountry_iso": "20GB", "telephone": "07983-467763-467763", "restrictcustom_max_length_address_line1identity_reference":"224SF242321", "20",products": [ { "restrict_max_length_address_line2product_name": "353apple29", "restrictproduct_max_length_address_line3name_cn": "353苹果29", "brand":"asd品牌", "restrict_max_length_post_codeclient_ref": "0a4624", "restrictprice_regexcustoms_post_codeexport": null"3", "restrictsales_regex_telephoneprice": null"10", "nameweight": "飞鸟小包300", "locale_namequantity": "1", "is_signature"product_customs_property": ["0普货"], "is_tracking"attachment-url": "0","http://www.qqma.com/imgpic2/cpimagenew/2018/4/5/6e1de60ce43d4bf4b9671d7661024e7a.jpg" }, "is_express": "0", { "isproduct_internationalname": "04apple29", "isproduct_customsname_requiredcn": "04苹果29", "is_check_post_code"brand": "0asd品牌", "isclient_check_telephoneref": "0a5456", "isprice_allowcustoms_urgent_consignmentexport": "13", "is_hide_delivery_reference_to_consignmentsales_price": "010", "special_type"weight": null"300", "consignment_type"quantity": "LOCAL1", "consignmentproduct_noticecustoms_enableproperty": ["0内置锂离子电池"], "consignment_noticeattachment-url": "","http://www.qqma.com/imgpic2/cpimagenew/2018/4/5/6e1de60ce43d4bf4b9671d7661024e7a.jpg" } ] "status": "ACTIVE" } ] |
line: 创建失败的时候, 会告知是哪一个line出错.
返回
Code Block | ||
---|---|---|
| ||
{ "success": true, "moduleNamedata": "client" } |
2查询可用产品属性
2.1.1、接口
...
2.1.2、请求参数
...
2.1.3、返回字段
...
...
...
...
...
...
int
...
...
...
...
...
...
2.2.1接口示例:
接口请求示例:
地址:http://test.birdsystem.com/client/product-customs-property
company_id:{{bs.default_company_id}}
api_key:{{bs.default_api_key}}
id:1
接口返回示例:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "total": 1, "data": [ {[ { "id": 2001210360000027, "company_id": 36, "client_id": 47, "warehouse_id": null, "consignment_product_quantity": "2", "consignment_product_reference": "3apple29,4apple29", "delivery_service_id": 5198, "delivery_service_id_internal": 5198, "delivery_package_size_id": 877, "total_price": "0.00", "total_delivery_fee": "9.00", "total_handling_fee": "0.00", "length": "0.00", "idwidth": 1"0.00", "namedepth": "内置锂离子电池0.00", "valuetotal_typeweight": "BOOL600.00", "defaulttotal_valuevolume": "sdsf0.00", "symboltotal_volume_weight": "#0.0000", "is_separate_picking_listguarantee_percentage": "10.00", "is_separate_warehouse_transfercontact": "1Rochelle Kerr", "consignmentbusiness_priorityname": "2"null, "pickingaddress_list_groupline1": "HK23 Portelet Court", "createaddress_timeline2": "2015-07-07 10:12:52"null, "specialaddress_typeline3": "BETTERY"null, "primary_keyscity": ["London", "county": "idLondon", ] "post_code": "N1 5TL", } ], "country_iso": "GB", "success "telephone": true,"07983-467763-467763", "moduleNameemail": null, "clientsender_contact" } |
查询参数为空或输入无效参数,则默认查询所有产品属性
创建订单
地址: POST http://test.birdsystem.com/client/consignment/Post-Pending-Consignment-With-Products-Json
...
参数
...
is_urgent
...
是否是紧急订单
...
TINYINT(1)
...
delivery_service_id
...
邮递服务ID
...
必填
...
INT(4)
...
sales_reference
...
销售跟踪号
...
VARCHAR(50)
...
自定义惟一标识
(注: 如果填写了,会进行检测,同一种类型同一站点下的订单,6个月内不能有重复的标识)
重复的话会返回: {"success":false,"message":"Duplicate consignment identity reference [....]"}
...
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)
...
...
电子邮件
...
VARCHAR(255)
...
type
...
products
...
产品
...
必填
包含
id /client_sku/reference 和quantity的json对象例如:
[
{"client_sku":”IP-XX3355”,"quantity":5}, {"id":2,"quantity":4},
{"reference":2,"quantity":4}
]
注
id :飞鸟产品系统id,飞鸟系统自动生成的。
client_sku :主要是给那些有自己的SKU体系的客户用的。如果传了值就是你们传的,如果没传,系统会自动根据 client_id-id的格式生成。
client_ref: id和sku都可以填,但部分接口不适用,post-pending不适用client_ref参数。
reference是基于客户对批量订单产品字段的设置, 自动识别为ID或者SKU.
对于代理专线订单, 需要传如下格式的产品 (每个字段均是必填):
[
{"name":”IP-XX3355”,"name_cn":"中文产品名","quantity":5,"weight":5,"price":5},
]
...
数据结构如下:
[
{"weight":500, "length":25, "width":20, "depth":15, "description":"table"},
{"weight":400, "length":22, "width":18, "depth":13, "description":"chair"},
]
备注:重量为克(g),长度为毫米(mm)
...
参数 说明
product_customs_property: 产品属性性可以用名称,也可以用ID,获取途径如上。 [必填]
product_name_cn:产品中文名称 ,不填写会影响清关文件 [必填]
sales_price: 订单在销售平台的价格,(不填的话会自动调用产品申报价格)。
sales_reference:需要填写销售跟踪号请自行添加参数 sales_reference, 例如 "sales_reference":"12345"
weight:重量,单位为g [必填]
price_customs_export:海关出口报关价,单位为美元。(用product_name或name、product_name_cn,或name_cn、price_customs_export或 price都可以上传对应的值) [必填]
client_ref:对应客户sku 是产品的唯一标识即可,可配置在面单显示此字段,便于拣货。 [必填]
custom_identity_reference:自定义唯一跟踪号,属于排重字段,防止重复订单,填写后会检查同一订单类型下6个月内是否有重复订单,重复则报错提示。
brand:品牌
attachment-url:产品图片URL,传送图片链接供飞鸟质检审核产品(只能传网上的图片,不能传本地的)
returnLabel:直接对接获取面单参数标识 ,returnLable =1 时可以直接获取面单,=0 不直接获取面单。(只适用于下一个订单的情况,批量创建多个订单的时候不起作用)
...
: 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"
} |
data是创建成功的订单号和跟踪号的键值对 json对象
1.1、查询邮递服务
1.1.1接口接口说明
...
Code Block |
---|
[
{
"delivery_service_id": "5198",
"type":"AGENT_DIRECT",
"business_name": "",
"contact": "Rochelle Kerr",
"address_line1": "23 Portelet Court",
"city": "London",
"county": "London",
"post_code": "N1 5TL",
"country_iso": "GB",
"telephone": "07983-467763-467763",
"custom_identity_reference":"224SF242321",
"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"
},
{
"product_name": "4apple29",
"product_name_cn":"4苹果29",
"brand":"asd品牌",
"client_ref":"a5456",
"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"
}
]
}
] |
line: 创建失败的时候, 会告知是哪一个line出错.
返回
...
collapse | true |
---|
...
delivery-service?consignment_type=LOCAL | ||||
2 | 接口功能 | 查询邮递服务信息以及邮递服务限制条件 | ||
---|---|---|---|---|
3 | 支持格式 | URL | 开发人员 | |
4 | 请求方式 | GET | 发布日期 |
1.1.2请求参数
参数 | 必选 | 类型 | 说明 | |
---|---|---|---|---|
1 | id | 选填 | int(4) | 邮递服务ID |
2 | special_type | 选填 | string(50) | 邮递服务特殊类别 |
3 | consignment_type | 选填 | string(50) | 邮递服务所属订单类型 |
4 | status | 选填 | string(50) | 邮递服务所属状态 |
1.1.3返回字段
1表示为是,0表示为否
返回字段 | 字段类型 | 说明 | |
---|---|---|---|
1 | id | int | 邮递服务ID |
2 | company_id | int | 站点ID |
3 | restrict_max_length_contact | int | 联系人最大长度 |
4 | restrict_max_length_address_line1 | int | 地址行1最大长度 |
5 | restrict_max_length_address_line2 | int | 地址行2最大长度 |
6 | restrict_max_length_address_line3 | int | 地址行3最大长度 |
7 | restrict_max_length_post_code | int | 邮编最大长度 |
8 | restrict_regex_post_code | string | 邮编正则表达式 |
9 | restrict_regex_telephone | string | 电话正则表达式 |
10 | name | string | 邮递服务名称 |
11 | locale_name | string | 本地名称(当地区域语言) |
12 | is_signature | int(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
company_id:{{bs.default_company_id}}
api_key:{{bs.default_api_key}}
id:5217
接口返回示例
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "total": 1, "data": [ { "warehouse_id": null, "consignment_product_quantity"id": "2"5217, "consignmentcompany_product_referenceid": "3apple29,4apple29"36, "delivery_service_id"restrict_max_length_contact": 5198"20", "deliveryrestrict_max_servicelength_idaddress_internalline1": 5198"20", "deliveryrestrict_max_packagelength_sizeaddress_idline2": 877"35", "total_pricerestrict_max_length_address_line3": "0.0035", "total_delivery_feerestrict_max_length_post_code": "9.000", "totalrestrict_regex_handlingpost_feecode": "0.00"null, "lengthrestrict_regex_telephone": "0.00"null, "widthname": "0.00飞鸟小包", "depthlocale_name": "0.00", "totalis_weightsignature": "600.000", "totalis_volumetracking": "0.00", "totalis_volume_weightexpress": "0.0000", "guaranteeis_percentageinternational": "0.00", "contact""is_customs_required": "Rochelle Kerr0", "business_nameis_check_post_code": null"0", "addressis_check_line1telephone": "23 Portelet Court0", "address_line2is_allow_urgent_consignment": null"1", "address_line3is_hide_delivery_reference_to_consignment": null"0", "city": "London"special_type": null, "countyconsignment_type": "LondonLOCAL", "postconsignment_notice_codeenable": "N1 5TL0", "countryconsignment_isonotice": "GB", "telephonestatus": "07983-467763-467763ACTIVE", } "email": null], "success": true, "moduleName": "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,client" } |
2查询可用产品属性
2.1.1、接口
url | http://test.birdsystem.com/client/product-customs-property | ||
---|---|---|---|
接口功能 | 查询可用产品属性 | ||
支持格式 | JSON | 开发人员 | |
请求方式 | GET | 发布时间 |
2.1.2、请求参数
参数 | 必填 | 类型 | 说明 |
---|---|---|---|
id | 选填 | int | 产品属性ID |
2.1.3、返回字段
返回字段 | 字段类型 | 说明 |
---|---|---|
id | int | 产品属性ID |
name | string | 产品属性名称 |
value_type | string | 产品属性种类 |
default_value | string | 产品属性默认值 |
symbol | string | 产品属性符号 |
is_separate_picking_list | int | 是否创建单独的拣货单 |
is_separate_warehouse_transfer | int | 是否创建单独的调拨单 |
consignment_priority | int | 订单属性优先级 |
picking_list_group | string | 渠道属性分组 |
create_time | string | 创建时间 |
special_type | string | 特殊类别 |
primary_keys | string | 主键列名 |
2.2.1接口示例:
接口请求示例:
地址:http://test.birdsystem.com/client/product-customs-property
company_id:{{bs.default_company_id}}
api_key:{{bs.default_api_key}}
id:1
接口返回示例:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "total": 1, "data": [ { "delivery_reference": "0B043873700001DFE9790", "tracking_referenceid": null1, "special_instructionname": null"内置锂离子电池", "neighbourvalue_instructiontype": null"BOOL", "temp_consignment_info_iddefault_value": null"sdsf", "is_urgentsymbol": "0#", "is_forcedseparate_deliverypicking_servicelist": "01", "create_timeis_separate_warehouse_transfer": "2020-01-21 18:22:571", "finishconsignment_timepriority": null"2", "arrivepicking_list_timegroup": null"HK", "updatecreate_time": "20202015-0107-2107 1810:2212:5752", "special_type": "AGENT_DIRECTBETTERY", "statusprimary_keys": "ADDRESS_LABEL_PRINTED", [ "stock_status": "ONLY_ORI_STOCK_ENOUGH",id" "is_hide_delivery_reference_to_consignment": "0"] } ], "success": true, "moduleName": "client" } |
data是创建成功的订单号和跟踪号的键值对 json对象查询参数为空或输入无效参数,则默认查询所有产品属性