Versions Compared

Key

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

...

...

产品添加:接口描述

URL

http://

test.birdsystem.com

<系统域名>/client/Product/

接口功能

添加产品

支持格式

JSON/

TEXT

FORM

开发人员

请求方式

POST

发布日期

参数描述

字段

注释

是否必填

类型

name

产品中文名称

必填

VARCHAR(100)

url

链接

VARCHAR(50)

name_customs

产品英文名称

必填

VARCHAR(100)

material

材质

VARCHAR(50)

usage

用途

VARCHAR(50)

brand

品牌

VARCHAR(50)

color

颜色

VARCHAR(100)

model

型号

VARCHAR(100)

shape_type

形状

普通形状NORMAL_SHAPE(默认)

轴状体NORMAL_SHAPE

不规则形状RREGULAR_SHAPE

customs_category_id

海关分类编码ID

INT(10) . 参考接口:  获取海关分类 

product_product_customs_property[]

产品属性

INT(10) . 参考接口:  获取产品属性 . 这些属性ID一般不常变动. 如有多个海关属性, 请传多个同名的form 字段, 例如:

product_product_customs_property[] = 1
product_product_customs_property[] = 3

note

备注

VARCHAR(100)

client_ref

客户自定义SKU编码(不能和其他SKU重复)

VARCHAR(50)

commodity_code

商品报关编码

VARCHAR(50)

weight

重量 默认单位 g

DECIMAL(10,2)

length

长度 默认单位 mm

DECIMAL(10,2)

width

宽度 默认单位 mm

DECIMAL(10,2)

depth

高度(深度)默认单位 mm

DECIMAL(10,2)

company_product-is_shared_internal

是否是共享产品

TINYINT(1)

description

产品描述

TEXT

company_product-price

产品价格 (货币每个站点不同,详询客服)

FLOAT(8,2)

company_product-cost

产品成本 (货币每个站点不同,详询客服)

FLOAT(8,2)

price_customs_import

海关进口价格 (美元)

FLOAT(8,2)

price_customs_export

海关出口价格(美元)

必填

FLOAT(8,2)

sales_price

销售价格 (美元)

FLOAT(8,2)

company_product-low_stock_level

低库存报警线

INT(5)

inventory_time

在途产品入库时间

INT(3)

DATETIME

attachment_url

附件URL

VARCHAR(2000)

在创建或者更新产品时,同时上传一个或者多个附件, 一个URL指向一个附件,多个URL用\n换行符分隔.

ps: 附件是在后台队列中异步下载的,不会马上体现在界面上,可以通过 “查看后台运行任务” 来查看队列任务

附件可以是图片,pdf, doc,excel等文档,与产品详细页面的附件上传是同一个功能。

override_old_attachment

是否覆盖旧的附件 (仅更新产品时有效)

TINYINT(1)

当当前请求是修改已有产品,且有提供附件时, 是否要覆盖掉旧的附件

status

不填写时,默认为preparing;

当值为PENDING时,添加的产品直接是待处理状态,不需要再更改状态

ENUM('PREPARING','PENDING')

is_need_to_record_sn

是否需要记录产品sn唯一码

BOOL

country_of_origin

产地

国家的二字码:CN, GB 等

请求描述(以下为折叠内容,签署合同时以下信息无需参考,仅供第三方对接参考)
(以下为折叠内容,签署合同时以下信息无需参考,仅供第三方对接参考)

Expand
title(以下为折叠内容,签署合同时以下信息无需参考,仅供第三方对接参考)(以下为折叠内容,签署合同时以下信息无需参考,仅供第三方对接参考)

使用接口调试工具postman
请求描述
HTTP请求格式

Code Block
languagepy
POST /client/Product/ HTTP/1.1
Host: {{Bird_URL}}
Headres:
  api_key: {{api_key}}
  company_id: {{company_id}}
  Cookie: PHPSESSID=3s3nejv43u9bhirsrvq9nge254
Body
  raw
{"name":"测试产品",
"name_customs":"test product",
"customs_category_id":"1519",
"aterial":"plastic",
"usage":"test",
"brand":"test",
"color":"red",
"model":"test",
"url":"http://www.test.com/aaa",
"note":"测试测试",
"product_product_customs_property[]":9,
"#client_ref":"客户 SKU",
"client_ref":"{{$timestamp}}",
"weight":5,
"length":100,
"width":50,
"depth":20,
"description":"测试产品",
"price":5,
"cost":2,
"price_customs_import":5,
"price_customs_export":5,
"attachment_url":null}

Json格式返回结果

Code Block
languagejson
{
    "data": {
        "price_internal": null,
        "product_volume_level_code": null,
        "product_stock_volume_level_code": null,
        "product_sales_level_code": null,
        "directional_share_total": null,
        "total": null,
        "price": null,
        "cost": null,
        "is_shared_internal": null,
        "is_shared_external": null,
        "client_dispatch_product_id": null,
        "product_stock_level_code": null,
        "company_id": null,
        "warehouse_id": null,
        "live_volume": null,
        "sales_quantity": null,
        "sales_volume": null,
        "volume": null,
        "id": 3055882,
        "client_id": 4790,
        "crossing_harbor_name_id": null,
        "customs_clear_name_id": null,
        "name": "测试产品",
        "name_customs": "test product",
        "material": "",
        "usage": "test",
        "brand": "test",
        "url": "http://www.test.com/aaa",
        "color": "red",
        "model": "test",
        "country_of_origin": null,
        "shape_type": "NORMAL_SHAPE",
        "product_risk_level": "LOW",
        "customs_value_level": "LOW",
        "customs_category_id": 1519,
        "commodity_code": null,    //商品报关编码
        "note": "测试测试",
        "description": "测试产品",
        "price_customs_import": "5.00",
        "price_customs_export": "5.000",
        "price_customs_export_internal": "5.000",
        "sales_price": null,
        "handling_fee": "0.00",
        "delivery_fee_adjustment": "0.00",
        "client_ref": "1621837201",
        "company_ref": null,
        "weight": "0.00",
        "length": "0.00",
        "width": "0.00",
        "depth": "0.00",
        "dimension_lock": "0",
        "live_stock": "0",
        "frozen_stock": "0",
        "pending_stock": "0",
        "low_stock_level": "0",
        "inventory_time": "0",
        "is_use_delivery_cost": "0",
        "is_no_handling_fee": "0",
        "is_vip": "0",
        "is_dynamic_warehouse_unsalable_product": "0",
        "is_need_to_record_sn": "0",
        "last_info_check_time": null,
        "last_stock_update_time": null,
        "last_in_stock_time": null,
        "last_out_stock_time": null,
        "last_update_status_time": "2021-05-24 14:20:01",
        "create_time": "2021-05-24 14:20:01",
        "update_time": "2021-05-24 14:20:01",
        "note_internal": "",
        "dynamic_warehouse_stock_sequence": "DYNAMIC_WAREHOUSE_STOCK_FIRST",
        "return_action": null,
        "status": "PREPARING",
        "primary_keys": [
            "id"
        ]
    },
    "success": true,
    "moduleName": "client"
}