Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

接口描述

URL

http://test.birdsystem.com/client/Product/

接口功能

添加产品

支持格式

JSON/TEXT

开发人员

请求方式

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)

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 等

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

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

请求描述
Python_requests请求格式

import requests
url = "http://test.birdsystem.com/client/Product/"
payload="{\r\n    \"#id\": 3027110,\r\n    \"client_id\": 4790,\r\n    \"name\": \"5G\",\r\n    \"url\": \"5G\",\r\n    \"name_customs\": \"5G\",\r\n    \"material\": null,\r\n    \"usage\":null,\r\n    \"brand\": null,\r\n    \"color\": null,\r\n    \"model\": null,\r\n    \"shape_type\": \"NORMAL_SHAPE\",\r\n    \"customs_category_id\": null,\r\n    \"customs_category_code\": null,\r\n    \"return_action\": null,\r\n    \"note\":\"5G建设\",\r\n    \"client_ref\": \"4790-3027111\",\r\n    \"commodity_code\": \"date\",\r\n    \"is_need_to_record_sn\": 0,\r\n   \" company_product-is_shared_internal\": 0,\r\n    \"company_product-price\": 0.00,\r\n    \"company_product-cost\": 0.00,\r\n    \"price_customs_import\": 1.00,\r\n    \"price_customs_export\": 0.2,\r\n    \"sales_price\": 10,\r\n    \"company_product-low_stock_level\": 0,\r\n    \"inventory_time\": 0,\r\n    \"dynamic_warehouse_stock_sequence\": \"DYNAMIC_WAREHOUSE_STOCK_FIRST\",\r\n    \"combobox-1452-inputEl\": 50\r\n}"
headers = {
  'api_key': '${api_key}',
  'compamy_id': '36',
  'Content-Type': 'application/json',
  'Cookie': 'PHPSESSID=g43q2u6egm3vudalg4caa0e606'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.json)

Json格式返回结果

{
    "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": 3027111,
        "client_id": 4790,
        "crossing_harbor_name_id": null,
        "customs_clear_name_id": null,
        "name": "5G",
        "name_customs": "5G",
        "material": "",
        "usage": "",
        "brand": "",
        "url": "5G",
        "color": null,
        "model": null,
        "country_of_origin": null,
        "shape_type": "NORMAL_SHAPE",
        "product_risk_level": "LOW",
        "customs_value_level": "LOW",
        "customs_category_id": null,
        "commodity_code": "date",
        "note": "5G建设",
        "description": null,
        "price_customs_import": "1.00",
        "price_customs_export": "0.200",
        "price_customs_export_internal": "0.200",
        "sales_price": "10.00",
        "handling_fee": "0.00",
        "delivery_fee_adjustment": "0.00",
        "client_ref": "4790-3027111",
        "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-03-10 15:44:27",
        "create_time": "2021-03-10 15:44:27",
        "update_time": "2021-03-10 15:44:27",
        "note_internal": "",
        "dynamic_warehouse_stock_sequence": "DYNAMIC_WAREHOUSE_STOCK_FIRST",
        "return_action": null,
        "status": "PREPARING",
        "primary_keys": [
            "id"
        ]
    },
    "success": true,
    "moduleName": "client"
}
  • No labels