Versions Compared

Key

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

...

接口说明:

urlhttp://test.birdsystem.com/client/Consignment-Product

method

post

body

form 参数如下:
接口功能添加产品
支持格式JSON开发人员
请求方式POST发布日期

请求参数说明:

参数

必选

类型

说明

product_id

...

产品ID

...

Status
colourRed
title必填
INT(10)产品id
consignment_id

...

订单ID

...

Status
colourRed
title必填
BINGINT(16)订单ID
product_type
Status
colourYellow
title选填
VARCHAR产品类型

...

 必填

...

'NORMAL'

...

,默认“NORMAL”
product_type=[“NORMAL”,“DIRECTIONAL”]
product_type[0]=“当前用户产品”
product_type[1]="普通共享产品"
quantity
Status
colourRed
title必填
INT数量
is_directional_shared_product

...

Status
colourYellow
title选填
BOOL是否定向共享产品
ebay_transaction_id

...

Status
colourYellow
title选填
VARCHAR

...

eBay订单交易号

ebay_item_no
Status
colourYellow
title选填
VARCHAReBay产品ID

...

参数说明:

参数

类型

说明

sold_quantity
INT出售数量
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
quantity
INT数量
unit_product_price
float(‘%.2f’)产品单价
unit_product_cost
float(‘%.2f’)产品成本
unit_product_lengthfloat(‘%.2f’) 产品长
unit_product_width
float(‘%.2f’)产品宽
unit_product_depth
float(‘%.2f’)产品高
unit_product_weightfloat(‘%.2f’)产品重
price_customs_export
float(‘%.3f’)出口报关价
price_customs_export_internal
float(‘%.3f’)内部出口报关价
price_customs_export_origin
float(‘%.3f’)出口报关价来源
price_customs_export_internal_origin
float(‘%.3f’)内部出口报关价来源
sn
VARCHARSN唯一码(sn !=product_id ;sn != product_client_ref)
product_type
VARCHAR产品类型:[“NORMAL”//“DIRECTIONAL”]
primary_keys
VARCHAR主键:[“id”]

2、接口示例:

接口请求示例

URL:http://test.birdsystem.com/client/Consignment-Product

Code Block
languagexml
title请求接口示例
linenumberstrue
collapsetrue
#api_key和company_id和提交数据中consignment_id &product_id需要替换成实际数据
-Headers 'api_key: {{bs.default_api_key}}' \   #所需登录站点company_id
-Headers 'company_id: {{bs.default_company_id}}' \    #所需登录账号的api_key
-Headers 'content-type: application/x-www-form-urlencoded' \


接口请求参数示例(一次请求只能推送一次产品,多件产品需推送多次)

Code Block
languagexml
title接口请求参数示例
linenumberstrue
collapsetrue
consignment_id:2012140360000997
product_id:2989354
quantity:1


接口返回示例:

Code Block
languagejs
title接口返回示例
linenumberstrue
collapsetrue
{
    "data": {
        "sold_quantity": null,
        "count": null,
        "product_customs_name": null,
        "product_weight": null,
        "

...

total_price_customs_export":

...

 null,
        "

...

product_client_ref": null,
        "id":

...

 71525956,
        "product_id": 2989354,
        "consignment_id": 2012140360000997,
        "quantity": "

...

2",

...

样例

Code Block
languagebash
linenumberstrue
# api_key和company_id和提交数据中的delivery_service_id需要替换成实际数据
curl -X POST \
  https://test.birdsystem.com/client/consignment-product \
  -H 'api_key: 248ccb90dff2b99465b54c113765360c' \
  -H 'company_id: 36' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'consignment_id=1904160360000015&product_id=200876&quantity=1'

...


        "unit_product_price": "2.00",
        "unit_product_cost": "0.00",
        "unit_product_weight": "50.00",
        "unit_product_length": "50.00",
        "unit_product_width": "50.00",
        "unit_product_depth": "50.00",
        "price_customs_export": "5.000",
        "price_customs_export_internal": "1.000",
        "price_customs_export_origin": "0.000",
        "price_customs_export_internal_origin": "0.000",
        "sn": null,
        "product_type": "NORMAL",
        "primary_keys": [
            "id"
        ]
    },
    "success": true,
    "moduleName": "client"
}


返回异常示例(检查产品ID是否允许添加产品或检查产品是否正常,库存是否充足)

Code Block
languagejs
title返回异常示例
linenumberstrue
collapsetrue
{
    "success": false,
    "message": "Can not find product by id [2989352222]."
}