Skip to content

后台接口文档

获取商户销售单详情

接口名:/merchant/salemenu/skus
Method : GET
请求:无
响应:

    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  返回json数据列表

示例
    request
        http://test.guanmai.cn:1688/station/merchant/salemenu/skus
    response
        {
          "code": 0,
          "data": {
            "off_shelf": [
            {
                "name": "芥兰|100g",  //商品名
                "merchant_sku_id": null,  //商户的sku编码
                "state": 0,  //上架状态 0为下架,1为上架                           
                "id": "D1576661",  //商品sku_id
                "fresh_days": 3  //尝鲜期
              },
            ],
            "on_shelf": [
              {
                "name": "菜心苗|500g",
                "merchant_sku_id": null,
                "state": 1,
                "id": "D1576660",
                "fresh_days": null
              },
              {
                "name": "菜心|500g",
                "merchant_sku_id": null,
                "state": 1,
                "id": "D1576659",
                "fresh_days": null
              }
            ]
          },
          "msg": "ok"
        }

编辑sku属性

接口名:/merchant/salemenu/sku/clear
Method:POST
请求:

    sku_id  M   string  商品sku_id
    merchant_sku_id O   string   商户编码 
    fresh_days  O   int 尝鲜期,必须为正整数     
响应:

    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息

示例:
    request
        http://test.guanmai.cn:1688/station/merchant/salemenu/sku/update
        post: sku_id=D1576660&fresh_days=5
    response
        {
          "code": 0,
          "data": null
          "msg": "ok"
        }

删除sku属性

接口名:/merchant/salemenu/sku/clear
Method:POST
请求:

    sku_id  M   string  商品sku_id
    attr    O   string  指定清除的属性,merchant_sku_id/fresh_days
响应:

    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息

示例:
    request
        http://test.guanmai.cn:1688/station/merchant/salemenu/sku/clear
        post: sku_id=D1576660&attr=merchant_sku_id
    response
        {
          "code": 0,
          "data": null
          "msg": "ok"
        }

批量获取商品打印信息

接口名:/skuproduct/merchant/print
Method:POST
请求:

    sku_ids  M   string  数组字符串,商品sku_id列表
响应:

    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  json字符串,返回具体的打印商品信息
示例:
    request
        http://test.guanmai.cn:1688/station/skuproduct/merchant/print
        post: sku_id=["D1576660"]
    response
        {
            "data": [
                {
                    "name": "0810小菜心", 
                    "id": "D1576675", 
                    "fresh_days": 1, 
                    "merchant_sku_id": "8899123"
                }
            ], 
            "msg": "ok", 
            "code": 0
        }