Lingxing
切换旧版

添加/编辑本地产品

POST/erp/sc/routing/storage/product/set

支持添加/编辑系统本地产品信息

支持国家:US(美国)、CA(加拿大)、MX(墨西哥)、JP(日本)、UK(英国)、DE(德国)、FR(法国)、ES(西班牙)、IT(意大利)、NL(荷兰)、

AU(澳洲)、SG(新加坡)、IN(印度)、AE(阿联酋)、SA(沙特阿拉伯)、BR(巴西)、SE(瑞典)、PL(波兰)、BE(比利时)、TR(土耳其)、 UA(乌克兰)、HU(匈牙利)、PK(巴基斯坦)、LB(黎巴嫩)、AT(奥地利)、CH(瑞士)、CZ(捷克)、DK(丹麦)、IE(爱尔兰)、LU(卢森堡)、 NO(挪威)、PT(葡萄牙)、SK(斯洛伐克)、RU(俄罗斯)、KZ(哈萨克斯坦)、BY(白俄罗斯)、CL(智利)、KR(韩国)

接口信息

API Path请求协议请求方式令牌桶容量
/erp/sc/routing/storage/product/setHTTPSPOST10

请求参数

skustring必填
SKU
product_namestring必填
品名【添加时必填】
sku_identifierstring
SKU识别码
picture_listarray<object>
产品图片信息
隐藏子属性
pic_urlstring
产品图片链接
is_primaryinteger
是否产品主图:0 否,1 是
unit_process_feeinteger
单位加工费
unitstring
单位(商品单位:套、个、台)
category_idinteger
分类id,与分类同时存在时,优先取分类id
categorystring
分类
modelstring
型号
brand_idinteger
品牌id,与品牌同时存在时,优先取品牌id
brandstring
品牌
open_statusinteger
开启状态:0 停用,1 启用
statusinteger
状态【默认1】:0 停售,1 在售,2 开发中,3 清仓
descriptionstring
商品描述
group_listarray<object>
组合商品列表
隐藏子属性
skustring
子商品
quantityinteger
商品比例数
cg_opt_uidinteger
采购:采购员id,与采购员名同时填写时,以采购员id为准
cg_opt_usernamestring
采购:采购员名
product_developer_uidinteger
开发者id,与开发者名称同时填写时,以开发者id为准
product_developerstring
开发者名称
product_creator_uidinteger
创建人id,默认API账号id
product_duty_uidsarray<any>
负责人id
is_append_product_dutyinteger
负责人是否追加创建人:0 否,1 是;默认1,只有编辑SKU时才生效
purchase_remarkstring
采购备注
cg_pricestring
采购:采购成本(RMB)
is_relatedinteger
是否关联单品成本:0 否,1 是
cg_deliveryinteger
采购:采购交期
cg_product_materialstring
采购:商品材质
cg_product_lengthstring
采购:单品规格-长(CM)
cg_product_widthstring
采购:单品规格-宽(CM)
cg_product_heightstring
采购:单品规格-高(CM)
cg_product_net_weightstring
采购:单品净重(G)
cg_product_gross_weightstring
采购:单品毛重(G)
cg_package_lengthstring
采购:包装规格-长(CM)
cg_package_widthstring
采购:包装规格-宽(CM)
cg_package_heightstring
采购:包装规格-高(CM)
cg_box_lengthstring
采购:外箱规格-长(CM)
cg_box_widthstring
采购:外箱规格-宽(CM)
cg_box_heightstring
采购:外箱规格-高(CM)
cg_box_weightstring
采购:单箱重量(KG)
cg_box_pcsinteger
采购:单箱数量(包装数量)
bg_customs_export_namestring
报关:申报品名(中文)
bg_export_hs_codestring
报关:HS Code(中国)
bg_customs_import_namestring
报关:申报品名(英文)
currencystring
报关:申报金额的币种
bg_customs_import_pricestring
报关:申报金额
qc_standardobject
质检标准
隐藏子属性
custom_qc_templateobject
自定义质检标准
隐藏子属性
qc_imagearray<object>
质检图片【最多十张图】
隐藏子属性
file_idstring
质检图片文件id
customer_urlstring
客户的质检图片URL
new_qc_standardobject
新质检标准;可选,可与旧qc_standard同时传入
隐藏子属性
qc_methodinteger必填
质检方式:1抽检,2全检,3免检;编辑不传则保留,新增不传默认1
pqt_idstring
系统质检模板ID;只关联已有模板
custom_qc_templateobject必填
自定义质检标准
隐藏子属性
template_itemarray<object>必填
自定义质检项完整列表,最多30项;编辑时未回传的原质检项会删除
隐藏子属性
pqti_idstring
自定义质检项ID;编辑已有项时传入,新增项传空字符串或不传
qc_itemstring必填
质检项名称,最多100个字符
sortinteger
排序,取值0至255
qc_contentobject必填
质检内容,非空字符串数组,可包含HTML
product_logistics_listobject
报关清关费用信息
支持国家:US、CA、MX、JP、UK、DE、FR、ES、IT、NL、AU、SG、IN、AE、SA、BR、SE、PL、BE、TR、UA、HU、PK、LB、AT、CH、CZ、DK、IE、LU、NO、PT、SK、RU、KZ、BY、CL、KR
隐藏子属性
US_cg_transport_costsstring
默认头程费用(含税)
US_currencystring
默认头程费用币种
US_clearance_pricestring
清关价格
US_clearance_price_currencystring
清关价格币种,默认CNY
US_bg_import_hs_codestring
HS Code
US_bg_tax_ratestring
税率
US_clearance_remarkstring
备注
supplier_quotearray<object>
供应商报价信息(该参数传空值则清空产品供应商报价)
隐藏子属性
erp_supplier_idinteger必填
领星ERP供应商id,查询本地产品详情接口对应字段【supplier_id】,与supplier_id必填其一
supplier_idinteger
客户系统供应商id,没有填这个值或者对应供应商不存在,则取erp_supplier_id,与erp_supplier_id必填其一
supplier_product_urlarray<any>
采购链接,字符串数组,最多20个,没有则传空数组
quote_remarkstring
报价备注
quote_cg_deliveryinteger
供应商交期
is_primaryinteger必填
首选供应商:0 否,1 是
quotesarray<object>必填
报价信息,传供应商报价时必传
隐藏子属性
currencystring必填
报价币种,目前只有CNY和USD
is_taxinteger必填
是否含税:0 否,1 是
tax_ratestring必填
税率,为空则表示为0
step_pricesarray<object>必填
阶梯价信息
隐藏子属性
moqinteger必填
最小起订量,最小值为1
price_with_taxstring必填
含税单价,4位小数
special_attrarray<any>
产品特殊属性:1 含电,2 纯电,3 液体,4 粉末,5 膏体,6 带磁,7 纺织品,8普货(普货于其他选项互斥)
declarationobject
报关数据
隐藏子属性
customs_import_priceinteger
报关:报关单价
customs_import_price_currencystring
报关:报关单价币种
customs_export_namestring
报关:中文报关名
customs_import_namestring
报关:英文报关名
customs_declaration_unitstring
报关:报关单位
customs_declaration_specstring
报关:规格型号
customs_declaration_origin_producestring
报关:原厂国(地区)
customs_declaration_inlands_sourcestring
报关:境内货源地
customs_declaration_hs_codestring
报关:报关HSCODE
other_declare_elementstring
报关:其他申报要素
customs_declaration_exemptstring
报关:征免
production_and_sales_enterprise_namestring
报关:生产销售企业名称
production_and_sales_enterprise_codestring
报关:生产销售企业代码
clearanceobject
清关数据
隐藏子属性
customs_clearance_materialstring
清关:中文材质
customs_clearance_en_materialstring
清关:英文材质
customs_clearance_usagestring
清关:中文用途
customs_clearance_en_usagestring
清关:英文用途
customs_clearance_internal_codestring
清关:内部编码
customs_clearance_preferentialinteger
清关:出口享惠情况:1 不享惠,2 享惠,3 不确定享惠情况
customs_clearance_brand_typeinteger
清关:品牌类型:1 无品牌,2 境内自主品牌,3 境内收购品牌,4 境外品牌(贴牌生产),5 境外品牌(其他)
customs_clearance_product_patternstring
清关:产品型号
allocation_remarkstring
清关:配货备注
weaving_modeinteger
织造方式:1 针织,2 梭织
customs_clearance_pic_urlstring
清关:清关图片
aux_relation_listarray<object>
辅料列表
隐藏子属性
aux_skustring必填
辅料sku
sku_qtyinteger
辅料比例(主料)
aux_qtyinteger
辅料比例(辅料)
spec_pack_listarray<object>
采购:更多箱规(非默认箱规)
隐藏子属性
spec_titlestring必填
采购:更多箱规-箱规名称
cg_box_pcsinteger
采购:更多箱规-单箱数量
cg_box_lengthstring
采购:更多箱规-外箱规格-长(CM)
cg_box_widthstring
采购:更多箱规-外箱规格-宽(CM)
cg_box_heightstring
采购:更多箱规-外箱规格-高(CM)
cg_package_lengthstring
采购:更多箱规-包装规格-长(CM)
cg_package_widthstring
采购:更多箱规-包装规格-宽(CM)
cg_package_heightstring
采购:更多箱规-包装规格-高(CM)
cg_box_weightstring
采购:更多箱规-单箱重量(KG)
cg_product_gross_weightstring
采购:更多箱规-单品毛重(G)
api_spustring
SPU(填写时属性列表必填,同时填写且为空时取消关联)
api_spu_attributearray<object>
属性列表(填写时spu必填,同时填写且为空时取消关联)
隐藏子属性
pa_idinteger必填
属性ID
pai_idinteger必填
属性值ID
custom_fieldsstring
[array]
隐藏子属性
idstring
[string]
valstring必填
[string]
characterstring
[string]

请求示例

    {
    "sku": "SKU2986DFA",
    "product_name": "钢化玻璃膜2",
    "picture_list": [
        {
            "pic_url": "https://xxxx.com/123.jpg",
            "is_primary": 1
        }
    ],
    "unit": "个",
    "category_id": 2,
    "category": "分类5",
    "model": "",
    "brand_id": 0,
    "brand": "",
    "status": 0,
    "description": "",
    "group_list": [
        {
            "sku": "CWZS20A-L",
            "quantity": 1
        }
    ],
    "cg_opt_uid": 0,
    "cg_opt_username": "",
    "product_developer_uid": 0,
    "product_developer": "",
    "purchase_remark": "",
    "cg_price": "",
    "is_related": 0,
    "cg_delivery": 0,
    "cg_product_material": "",
    "cg_product_length": "",
    "cg_product_width": "",
    "cg_product_height": "",
    "cg_product_net_weight": "",
    "cg_product_gross_weight": "",
    "cg_package_length": "",
    "cg_package_width": "",
    "cg_package_height": "",
    "cg_box_length": "",
    "cg_box_width": "",
    "cg_box_height": "",
    "cg_box_weight": "",
    "cg_box_pcs": 0,
    "bg_customs_export_name": "",
    "bg_export_hs_code": "",
    "bg_customs_import_name": "",
    "currency": "CNY",
    "bg_customs_import_price": "",
    "product_creator_uid": 0,
    "product_duty_uids": [],
    "is_append_product_duty": 0,
    "qc_standard": {
        "custom_qc_template": {
            "qc_image": [
                {
                    "file_id": "",
                    "customer_url": ""
                }
            ]
        }
    },
    "product_logistics_list": {
        "US_cg_transport_costs": 0,
        "US_currency": "",
        "US_clearance_price": 0,
        "US_clearance_price_currency": "",
        "US_bg_import_hs_code": "",
        "US_bg_tax_rate": 0,
        "US_clearance_remark": ""
    },
    "supplier_quote": [
        {
            "erp_supplier_id": 1,
            "supplier_id": 0,
            "supplier_product_url": [],
            "quote_remark": "",
            "is_primary": 1,
            "quotes": [
                {
                    "currency": "CNY",
                    "is_tax": 0,
                    "tax_rate": 0,
                    "step_prices": [
                        {
                            "moq": 0,
                            "price_with_tax": 10
                        }
                    ]
                }
            ]
        }
    ],
    "special_attr": [
        1,
        2,
        3
    ],
    "declaration": {
        "customs_declaration_unit": "",
        "customs_declaration_spec": "",
        "customs_declaration_origin_produce": "",
        "customs_declaration_inlands_source": "",
        "customs_declaration_exempt": ""
    },
    "clearance": {
        "customs_clearance_material": "",
        "customs_clearance_usage": "",
        "customs_clearance_internal_code": "",
        "customs_clearance_preferential": 0,
        "customs_clearance_brand_type": 0,
        "customs_clearance_product_pattern": "",
        "allocation_remark": "",
        "weaving_mode": 0,
        "customs_clearance_pic_url": ""
    },
    "aux_relation_list": [
        {
            "aux_sku": "AUX-GLUE-01",
            "sku_qty": 1,
            "aux_qty": 2
        }
    ],
    "spec_pack_list": [
        {
            "spec_title": "小箱包装",
            "cg_box_pcs": 50,
            "cg_box_length": "25.0",
            "cg_box_width": "15.0",
            "cg_box_height": "10.0",
            "cg_package_length": "12.0",
            "cg_package_width": "6.0",
            "cg_package_height": "1.0",
            "cg_box_weight": "6.0",
            "cg_product_gross_weight": "25.0"
        }
    ],
    "api_spu": "SPU001",
    "api_spu_attribute": [
        {
            "pa_id": 1,
            "pai_id": 101
        }
    ],
    "custom_fields": [
        {
            "id": "207663076879646721",
            "val": "测试ceshi",
            "character": ""
        }
    ]
}

返回结果

Json Object

codeinteger必填
状态码,0 成功
示例 0
messagestring必填
消息提示
示例 success
error_detailsarray<any>必填
错误信息
request_idstring必填
请求链路id
示例 &nbsp;
response_timestring必填
响应时间
示例 2020-04-30 17:33:32
dataobject必填
响应数据
隐藏子属性
product_idinteger必填
本地产品id
示例 1010
skustring必填
本地产品sku
示例 SKU2986DFA1
sku_identifierstring必填
SKU识别码
示例 SKU2986DFA1

返回成功示例

{
    "code": 0,
    "message": "success",
    "error_details": [],
    "request_id": "CCF38623-DE1A-004F-0961-90A6AF265013",
    "response_time": "2021-11-11 11:14:33",
    "data": {
        "product_id": 1010,
	    "sku": "SKU2986DFA1",
	    "sku_identifier": "SKU2986DFA1"
    },
    "total": 0
}

返回失败示例

{
    "code": 500,
    "message": "内部错误",
    "error_details": "is_primary不能为空 [请求码:4B70FE]",
    "request_id": "D00AB182-BC9B-4859-854E-BEFCE2C1411C",
    "response_time": "2021-11-11 11:01:13",
    "data": [],
    "total": 0
}