供应商网络API接口 自营
政府采购平台API接口(v1.1.9+版)

浏览

34502

评价

862

销量

812
价  格
¥ 1000
市 场 价
¥ 10000.00
  • 库  存
    10000
  • 积  分
    150
联 系:
电 话:

13952101395

手 机:

13952101395

地 址:

中国贵州贵阳

描述
5.0
服务
5.0
物流
5.0
看了又看
  • 热门商品
  • 热门关注
  • 商品介绍
  • 规格与包装
  • 售后服务
  • 商品评价(862)

 

 

<供应商网络-API对接>

帮助文档

 

版本:

1.1

编写日期:

2019/10/16

版本:

1.1.2

编写日期:

2019/10/28

版本:

1.1.3

编写日期:

2019/10/28

版本:

1.1.4

编写日期:

2019/11/01

版本:

1.1.5

编写日期:

2019/11/16

版本:

1.1.6

编写日期:

2019/12/17

版本:

1.1.7

编写日期:

2020/02/14

版本:

1.1.8

编写日期:

2020/02/18

版本:

1.1.9

编写日期

2020-04-29

 

目录

<供应商网络-API对接>

帮助文档

. 接口概述

. 具体接口电商平台

2.1 接口约定

2.2 授权获取Access Token

2.3 获取品目池接口

2.4 获取商品编号SKU接口

2.5 商品详情接口

2.6 上下架状态接口

2.7 图片接口

2.8 商品好评度接口(非必需)

2.9 价格接口

2.10 地址接口

2.10.1获取一级地址

2.10.2获取二级地址

2.10.3 获取三级地址

2.10.4 电商获取地址接口(非必需)

2.11 库存接口

2.12 订单接口

2.12.1 预下订单接口

2.12.2 确认订单接口

2.12.3 取消订单接口

2.13 查询贵方订单信息接口

2.14 退换货接口

2.14.1退换货接口(非必需)

2.14.2退换货查询接口(非必需)

2.15 物流接口

2.21 电子发票接口

2.22 获取消息接口

2.23 删除消息接口

2.26 商品参数聚合查询接口非必须

2.27 商品赠品查询接口

. 具体接口供应商网络

3.1 接口约定

3.1 授权获取Access Token

3.2 获取平台信息接口

3.3 获取平台品目信息接口

3.4 获取平台品牌信息接口(非必须

3.4.1获取平台全部品牌信息接口

3.4.2根据品目获取平台品牌信息接口

3.5 获取商品承诺/产品认证信息(甘肃对接)

 

 

 

 

  • 接口概述

APIApplication Programming Interface,应用编程接口),简单来说就是把不同的系统通过统一的接口协同一起来完成需求任务,就像像USB数据线一样不管两端连的是什么,都就可以使用。

  • 具体接口电商平台

    以下接口服务需贵方提供,我方调用。

2.1 接口约定

    所有请求方式均为:POST

    所有返回为JSON型字符串

    所有返回基本结构如下:

      {"success": 布尔类型, "desc" : "描述","result" :  json或数组}

    注意:返回体中不要带换行符等容易影响解析的特殊字符。

参数

是否必须

描述

success

必须

true或者false,表示接口调用成功与否

desc

非必须

描述,如:调用失败原因,成功提示等

result

非必须

返回结果,如[{"sku": 12345”, "price”: 1000}, {"sku”: "11111”, price: "1200”}]{"sku”: "12345”, "num” : 99, "area_id”: "1000000” }

 

 

 

2.2 授权获取Access Token

     除此之外的所有接口均需提供有效的access_token参数。

【请求urlhttps://贵方域名/api/auth2/access_token

【请求参数】

参数

类型

是否必须

描述

timestamp

string

必须

当前调用时间,格式为"2014-01-01 01:01:01”

username

string

必须

贵方提供的用户名

password

string

必须

贵方提供的用户密码

sign

string

必须

签名规则:

username+password+timestamp+password

    将上面字符串MD5加密后转为小写。

 

 

【返回结果】

参数

类型

描述

access_token

string

 

expires_at

string

过期时间

 

 

【示例代码】

参数范例:

·username = yourname

·password = yourpassword

·timestamp = 2015-12-12 12:12:12

yournameyourpassword2015-12-12 12:12:12yourpassword

sign值为上面字符串MD5加密后转为小写,结果如下:

2c43405533a1a8cb2e37364824385ca6

具体的url为:

https://贵方域名/api/access_token?username=yourname&password=yourpassword×tamp=2015-12-12 12:12:12&sign=2c43405533a1a8cb2e37364824385ca6

返回示例如下:

{

    "success" : true,

"access_token" : "access_token",

"expires_at" : "2014-01-02 01:01:01"

}

注:请设置token失效时间12个小时。

如果所有的接口请求的token失效了,返回结果desc必须包含“token_expired”英文文字标识。方便确定是否需要重新获取token

{

    "success" : false,

"desc”: “token_expired"

}

 

2.3 获取品目池接口

【请求URLhttps://贵方域名/api/product/get_pools

【请求参数】

 参数名称

类型

是否必须 

描述 

 token

string

 必须

 授权接口获取的access token

platformCode

string

必须

平台code标识

 

【返回】

 

 

【返回结果】

{

"success": true,

"result":

     [

          {"name":"电视", "id":1},

          {"name":"空调", "id":2}

     ]

}

2.4 获取商品编号SKU接口

【请求URLhttps://贵方域名/api/product/skus

【请求参数】

 参数名称

类型

是否必须 

描述 

 token

string

 必须

 授权接口获取的access token

catalog_id

string

必须

 池子编号

platformCode

string

必须

平台code标识

 

 

【返回结果】

{

"success": true,

"result":  [123123”, “152352”]

}

 

2.5 商品详情接口

【请求URLhttps://贵方域名/api/product/detail

【请求参数】

 参数名称

类型

是否必须 

描述 

 token

string

 必须

 授权接口获取的access token

 sku

string

必须

 商品编号,只支持单个查询

product_extend_attributes

string

 

获取除基本商品信息外的其他商品信息。如传:“example_sku,example_emall”则除基本信息,同时返回“标杆供应商商品sku,标杆供应商”。当不传,或者传“”时,表示不需要额外的参数信息

platformCode

string

必须

平台code标识

返回参数】

 

 参数名称

类型

描述 

 sku

string

 商品编号

url

string

商品url

model

string

型号  必填

weight

string

重量

image_path

string

主图地址 必填

state

string

上下架状态

brand_name

string

品牌 必填

name

string

商品名称 

product_area

string

产地

upc

string

条形码

unit

string

销售单位

category

string

类别(此处填写3.3拉取到的平台品目的id)

service

string

售后服务

code_69

string

 69码

attributes

string

[{attributeID => 标准参数项的ID, attributeName => 贵方参数项的名称,valueID => 标准参数值的ID,value => 贵方参数值}]

introduction

string

详细介绍 必填

param

string

规格参数  必填(使用示例中的格式)

ware

string

包装清单

sale_actives

int

是否是促销商品,数值类型,“0-不是促销产品, 1-是促销产品

case

string

cas号

goods_number

string

货号

goods_date

string

货期

purity

string

纯度

 

【返回结果】

{

"success":true,

"result":

     {

          "sku" : 商品编号,

          “url”: 商品url,

          "model" : 型号,

          "weight" : "重量",

          "image_path" : "主图地址",

          "state" : 上下架状态,

          "brand_name" : "品牌",

          "name" : "商品名称",

          "product_area" : 产地,

          "upc":条形码,

          "unit" : 销售单位,

          "category": 类别,

          “service”: 售后服务,

          code_69: 69码,

attributes: [{attributeID => 标准参数项的ID, attributeName => 贵方参数项的名称,valueID => 标准参数值的ID,value => 贵方参数值}],

          "introduction":

"

产品信息Product Information
产品特色Selling Point

",

 

  "param""

 

       基本参数(这是参数分类不算参数没有可以省略这个tr)         品牌    海尔         商品名称    海尔电脑主机云悦mini 2W  

 

          "ware" : "笔记本主机 x1 电池 x1 电源适配器 x1 "

          “sale_actives”1,

 

#以下为实验室供应商字段,普通供应商非必填

case: cas号,

goods_number: 货号,

“goods_date”: 货期,

purity: 纯度   

 

     }

}

【说明】

      param 返回的是 规格参数

  Introduction 详细介绍

      imagePath 为商品的主图片地址。

      sale_actives 是否是促销商品,数值类型,“0-不是促销产品, 1-是促销产品 

 

2.5.1 获取商品标准信息非必须

【请求URLhttps://贵方域名/api/product/product_quality

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

 skus

必须

商品编号,支持批量查询,以,分隔。

platformCode

必须

平台code标识

 

【返回结果】

{"success":true,

"result":[

{"sku":"1111","codes":["GB/15213-2016"]},

{"sku":"2222","codes":["QB/T-1300","GB/15213-2016"]},

{"sku":"3333","codes":[]}

]

}

 

2.5.2 批量更新商品参数非必须

【请求URLhttps://贵方域名/api/product/batch_update

【请求参数】

 参数名称

是否必须

描述 

token

必须

  授权接口获取的access token

attributes

必须

  参数的参数,多个参数用“,”分隔。

  示例: name,brand_name

  注:此处的参数,来自于2.5商品详情接口返回的商品参数

skus

必须

  查询的skus,多个sku用“,”分隔

  示例:sku1,sku2

platformCode

必须

平台code标识

  • 【返回结果】

{

    "resultCode": "0000",

    "resultMessage": "操作成功",

    "success": true,

   

  "result": [

{sku: sku1,  name: name1 brand_name: 华硕}

{sku: sku2,  name: name2 brand_name: 联想}

]

}

2.5.3 获取商品参数(新增)非必须 公采云使用

【请求URLhttps://贵方域名/api/product/ product_attributes

【请求参数】

 参数名称

是否必须

描述 

token

必须

  授权接口获取的access token

platfromCode

必须

平台code(id)

sku

必须

  查询的sku

  • 【返回结果】

 参数名称

是否必须

描述 

attributes

必须

  商品参数字符串,多个参数用分号间隔,数据格式:"参数名称 1":参数值1;"参数名称 2":参数值 2;

 

 

{"result":

{

" attributes ": " 参数名称 1:参数值1;参数名称 2:参数值 2; "

}

"success":true,

"desc":""

}

2.5.4 获取商品承诺函/产品认证信息/七天无理由退货(甘肃公采云、哈尔滨公采云平台对接)

说明:3.5接口查询有返参时,该接口需返回对应信息,否则该商品无法上架

【请求URLhttps://贵方域名/api/product/product_promise

【请求参数】

 参数名称

是否必须

描述 

token

必须

  授权接口获取的access token

platfromCode

必须

平台code

sku

必须

  查询的sku

  • 【返回结果】

 参数名称

是否必须

描述 

promises

必须

 json数组

promises对象信息

 参数名称

是否必须

描述 

regionpromiseguid

必须

商品承诺/产品认证唯一识别码

promisefilepath

必须

商品承诺/产品认证附件路径

remark

必须

备注信息

 

 

2.6 上下架状态接口

【请求URLhttps://贵方域名/api/product/shelf_states

【请求参数】

 参数名称

类型

是否必须 

描述 

 token

string

 必须

 授权接口获取的access token

 sku

string

必须

商品编号,支持批量查询,以,分隔。

1为上架,0为下架

platformCode

string

必须

平台code标识

 

 

【返回结果】

{

"success":true,

"result”:

[

{"sku”:111111,”state”:1},

{"sku”:111111,”state”:0}

]

}

2.7 图片接口

【请求URLhttps://贵方域名/api/product/images

【请求参数】

 参数名称

类型

是否必须 

描述 

 token

string

 必须

 授权接口获取的access token

 sku

string

必须

商品编号,支持批量,以,分隔

platformCode

string

必须

平台code标识

 

 

【返回结果】

 {  "success":true,

    "result": [

        {

            "sku": 100012,

            "images": [

                {

                    "path": "www.贵方网址.org/a.jpg",

                    "order": 1

                },

                {

                    "path": "www.贵方网址.org/b.jpg",

                    "order": 0

                }

            ]

        }

    ]

}

 

 

 

其中path是地址。order为排序,如上面商品详情页面返回的图片地址一致。

2.8 商品好评度接口(非必需)

【请求URLhttps://贵方域名/api/product/ratings

【请求参数】

 参数名称

类型

是否必须 

描述 

 token

string

 必须

 授权接口获取的access token

sku

string

必须

商品编号,支持批量,以,分隔  (最高支持50个商品)

platformCode

string

必须

平台code标识

 

 

  • 【返回结果】

 参数名称

描述 

average

商品评分 (5颗星,4颗星)

good

好评度

medium

中评度

bad

差评度

  •  

 

{

"success":true,

"result":

[

{"average":5,"medium":0.0,"good":1.0,"sku":800020,"bad":0.0},

{"average":5,"medium":0.0,"good":1.0,"sku":800035,"bad":0.0}

]

}

 

}

2.9 价格接口

     返回协议优惠价格price,和商城售价mall_price

【请求URLhttps://贵方域名/api/product/prices

【请求参数】

 参数名称

类型

是否必须 

描述 

 token

string

 必须

 授权接口获取的access token

sku

string

必须

商品编号,请以,分割。例如:12345 ,54321

platformCode

string

必须

平台code标识

 

 

  • 【返回结果】

{

"success":true,

"result":

     [

          {"sku":111111, "price":协议优惠价, "":商城售价},

          {"sku":111111, "price":协议优惠价,"mall_price":商城售价}

     ]

}

2.10 地址接口

2.10.1获取一级地址

【请求URLhttps://贵方域名/api/area/provinces

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

 

 

【返回结果】

{"result":

{

"北京":1,

"四川":10

}

"success":true,

"desc":""

}

2.10.2获取二级地址

【请求URLhttps://贵方域名/api/area/cities

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

 id

必须

一级地址ID

 

 

【返回结果】

{

"success":true,

"result":

{

"顺义区":2812,

"海淀区":2800,

"通州区":2809

}

"success":true,

"desc":""

}

2.10.3 获取三级地址

【请求URLhttps://贵方域名/api/area/getCounty

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

 id

必须

二级地址ID

 

 

  • 【返回结果】

{"result":

{

"顺义区":2812,

"海淀区":2800,

"通州区":2809

}

"success":true,

"desc":""

}

 

 2.10.4 电商获取地址接口(非必需)

 根据阳光公采地址api(见附)进行映射后,通过三级地址id返回贵方对应的id

【请求URLhttps://贵方域名/api/area

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

 id

必须

阳光公采三级地址id, 如:110101(即北京-市辖区-东城区)

 

  • 【返回结果】

{

"success":true,

"desc": "",

"result": {area_id: 12345}

}

 

附:

 1. 获取阳光公采一级地址

【请求URL】甲方商城域名/api/area/provinces

【请求参数】

 参数名称

是否必须 

描述 

        无

 

 

 

 

【返回结果】

{"result"::[{"id":110000,"name":"北京"},{"id":120000,"name":"天津"}]

"success":true,

"desc":"获取一级信息成功"

}

 

2. 获取阳光公采二级地址

【请求URL】甲方商城域名/api/area/cities

【请求参数】

 参数名称

是否必须 

描述 

        id

   必须

一级地址ID, /api/area/cities/110000

 

 

【返回结果】

{"success":true,"desc":"获取二级信息成功","result":[{"id":110100,"name":"市辖区"},{"id":110200,"name":"市辖县"}]}

 

3. 获取阳光公采三级地址

【请求URLhttps://贵方域名/api/area/counties

【请求参数】

 参数名称

是否必须 

描述 

        id

必须

二级地址ID,如/api/area/cities/110100

 

 

  • 【返回结果】

{"success":true,"desc":"获取三级信息成功","result":[{"id":110101,"name":"东城区"},{"id":110102,"name":"西城区"}]

2.11 库存接口

【请求URLhttps://贵方域名/api/product/stocks

【请求参数】

 参数名称

类型

是否必须 

描述 

 token

string

 必须

 授权接口获取的access token

 sku

string

必须

商品编号 批量查询以英文逗号分隔

 area

string

必须

三级地址编号

platformCode

string

必须

平台code标识

 

 

【返回结果】

 参数名称

类型

描述 

area

string

地址

desc

string

描述

sku

string

商品编号

num

int

库存数量

 

 

{

"success":true,

"result":

     [

          {

               "area":"1_0_0",

               "desc":"有货",

               "sku":"981268",

   "num": 100

          

          }

     ]

}      

 

2.12 订单接口

 2.12.1 预下订单接口

     下单后锁定库存等资源,等待确认接口后再发货。

     所有订单默认开明细发票

【请求URLhttps://贵方域名/api/order/submit

【请求参数】

 参数名称

  类型

是否必须 

描述 

  token

String            

必须

  授权接口获取的access token

platformCode

String

必须

  订单方平台code(id)

  yggc_order

String

必须

阳光公采商城的订单单号

  sku

String

必须

[{"sku":商品编号, "num":商品数量, price”:价格,“mode”:价格模式:1-协议价(默认)};2-团购模式; 3-特惠模式; 4-阶梯价模式 }]

如果商品有选择延保服务 添加 yanbao结构

  [{"sku":商品编号, "num":商品数量, price”:价格, “yanbao”:[{“sku”:延保编号,”price”: 99,“num”: 2}]}]

  name

String

必须

收货人

  province

int

必须

一级地址

  city

int

必须

二级地址

  county

int

必须

三级地址

  address

String

必须

详细地址

  zip

String

必须

邮编

  phone

String

必须

座机号 (与mobile其中一个有值即可)

  mobile

String

必须

手机号 (与phone其中一个有值即可)

  email

String

非必须

邮箱

  remark

String

非必须

备注(少于100字)

dep_name

String

非必须

采购单位名称

invoice_title

String

必须

发票抬头,个人或公司名称

invoice_type

String

必须

1普通发票;2增值税发票;3 电子发票;默认为普通发票;

invoice_org_code

String

必须

纳税人识别号

invoice_name

String

非必须

增值票收票人

备注:当invoice_type=2 且时则此字段必填

invoice_phone

String

非必须

注册电话

备注:当invoice_type=2 且时则此字段必填

invoice_bank

String

非必须

开户银行

备注:当invoice_type=2 且时则此字段必填

invoice_bank_code

String

非必须

开户行帐号

备注:当invoice_type=2 且时则此字段必填

invoice_address

String

非必须

注册地址

备注:当invoice_type=2 且时则此字段必填

invoice_mobile 

string

非必须

收票联系电话

invoice_receipt_address

string

非必须

收票地址

payment

int

必须

1:货到付款,2:集中支付, 3:在线支付, 4:支票 5:账期支付 6:先款后货

order_price

Decimal

必须

订单金额(包含运费)

freight

Decimal

必须

运费

mode

int

必须

订单模式:1-协议价(默认));2-团购模式; 3-特惠模式; 4-阶梯价模式

 

 

【注意】:电商生成订单的时候需要与skuprice 与电商平台对该sku的价格进行校验,如果不一致,下单失败。并且校验需要考虑该订单是否有运费。当订单模式为-团购模式、特惠模式、 阶梯价模式时,可以按需进行校验,如果对应的团购价、特惠价、阶梯价不是通过接口同步的方式可不用价格校验。

 

【返回结果】

{

  "success":true,

"result":

{

"mall_order_id":贵方订单编号,

"sku":

[

{

"sku":商品编号,

"num":商品数量,

price":商品单价

                        yanbao:[{sku: 1313, price: 99}]

}

],

"orderPrice":订单金额

            "freight":运费

}

}

 2.12.2 确认订单接口

【请求URLhttps://贵方域名/api/order/confirm

【请求参数】

 参数名称

类型

是否必须

描述 

token

string

必须

授权接口获取的access token

platformCode

string

必须

订单方平台code(id)

 order_id

string

必须

贵方的订单单号

 

 

【返回结果】

 {

  "success":true

 }

 

2.12.3 取消订单接口

 

【请求URLhttps://贵方域名/api/order/cancel

【请求参数】

 参数名称

类型

是否必须

描述 

token

string

必须

授权接口获取的access token

platformCode

string

必须

订单方平台code(id)

order_id

string

必须

贵方的订单单号

 

 

  • 【返回结果】

{

   "success":true

}

 

2.13 查询贵方订单信息接口

【请求URLhttps://贵方域名/api/order/select

【请求参数】

 参数名称

类型

是否必须

描述 

token

String

必须

  授权接口获取的access token

order_id

String

必须

贵方订单号

platformCode

String

必须

平台code

 

 

 

【返回结果】

 参数名称

类型

是否必须

描述 

order_id

String

必须

  贵方订单编号

state

Integer

必须

状态 0 是新建  1是妥投完成  -1是拒收 4是退换货中

submit_state

Integer

必须

状态 0 未确认  1 已确认

deliver_state

Integer

必须

发货状态  0 未发货  1已发货(全部)  2 部分发货

total_price

Decimal

必须

订单总价价格

skus

Array

必须

  采购商品列表

[{sku:111111,num:10,"price":20.5,“yanbao”:[{“sku”:1313, “price”: 99}]}]

return_skus

Array

必须

已退货的商品

corders

Array

必须

子订单列表(拆单时必传)

type

Integer

非必须

订单类型:1 是父订单, 2 是子订单。如果不传,则默认是父订单

 

 

父单未拆单信息

{

"success": true,

"result": {

"order_id": 11111111111,

"total_price": 10,

"skus": [{

"sku": 111111,

"num": 10,

"price": 20.5,

"yanbao": [{

"sku": 1313,

"price": 99

}]

}],

"state": 1,

"submit_state": 1,

"deliver_state": 0,

"return_skus": [{

"sku": 2222,

"num": 10,

"price": 20.5

}]

 

}

}

父单拆单后的信息:

{

"success": true,

"result": {

"order_id": "439999",

"total_price": 923.22,

"skus": [{

"sku": 11314,

"num": 24,

"price": 5.53,

"yanbao": [{

"sku": 1313,

"price": 99

}]

},

{

"sku": 150700,

"num": 50,

"price": 0.67

},

{

"sku": 201794,

"num": 10,

"price": 65.8

}

],

"state": 0,

"submit_state": 1,

"deliver_state": 0,

 

"return_skus": [{

"sku": "",

"num": "",

"price": ""

}],

"corders": [{

"porder_id": "439999",

"corder_id": "75885256711",

"state": 0,

"submit_state": 1,

"deliver_state": 0,

"total_price": 231.72,

"skus": [{

"sku": 11314,

"num": 24,

"price": 5.53,

"yanbao": [{

"sku": 1313,

"price": 99

}]

}],

"return_skus": [{

"sku": "",

"num": "",

"price": ""

}],

"type": 2

},

{

"porder_id": "439999",

"corder_id": "75883819465",

"state": 0,

"submit_state": 1,

"deliver_state": 0,

"total_price": 691.5,

"skus": [{

"sku": 150700,

"num": 50,

"price": 0.67

},

{

"sku": 201794,

"num": 10,

"price": 65.8

}

],

"return_skus": [{

"sku": "",

"num": "",

"price": ""

}],

"type": 2

}

],

"type": 1

}

}

 

子订单查询信息:

 

{

"success": true,

"result": {

"porder_id": "439999",

"order_id": "75883819465",

"total_price": 691.5,

"skus": [{

"sku": 150700,

"num": 50,

"price": 0.67

},

{

"sku": 201794,

"num": 10,

"price": 65.8

}

],

"state": 0,

"submit_state": 1,

"deliver_state": 0,

"return_skus": [{

"sku": "",

"num": "",

"price": ""

}],

"type": 2

}

}

2.14 退换货接口

 2.14.1退换货接口(非必需)

【请求URLhttps://贵方域名/api/order/return

【请求参数】

 参数名称

类型

是否必须

描述 

token

String

必须

 授权接口获取的access token

order_id

String

必须

 贵方订单号

skus

Array

必须

退换的商品编号和数量[{"sku":111111,"num":10,"price":20.5}, {"sku":111111,"num":10,"price":20.5}]

type

Integer

必须

4:退货 5:换货 6:维修

packages

String

 

是否有包装

desc

String

必须

售后问题描述

contact_detail

String

必须

采购人信息

{:customer_contact_name=>"联系人", :customer_mobile_phone=> 手机号, :customer_tel=>联系电话}

return_area

String

必须

地址信息

{:return_province=>省id,

:return_city=>市id,

 :return_county=>区id,

:return_place=>详细地址}

platform_code

String

必须

平台code

 

 

 

【返回结果】

 参数名称

类型

是否必须

描述 

order_id

String

必须

  贵方订单编号

type

Integer

必须

4:退货 5:换货 6:维修

skus

Array

必须

准备退换的商品编号和数量

[{"sku":111111,"num":10,"price":20.5},{"sku":11111,"num":10,"price":20.5}]

order_service_id

String

必须

退换货的服务号id

 

 

{

"success": true,

"result": {

"order_id": 11111111111,

"type": 4,

"skus": [{

"sku": 111111,

"num": 10,

"price": 20.5

}],

"order_service_id": 1

},

"desc": "售后信息提交成功"

}

 2.14.2退换货查询接口(非必需) 

【请求URL】https://贵方域名/api/order/after_service

【请求参数】

 

 参数名称

类型

是否必须

描述 

token

String

必须

授权接口获取的access token

order_service_id

String

必须

退换货的服务号id

order_id

String

必须

贵方订单号(当只传订单号时,则返回所有该订单的服务信息)

page

Integer

非必须

查询记录页码,默认第一页

per

Integer

非必须

查询记录每次获取数量,默认一次请求1000条记录

platform_code

String

必须

平台code

 

【返回结果】

 

 参数名称

类型

  是否必须

描述 

order_id

String

必须

订单号

services

Array

必须

服务明细:

{"skus": [{"sku": 申请商品的sku, "num": 申请数量, “name”: 商品名称}],

 "order_service_id": 服务单号",

 "order_service_type": 申请的类型,

 "refund_price": 退款金额,

 "order_service_step": 审核状态,

 "approve_notes": 审核意见

}

其中:审核状态有以下几种:

00 未处理  

01 正在处理

02 已取消

09 已完成

page_total

Integer

必须

一共几页

page_per

Integer

必须

一页几条记录

has_next

Boolean

必须

是否还有下一页,true:有,false: 无

 

 

{

"success": true,

"result": {

"order_id": "d61025a8102",

"page_total": 1,

"page_per": 10,

"services": [{

"skus": [{

"sku": "1100001014P00",

"num": 1,

"name": "name1"

},

{

"sku": "1100001014P01",

"num": 1,

"name": "name2"

}

],

"order_service_id": "12345678",

"order_service_type": 4,

"refund_price": 0,

"order_service_step": "01",

"approve_notes": "正在电联客户,协商处理中"

}]

}

}

2.15 物流接口

【请求URLhttps://贵方域名/api/order/track

【请求参数】

 参数名称

类型

是否必须

描述 

token

string

必须

授权接口获取的access token

order_id

string

必须

贵方订单号

platformCode

string

必须

平台code标识

 

  • 【返回结果】

直接返回物流明细信息

{

  "success": true,

  "result": {

    "track": [

      {

        "content": "内容",

        "operate_time": "操作时间",

        "operator": "操作人"

      }

    ],

    "waybill": [

      {

        "order_id": "贵方订单号",

        "logistic_type": "物流方式  1:供应商自行送货 2:快递 3:其他",

        "logistic_name": "物流公司",

        "logistic_no": "物流单号",

        "shipment_id": "发货号",

        "shipment_items": [

          {

            "name": "商品名称",

            "num": 2,

            "sku": "商品sku"

          }

        ]

      }

    ]

  }

}

 

2.21 电子发票接口

【请求URLhttps://贵方域名/api/invoice/getInvoiceList

【请求参数】

 参数名称

是否必须

描述 

token

必须

  授权接口获取的access token

order_ids

必须

用,分割的字符串。贵方的订单单号(需考虑接口时长问题,限制在15秒) 比如:order_id1,order_id2

platformCode

必须

平台code标识

 

 

 

返回参数

 

 参数名称

是否必须

描述 

success

必须

  布尔值, 接口是否正常响应,true表示正常处理请求

result

必须

哈希列表, 电子发票的下载链接

 

 

  • 【返回结果】

{

success":true,

"result":{

order_id1: [‘http://..,http://…’]

order_id2: [‘http://..,http://…’]

}

}

      

 

2.22 获取消息接口 

【请求URLhttps://贵方域名/api/product/getMessagePool

【请求参数】

 参数名称

是否必须

描述 

token

必须

  授权接口获取的access token

type

必须

消息类型:

#* type=2 商品价格变更

#* type=4 代表商品上下架变更消息

#* type=6 代表添加、删除商品池内的商品

#* type=16 商品介绍及规格参数变更消息

#* type=5 订单已完成

#* type=10 代表订单取消,不区分取消原因

#* type=12 配送单生成成功消息 

#* type=1 订单拆分(非必须)

platformCode

必须

平台code标识

 

 

返回参数

 参数名称

是否必须

描述 

success

必须

  布尔值, 接口是否正常响应,true表示正常处理请求

result

必须

数组,返回消息数组

 

  • 【返回结果】

 

* type=2 商品价格变更

{

    "success": true,   

  "result": [

{  "id":推送id,

"result":{

"skuId": 商品编号 ,

  "state": 1,    #默认为1

  price: 100.00,

  market_price: 110.00

},

"type" : 2,

"time":推送时间

},{  "id":推送id,

"result":{

"skuId": 商品编号 ,

  "state": 1,    #默认为1

  price: 200.00,

  market_price: 210.00

},

"type" : 2,

"time":推送时间

}

 

]

}

 

 

* type=4 代表商品上下架变更消息

{

    "success": true,

  "result": [

{  "id":推送id,

"result":{

"skuId": 商品编号 ,

 "state":"1 上架2下架

},

"type" : 4,

"time":推送时间

},{  "id":推送id,

"result":{

"skuId": 商品编号 ,

 "state":"1 上架2下架

},

"type" : 4,

"time":推送时间

}

]

}

 

 

* type=6 代表添加、删除商品池内的商品

{

    "success": true,

  "result": [

{  "id":推送id,

"result":{

"skuId": 商品编号 ,

 "state":"1添加,2删除

},

"type" : 6,

"time":推送时间

},

{  "id":推送id,

"result":{

"skuId": 商品编号 ,

 "state":"1添加,2删除

},

"type" : 6,

"time":推送时间

}

 

]

}

 

 

*type=16 商品介绍及规格参数变更消息

{

    "success": true,   

 "result": [

        {

            "id":"770904",

            "result":{

                "state":1 

                "skuId": 商品编号

            },

            "time":"2018-01-30 14:22:55",

            "type":16

        },{

            "id":"770904",

            "result":{

                "state":1 

                "skuId": 商品编号

            },

            "time":"2018-01-30 14:22:55",

            "type":16

        }    

      ]

}

 

* type=5 订单已完成

{

    "success": true,

 "result": [

{  "id":推送id,

"result":{

"orderId": 订单编号 ,

 "state":" 1

},

"type" : 5,

"time":推送时间

}

]

}

 

* type=10 代表订单取消

{

    "success": true,   

 "result": [

        {

            "id":"770904",

            "result":{

                "state":1 取消,2 拒收,   

                "orderId":"订单编号",

                remark: 备注(可不填)

            },

            "time":"2018-01-30 14:22:55",

            "type":10

        },       

      ]

}

 

* type=12 配送单生成成功消息

{

    "success": true,   

 "result": [

        {

            "id":"消息id",

            "result":{  

                "orderId":"订单编号"

            },

            "time":"2018-01-30 14:22:55",

            "type":12

        },       

      ]

}

 

 

* type=1 订单拆分消息

{

    "success": true,   

 "result": [

        {

            "id":"消息id",

            "result":{  

                "orderId":"订单编号"

            },

            "time":"2018-01-30 14:22:55",

            "type":1

        },       

      ]

}

 

 

2.23 删除消息接口

【请求URLhttps://贵方域名/api/product/delMessagePool

【请求参数】

 参数名称

是否必须

描述 

token

必须

  授权接口获取的access token

messageId

必须

消息id

platformCode

必须

平台code标识

 

 

返回参数

 参数名称

是否必须

描述 

success

必须

  布尔值, 接口是否正常响应,true表示正常处理请求

desc

必须

如果请求失败,返回失败原因

 

  【返回结果】

 {

  "success":true

    desc: 消息messageId删除成功

 }

 

 

2.26 商品参数聚合查询接口非必须

【请求URLhttps://贵方域名/api/product/get_similar_sku

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

sku

必须

商品编号例如:12345

platformCode

必须

平台code标识

【返回结果】

 参数名称

是否必须 

类型

描述 

success

必须

boolean

是否获取成功

desc

必须

string

如果请求失败,返回原因

result

必须

array

返回消息数组

 

result 内部参数说明】

 参数名称

是否必须 

类型

描述 

sale_name

必须

string

参数的名称

sale_attr_list

必须

array

返回参数的一些参数值以及对应的sku

 

 

sale_attr_list内部参数说明】

 参数名称

是否必须 

类型

描述 

imagepath

必须

string

主图链接

sale_value

必须

string

参数值名称

skus

必须

array

参数值对应的sku

 

  • 【返回示例

{

"success":true,

"desc": "",

"result":

[

{

"sale_name":"型号",

"sale_attr_list":

[

{

"imagepath":"*****/****/**.jpg",

"sale_value":"100g",

"skus":

[

"54823", "68536"

]

},

{

"imagepath":"*****/****/**.jpg",

"sale_value":"300g",

"skus":

[

"74833", "88523"

]

}

]

},

{

"sale_name":"颜色",

"sale_attr_list":

[

{

"imagepath":"*****/****/**.jpg",

"sale_value":"红色",

"skus":

[

"68536", "88523"

]

},

{

"imagepath":"*****/****/**.jpg",

"sale_value":"蓝色",

"skus":

[

"74833"

]

},

{

"imagepath":"*****/****/**.jpg",

"sale_value":"黑色",

"skus":

[

"54823"

]

}

]

}

     ]

}

 

 

2.27 商品赠品查询接口

【请求URLhttps://贵方域名/api/product/get_gifts

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

sku

必须

商品编号例如:12345

area

必须

格式:1_12_111,三级地址

platformCode

必须

平台code标识

 

【返回结果】

 参数名称

是否必须 

类型

描述 

success

必须

boolean

是否获取成功

desc

必须

string

如果请求失败,返回原因

result

必须

array

返回消息数组

 

result 内部参数说明】

 参数名称

是否必须 

类型

描述 

gifts

必须

array

赠品的基本参数

start_time

必须

string

赠品的开始时间

end_time

必须

string

赠品的结束时间

 

gifts内部参数说明】

 参数名称

是否必须 

类型

描述 

sku

必须

string

商品编号

url

必须

string

商品地址

image_path

必须

string

主图地址

name

必须

string

商品名称

num

必须

integer

数量

gift_type

必须

integer

赠品类型 1 附件 2 赠品

 

 

  • 【返回示例

{

"success":true,

"desc": "",

"result":

{

"gifts":

[

{

"sku" : "782323",

           "url":"xxx/xxxx",

        "image_path" : "xxx/xxx",

       "name" : "赠品1",

"num":1,

"gift_type": 1

},

{

"sku": "67533",

"url":"xxx/xxxx",

        "image_path" : "xxx/xxx",

       "name" : "赠品2",

"num": 10,

"gift_type": 2

}

],

"start_time": "2019-7-25",

"end_time": "2019-8-25"

}

}

2.28节能环保接口(新增、山东专用)

【请求URLhttps://贵方域名/api/product/certificates

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

sku

必须

商品编号,请以,分割。例如:12345 ,54321

platformCode

必须

平台code标识

【返回结果】

 参数名称

是否必须 

类型

描述 

sku

必须

string

商品编号

save_energy_cert_no

不必须

string

证书编

save_energy_cert_image

不必须

string

节能证书图片地址

save_energy_cert_indate

不必须

date

节能证书有效期

environment_protect_cert_no

不必须

string

环保证书编号

environment_protect_cert_image

不必须

string

环保证书图片地址

environment_protect_cert_indate

不必须

date

环保证书有效期

 

  • 【返回示例

{

"success":true,

"result":

     [

           {"sku": "12345",

"save_energy_cert_no": "CQC17701185052",

"save_energy_cert_image": "http://xxxx.xxx.png",

"save_energy_cert_indate": "2020-12-25",

"environment_protect_cert_no": "CEC 084 70763616-8",

"environment_protect_cert_image":"http://xxxx.xxx.png",

"environment_protect_cert_indate": "2018-11-18"

},

       {"sku": "12345",

"save_energy_cert_no": "CQC17701185052",

"save_energy_cert_image": "http://xxxx.xxx.png",

"save_energy_cert_indate": "2020-12-25",

"environment_protect_cert_no": "CEC 084 70763616-8",

"environment_protect_cert_image":"http://xxxx.xxx.png",

"environment_protect_cert_indate": "2018-11-18"

}

     ]

}

 

  • 具体接口供应商网络

3.1 接口约定

    所有请求方式均为:POST

    所有返回为JSON型字符串

    所有返回基本结构如下:

      {"success": 布尔类型, "desc" : "描述","result" :  json或数组}

    注意:返回体中不要带换行符等容易影响解析的特殊字符。

参数

是否必须

描述

sucess

必须

true或者false,表示接口调用成功与否

desc

非必须

描述,如:调用失败原因,成功提示等

result

非必须

返回结果,如[{"sku": 12345”, "price”: 1000}, {"sku”: "11111”, price: "1200”}]{"sku”: "12345”, "num” : 99, "area_id”: "1000000” }

 

 

 

 

3.1 授权获取Access Token

     除此之外的所有接口均需提供有效的access_token参数。

【请求urlhttps://方域名/gyssc/token

【请求参数】

参数

是否必须

描述

timestamp

必须

当前调用时间,格式为"20140101010101”

username

必须

贵方提供的用户名

password

必须

贵方提供的用户密码

sign

必须

签名规则:

username+password+timestamp+password

    将上面字符串MD5加密后转为小写。

 

 

【返回结果】

类型JSON

参数

描述

access_token

获取到的token

expires_at

过期时间

 

 

【示例代码】

参数范例:

·username = yourname

·password = yourpassword

·timestamp = 2015-12-12 12:12:12

yournameyourpassword2015-12-12 12:12:12yourpassword

sign值为上面字符串MD5加密后转为小写,结果如下:

2c43405533a1a8cb2e37364824385ca6

具体的url为:

https://贵方域名/api/access_token?username=yourname&password=yourpassword×tamp=2015-12-12 12:12:12&sign=2c43405533a1a8cb2e37364824385ca6

返回示例如下:

{

    "success" : true,

"access_token" : "access_token",

"expires_at" : "2014-01-02 01:01:01"

}

注:请设置token失效时间12个小时。

如果所有的接口请求的token失效了,返回结果desc必须包含“token_expired”英文文字标识。方便确定是否需要重新获取token

{

    "success" : false,

"desc”: “token_expired"

}

 

3.2 获取平台信息接口

【请求URLhttps://方域名/gyssc/platform/info

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

 

【返回】

 

【返回结果】

{

"success": true,

"result":

     [

         {

       "code": "codeA",

       "name": "平台名称A"

     },

     {

"code": "code"B,

 "name": "平台名称B"

     }

     ]

}

 

 

3.3 获取平台品目信息接口

【请求URLhttps://方域名/gyssc/platform/catalogs

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

platformCode

必须

平台code标识

 

【返回】

 

 

【返回结果】

{

"success": true,

"result":

     [

          {

       "id": 36,

       "name": "三级品目11",

       "treeNames": "一级品目-二级品目1-三级品目11-"

     },

     {

       "id": 37,

       "name": "三级品目22",

       "treeNames": "一级品目-二级品目2-三级品目22-"

     }

     ]

}

3.4 获取平台品牌信息接口(非必须---陕西电子卖场须使用平台品牌库

3.4.1获取平台全部品牌信息接口

【请求URLhttps://方域名/gyssc/platform/brands

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

platformCode

必须

平台code标识

 

【返回】

 

 

【返回结果】

 

{

  "result": {

    "1": "360",

    "2": "AOC",

    "3": "Clear One",

    "4": "e-cology",

    "5": "EE",

    "6": "E",

    "7": "H3C",

    "8": "HAPPYAIR",

    "9": "IQ",

    "10": "ITC",

    

  },

  "success": true

}

3.4.2根据品目获取平台品牌信息接口

【请求URLhttps://我方域名/gyssc/platform/getbrandsByCatalog

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

platformCode

必须

平台code标识

catalogId

必须

品目id(支出批量 多个时用 , 拼接)

 

【返回】

 

 

【返回结果】

{

  "result": {

    "6547": [

      {

        "brand_name": "双鱼",

        "id": 177

      },

      {

        "brand_name": "李宁",

        "id": 435

      },

      {

        "brand_name": "金鸥",

        "id": 729

      }

    ],

    "5774": [

      {

        "brand_name": "360",

        "id": 1

      },

      {

        "brand_name": "H3C",

        "id": 7

      }

    ]

  },

  "success": true

}

3.5 获取商品承诺/产品认证信息/七天无理由退货(甘肃、哈尔滨对接)

【请求URLhttps://我方域名/gyssc/platform/getRegionPromise

【请求参数】

 参数名称

是否必须 

描述 

 token

 必须

 授权接口获取的access token

platformCode

必须

平台code标识

catalogId

必须

品目id

 

【返回参数】

 

 参数名称

类型

是否必须

描述 

regionpromiseguid

String

必须

商品承诺/产品认证唯一识别码

promisename

String

必须

商品承诺/产品认证名称

promisetext

String

必须

商品承诺/产品认证描述

promiselogopath

String

必须

商品承诺/产品认证LOGO路径

promisetype

int

必须

商品承诺/产品认证类型

isfile

int

必须

是否需要上传附件

isdefault

int

必须

是否默认必选

isremark

int

必须

是否需要填写备注

 

 

规格与包装

售后服务

商品评价

好评度
100%
普通会员

性价比很高,这样的价能买到这质量非常不错。

2021-11-24 23:39:16
普通会员

东西收到了,很好哦,很喜欢,赞个

2021-11-24 23:39:16
普通会员

东西质量非常好,与卖家描述的完全一致,非常满意,真的很喜欢,完全超出期望值

2021-11-24 23:39:16
普通会员

发货速度非常快,包装非常仔细、严实,物流公司服务态度很好,运送速度很快,很满意的一次购物。

2021-11-24 23:39:16
普通会员

质量很好,物超所值

2021-11-24 23:39:16
普通会员

东西收到了,很好哦,很喜欢,赞个

2021-11-24 23:39:16
普通会员

东西收到了,很好哦,很喜欢,赞个

2021-11-24 23:39:16
普通会员

发货速度非常快,包装非常仔细、严实,物流公司服务态度很好,运送速度很快,很满意的一次购物。

2021-11-24 23:39:16
普通会员

质量很好,非常不错!

2021-11-24 23:39:16
普通会员

东西质量非常好,与卖家描述的完全一致,非常满意,真的很喜欢,完全超出期望值

2021-11-24 23:39:16
普通会员

发货速度非常快,包装非常仔细、严实,物流公司服务态度很好,运送速度很快,很满意的一次购物。

2021-11-24 23:39:16
普通会员

东西收到了,很好哦,很喜欢,赞个

2021-11-24 23:39:16
普通会员

质量很好,物超所值

2021-11-24 23:39:16
普通会员

质量很好,非常不错!

2021-11-24 23:39:16
普通会员

质量好,以后还来你家买。

2021-11-24 23:39:16