Versions Compared

Key

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

接口说明

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

...

请求参数

...

is_urgent

...

是否是紧急订单

...

Status
colourGreen
title选填

...

TINYINT(1)

...

delivery_service_id

...

邮递服务ID

...

Status
colourRed
title必填

...

INT(4)

...

Status
colourGreen
title选填

...

sales_order_id

...

Status
colourGreen
title选填

...

自定义惟一标识

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

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

...

Status
colourGreen
title选填

...

contact

...

联系人

...

Status
colourRed
title必填

...

VARCHAR(100)

...

business_name

...

公司

...

Status
colourGreen
title选填

...

VARCHAR(255)

...

address_line1

...

地址行1

...

Status
colourGreen
title选填

...

VARCHAR(100)

...

address_line2

...

地址行2

...

Status
colourGreen
title选填

...

VARCHAR(100)

...

address_line3

...

地址行3

...

Status
colourGreen
title选填

...

VARCHAR(100)

...

city

...

城市

...

Status
colourGreen
title选填

...

VARCHAR(50)

...

county

...

省/郡

...

Status
colourGreen
title选填

...

VARCHAR(50)

...

post_code

...

邮编

...

Status
colourGreen
title选填

...

VARCHAR(10)

...

country_iso

...

国家

...

Status
colourRed
title必填

...

CHAR(2)

...

telephone

...

电话

...

Status
colourGreen
title选填

...

VARCHAR(50)

...

email

...

电子邮件

...

Status
colourGreen
title选填

...

VARCHAR(255)

...

special_instruction

...

Status
colourGreen
title选填

...

type

...

Status
colourGreen
title选填

...

products

...

产品

...

Status
colourRed
title必填

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

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"
           }
        ]

...

Status
colourGreen
title选填
(如果仅一个包裹时可不用填)

数据结构如下:

[

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

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

]

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

...

payment_reference

...

Status
colourGreen
title选填

...

temp_consignment_info_id

...

Status
colourGreen
title选填

...

返回字段

...

success

...

id

...

company_id

...

client_id

...

warehouse_id

...

consignment_product_quantity

...

consignment_product_reference

...

delivery_service_id

...

delivery_service_id_internal

...

delivery_package_size_id

...

total_price

...

total_delivery_fee

...

total_handling_fee

...

length

...

width

...

depth

...

total_weight

...

total_volume

...

total_volume_weight

...

total_fee_weight

...

guarantee_percentage

...

contact

...

business_name

...

address_line1

...

address_line2

...

address_line3

...

city

...

county

...

post_code

...

country_iso

...

telephone

...

email

...

sender_contact

...

sender_business_name

...

sender_address_line1

...

sender_address_line2

...

sender_address_line3

...

sender_city

...

sender_county

...

sender_post_code

...

sender_country_iso

...

sender_email

...

sender_telephone

...

sales_reference

...

sales_price

...

customs_price

...

custom_identity_reference

...

sales_order_id

...

payment_reference

...

delivery_reference

...

tracking_reference

...

special_instruction

...

neighbour_instruction

...

temp_consignment_info_id

...

is_urgent

...

is_forced_delivery_service

...

create_time

...

finish_time

...

arrive_time

...

update_time

...

type

...

status

...

stock_status

...

is_hide_delivery_reference_to_consignment

...

delivery_service_is_signature

...

delivery_service_is_tracking

...

EE接口示例

接口请求示例

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

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

接口请求参数示例

Code Block
languagexml
linenumberstrue
collapsetrue
[
    {
        "contact": "Norman Drury",
        "business_name": null,
        "address_line1": "3, Northam Close",
        "address_line2": "Marshside",
        "address_line3": null,
        "city": "Southport",
        "county": "Merseyside",
        "post_code": "PR9 9GA",
        "country_iso": "GB",
        "telephone": "01704 226830",
        "email": "mm",
        "delivery_service_id": "5947",
        "sales_reference": "2",
        "sales_order_id": "110222319566-0",
        "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"
           }
        ],
        "type":"AGENT_DIRECT"
    }
]

接口返回示例

Code Block
collapsetrue
{
    "success": true,
    "data": [
        {
            "id": 2012010010000341,
            "company_id": 1,
            "client_id": 4790,
            "warehouse_id": null,
            "consignment_product_quantity": "1",
            "consignment_product_reference": "3apple29",
            "delivery_service_id": 5947,
            "delivery_service_id_internal": 5947,
            "delivery_package_size_id": 1,
            "total_price": "0.00",
            "total_delivery_fee": "0.30",
            "total_handling_fee": "0.10",
            "length": "0.00",
            "width": "0.00",
            "depth": "0.00",
            "total_weight": "300.00",
            "total_volume": "0.00",
            "total_volume_weight": "0.0000",
            "total_fee_weight": "300.0000",
            "guarantee_percentage": "0.00",
            "contact": "Norman Drury",
            "business_name": null,
            "address_line1": "3, Northam Close",
            "address_line2": "Marshside",
            "address_line3": null,
            "city": "Southport",
            "county": "Merseyside",
            "post_code": "PR9 9GA",
            "country_iso": "GB",
            "telephone": "01704 226830",
            "email": "mm",
            "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": "3.000",
            "custom_identity_reference": null,
            "sales_order_id": "110222319566-0",
            "payment_reference": null,
            "delivery_reference": null,
            "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-12-01 18:06:19",
            "finish_time": "2020-12-01 18:06:20",
            "arrive_time": null,
            "update_time": "2020-12-01 18:06:20",
            "type": "AGENT_DIRECT",
            "status": "FINISHED",
            "stock_status": "ONLY_ORI_STOCK_ENOUGH",
            "is_hide_delivery_reference_to_consignment": "0",
            "delivery_service_is_signature": "0",
            "delivery_service_is_tracking": "1"
        }
    ],
    "moduleName": "client"
}

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

返回异常示例

Code Block
languagexml
linenumberstrue
collapsetrue
{
    "success": false,
    "message": "You must provide valid contact for consignment at line ."
}

1.1、查询邮递服务

1.1.1接口接口说明

...

1.1.2请求参数:默认查询所有

...

1.1.3返回字段

1表示为是,0表示为否

...

is_tracking

...

is_express

...

is_international

...

is_customs_required

...

is_check_post_code

...

is_check_telephone

...

is_allow_urgent_consignment

...

is_hide_delivery_reference_to_consignment

...

special_type

...

consignment_type

...

consignment_notice_enable

...

consignment_notice

...

status

...

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"
}

2查询可用产品属性

2.1.1、接口

...

2.1.2、请求参数(默认查询所有)

...

2.1.3、返回字段

...

value_type

...

default_value

...

symbol

...

is_separate_picking_list

...

is_separate_warehouse_transfer

...

BOOL

...

consignment_priority

...

picking_list_group

...

create_time

...

special_type

...

primary_keys

...

2.2.1接口示例:

接口请求示例:
地址: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"
}

...

Include Page
2.1 批量创建
2.1 批量创建