Skip to content

商品接口

商品接口

sku

/product/sku_sale/create 创建售卖sku

接口名: /product/sku_sale/create
Method: POST
请求:
    name M string sku名称
    desc M string sku描述
    std_sale_price M int 销售单价
    sale_price M int 销售价格
    sale_unit_name M string 销售单位
    sale_ratio M float 销售规格
    sale_num_least M int 最小下单数
    attrition_rate M float 损耗率
    state M int 销售状态
    is_weigh M bool 是否称重
    slitting M bool 能否分切
    partframe M bool 能否投筐
    stock_type M int 设置库存(0:读取上游库存;1:不设置库存;2:设置库存)
    stocks O int 库存数量(stock_type为2时表示库存数量)
    image O string 图片ID(没有则默认为spu的图片)
    salemenu_id M string 销售单ID
    supply_sku_id M string 采购来源
    spu_id M string spu ID
    images O    list    sku图片
    is_price_timing O   bool 是否时价
    suggest_price_min   O   float 建议价格区间下限
    suggest_price_max   O   float 建议价格区间上限
    ingredients O list 原料列表
      [{
        id M string 物料ID
        supplier_id O 只有在商品类型是原料(采购规格)时才需要传
        proportion M float 配比(sku的销售单位vs原料的基本单位)
        remark_type M int 商品类型(1是采购规格,其他是sku)
        attrition_rate M float 损耗率
      }]    
    clean_food  O   bool    是否净菜
    purchase_spec_id    O   str 采购规格id
    supplier_id     O       str 供应商id
    attrition_rate  O   float   损耗率
    remark_type O int 商品类型
    bind_turnover   O   bool    是否绑定周转物
    tid     O       str     关联周转物id
    turnover_bind_type      O       int 周转物绑定类型:1固定值/2按比例
    turnover_ratio      O       float   周转物数量   
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M string sku ID
逻辑:
    参数校验
    验证spu_id是否有效
    验证salemenu_id是否有效
    验证采购来源sku是否有效
    创建sku

/product/sku/update 更新sku

接口名: /product/sku/update
Method: POST
请求:
    id M string sku ID
    name O string spu名称
    desc O string spu描述
    std_sale_price O float 销售单价(分)
    sale_price O float 销售价格(分)
    sale_unit_name O 销售单位
    sale_ratio O float 销售规格
    sale_num_least O int 最小下单数
    attrition_rate O float 损耗率
    state O int 销售状态
    is_weigh O bool 是否称重
    slitting M bool 能否分切
    partframe M bool 能否投筐
    stock_type O int 设置库存(0:读取上游库存;1:不设置库存;2:设置库存)
    stocks O int 库存数量
    image O string 图片名称
    salemenu_id O string 销售单ID
    supply_sku_id O string 采购来源
    images O    list    sku图片
    is_price_timing O   bool 是否时价
    suggest_price_min   O   float 建议价格区间下限
    suggest_price_max   O   float 建议价格区间上限
    ingredients O list 原料列表
      [{
        id M string 物料ID
        supplier_id O 只有在商品类型是原料(采购规格)时才需要传
        proportion M float 配比(sku的销售单位vs原料的基本单位)
        remark_type M int 商品类型(1是采购规格,其他是sku)
        attrition_rate M float 损耗率
      }]    
    clean_food  O   bool    是否净菜
    purchase_spec_id    O   str 采购规格id
    supplier_id     O       str 供应商id
    attrition_rate  O   float   损耗率
    remark_type O int 商品类型
    bind_turnover   O   bool    是否绑定周转物
    tid     O       str     关联周转物id
    turnover_bind_type      O       int 周转物绑定类型:1固定值/2按比例
    turnover_ratio      O       float   周转物数量
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
逻辑:
    参数校验
    验证sku_id是否有效
    更新sku信息
注:
    std_sale_price 和 sale_price 这两个参数不能同时传

/product/sku_supply/change 修改sku的采购来源

接口名: /product/sku_supply/change
Method: POST
请求:
    sku_ids M list sku ID列表
    supply_sku_id O string 采购来源
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息

/product/sku/delete 删除sku

接口名: /product/sku/delete
Method: POST
请求:
    id M string sku ID
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
逻辑:
    验证sku_id是否有效
    设置sku状态为删除

/product/sku_salemenu/list 根据销售单获取商品列表

Method: GET
请求:
    salemenu_id M string 销售的ID
    category1_ids O list 一级分类ID列表
    category2_ids O list 二级分类ID列表
    pinlei_ids O list 品类ID列表
    state O int 商品状态 (0:下架;1:上架)
    text O string 商品名称、sku_id或spu_id
    sort_direction O string          //排序方向,desc表示降序,asc表示升序
    sort_by O string         //排序字段,sku表示按规格名排序,spu表示按商品名排序
    export_source O str 导出规则,比如“price_rule”
    export O int 商品导出
    offset  O   int
    limit       O       int
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的商品列表
    [{
      'category_id_1': M string 一级分类ID
      'category_name_1': M string 一级分类名
      'category_id_2': M string 二级分类ID
      'category_name_2': M string 二级分类名
      'pinlei_id': M string 品类ID
      'pinlei_name': M string 品类名
      'spu_id': M string spu ID
      'spu_name': M string spu名称
      'sku_id': M string 商品ID
      'sku_name': M string 商品名
      'std_unit_name': M string 标准单位
      'std_sale_price' M int 标准价(分)
      'sale_unit_name': M string 售卖单位
      'sale_ratio': M float 售卖规格
      'sale_price': M int 售卖价(分)
      'state': M int 状态(1:上架;0:下架)
      spu_image M str spu图片
      sku_image M str sku图片
      last_in_stock_price M int 最近入库价
      last_purchase_price M int 最近采购价
      last_qoute_price M int 最近询价
      stock_avg_price M int 库存均价
      outer_id M str sku别名
      over_suggest_price  bool  M   价格是否超出建议价格区间
      is_price_timing M bool 是否时价
      formula_status  int   是否开启公式,0:关闭,1:开启
      formula_info dic 公式内容
      {
        price_type  int   定价价格类型 0/1/2/3/4(现单价/最近询价/最近采购价/最近入库价/库存均价)默认0
        cal_type int   计算类型 0/1/2(加/乘/除)
        cal_num  float 计算因子 加: 正负六位,小数两位; 乘: 大于0,小数两位; 除: 大于0,小数两位
      }
  }]

/product/sku_sale/list 获取spu下的售卖商品信息

接口名: /product/sku_sale/list
Method: GET
请求:
    spu_id M string spu ID
    salemenu_id O string 销售单ID
    salemenu_type O int 销售单类型(2:代售;4:自售)
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的sku信息
    [{
        'sku_id' M string 商品ID
        'sku_name' M string 商品名称
        'desc' M string 商品描述
        'img_url' M string 商品图片链接
        'std_unit_name' M string 标准单位
        'sale_unit_name' M string 售卖单位
        'std_sale_price' M float 标准价(分)
        'sale_price' M float 售卖价(分)
        'sale_ratio' M float 售卖规格
        'sale_num_least' M int 最小下单数
        'attrition_rate' M float 损耗率
        'state' M int 销售状态
        'is_weigh' M bool 是否称重
        'slitting' M bool 分切
        'partframe' M bool 投筐
        'stock_type' M int 库存类型
        'stocks' M int 库存数量
        'salemenu_id' M string 销售单ID
        'salemenu_name' M string 销售单名称
        'supply_sku': M string 供应sku id
        ingredients O list 原料列表
            [{
            id M string 物料ID
            supplier_id O 只有在商品类型是原料(采购规格)时才需要传
            proportion M float 配比(sku的销售单位vs原料的基本单位)
            remark_type M int 商品类型(1是采购规格,其他是sku)
            attrition_rate M float 损耗率
            version     M       int     版本号
            name    M       string  物料名
            technic_flow_len M int 工艺流长度
            }]  
   }]

/product/sku_purchase/list 获取spu下的采购商品信息

接口名: /product/sku_purchase/list
Method: GET
请求:
    spu_id M string spu ID
    salemenu_id M string 销售单ID
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的sku信息
    [{
        'sku_id' M string 商品ID
        'sku_name' M string 商品名称
        'desc' M string 商品描述
        'std_unit_name' M string 标准单位
        'sale_unit_name' M string 售卖单位
        'std_sale_price' M int 标准价(分)
        'sale_price' M int 售卖价(分)
        'sale_ratio' M float 售卖规格
        'state' M int 供应状态
        'salemenu_id' M string 销售单ID
        'salemenu_name' M string 销售单名称
        'img_url' M string 商品图片链接
    }]

/product/sku_supply/list 根据供应商品ID获取商品信息

接口名: /product/sku_supply/list
Method: GET
请求:
    sku_id M string 商品ID
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的商品列表
    [{
        'sku_id' M string 商品ID
        'sku_name' M string 商品名
        'sale_price' M int 售卖价(分)
        'sale_unit_name' M string 售卖单位
        'state' M int 供应状态
        'salemenu_id' M string 销售单ID
        'salemenu_name' M string 销售单名称
    }]

/product/sku_upstream/list 获取spu下的可见上游商品

接口名: /product/sku_upstream/list
Method: GET
请求:
    spu_ids M list spu IDs
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回的spu下的sku列表
    {
        spu_id: [{ M string spu ID
            'sku_id' M string 商品ID
            'sku_name' M string 商品名称
            'desc' M string 商品描述
            'std_unit_name' M string 标准单位
            'sale_unit_name' M string 售卖单位
            'std_sale_price' M int 标准价(分)
            'sale_price' M int 售卖价(分)
            'sale_ratio' M float 售卖规格
            'state' M int 供应状态
            'salemenu_id' M string 销售单ID
            'salemenu_name' M string 销售单名称
            'img_url' M string 商品图片链接
        }]
    }

product/sku/batch_delete 批量删除sku

method
    POST
request
    all M int 0/1 是否修改全部sku
    search_from M int 1:报价单 2:商品库
    sku_list O list 当不用全部修改sku时只接收sku_list
    salemenu_ids O list 销售单list
    salemenu_status O int
    category1_ids O list 一级分类ID列表
    category2_ids O list 二级分类ID列表
    pinlei_ids O list 品类ID列表
    state O int 商品状态 (0:下架;1:上架)
    salemenu_is_active O int 报价单状态 1已激活
    formula O int 定价公式状态 0关闭,1开启
    search_text O string 商品名称、sku_id或spu_id

response

    async    M   int     0:同步,1:异步
    task_url  M   null/str    异步返回url,同步则为null
    msg             M       str                 返回信息 比如“ok”
    code            M       int                 状态码 成功时为0
逻辑:
        校验删除的sku是否属于对应站点
        删除sku,同步代售报价单sku

/product/sku/smart_formula_pricing/list 获取所选sku的智能定价信息

method
    post
request
    # 筛选部分
    all                      M  int   0/1 是否修改全部商品价格,传1时category1_ids,category2_ids,pinlei_ids,q 必传
                                                             传0时smart_price_sku_list 必传
    category1_ids            O  list  一级分类ids 仅更新全部时有效 同merchandise/spu/index搜索条件
    category2_ids            O  list  二级分类ids 仅更新全部时有效 同merchandise/spu/index搜索条件
    pinlei_ids               O  list  品类ids    仅更新全部时有效 同merchandise/spu/index搜索条件
    q                        O  str   查询字符串  仅更新全部时有效 同merchandise/spu/index搜索条件
    state                    O  int   0/1/NULL(上架中/已下架/全部)
    salemenu_id              O  str   销售单id
    sku_list                 O  list  部分智能定价商品sku_id列表 仅all为0时有效
    filter_price_region      O  int   定价范围筛选类型 0/1(默认/增加区间筛选)默认0
    filter_price_type        O  int   定价区间筛选类型 0/1/2/3/4(现单价/最近询价/最近采购价/最近入库价/库存均价)默认0
    price_region_min         O  float 定价价格筛选区间下限 不填该字段不传 应大于0
    price_region_max         O  float 定价价格筛选区间上限 不填该字段不传 应大于0,大于等于下限
    # 确认页面
    re_category1_ids         O  int   一级分类ids 二次搜索
    re_category2_ids         O  int   二级分类ids 二次搜索
    re_pinlei_ids            O  int   品类ids     二次搜索
    re_q                     O  str   查询字符串   二次搜索
    offset                   O  int   二次确认分页用 默认0
    limit                    O  int   二次确认分页用 默认10
response
    # 二次确认返回数据
    {
        "data": {
            'count':   商品数
            'sku_list': [{
                'sku_id'             sku_id
                'name'               商品名
                'salemenu_name'      销售单名
                'old_price'          现单价
                'new_price'          更新后单价
                'ratio'              销售系数
                'std_unit_name'      基本单位
                'sale_unit_name'     销售单位  (规格 = 销售系数 基本单位/销售单位)
                'sale_price'         销售价
                'over_suggest_price' 价格是否超出建议价格区间 bool
                'suggest_price_min'  建议价格区间下限  未设置传-1
                'suggest_price_max'  建议价格区间上限  未设置传-1
                'last_in_stock_price'最近入库价
                'last_purchase_price'最近采购价
                'last_qoute_price'   最近询价
                'stock_avg_price'    库存均价
            },],

        },
        "msg": "ok",
        "code": 0,
        'pagination':{
            'peek',
            'page_obj',
            'more',
            'reverse'
        }
    }

product/sku/batch_update 批量修改sku

method
        post
request
        新增
        all O int 兼容老接口,如果传all=1表示全部页批量修改
        skus    M   list    sku信息的列表(字段参考接口/product/sku/update)
        # sku传递的字段
        # id O string sku ID  # 当all=1时由后台通过spu查询sku
        # spu_id M string spu id
        # std_sale_price M float 销售单价(基本单位)     # 可修改数据 单位 元
        # sale_ratio M float 销售规格                  # 可修改数据
        # supplier_id M string 供应商ID                # 可修改数据
        # purchase_spec_id M string 采购规格ID          # 可修改数据
响应
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
逻辑:
        根据用户所填写的想要修改的字段
        后台进行更新sku

/product/sku/smart_formula_pricing/update 批量更新设置sku定价公式

method
    post
request
    all                      M  int   0/1 是否修改全部商品价格,传1时category1_ids,category2_ids,pinlei_ids,q 必传。传0时只通过sku_list的范围进行更新。
                                                             传0时smart_price_sku_list 必传
    category1_ids            O  list  一级分类ids 仅更新全部时有效 同merchandise/spu/index搜索条件
    category2_ids            O  list  二级分类ids 仅更新全部时有效 同merchandise/spu/index搜索条件
    pinlei_ids               O  list  品类ids    仅更新全部时有效 同merchandise/spu/index搜索条件
    q                        O  str   查询字符串  仅更新全部时有效 同merchandise/spu/index搜索条件
    state                    O  int   0/1/NULL(上架中/已下架/全部)
    salemenu_id              O  str   销售单id

    sku_list M list 多个skuID,单个修改只传一个
    formula_status M int 0:关闭1:开启

    filter_price_region  O  int   定价范围筛选类型 0/1(默认/增加区间筛选)默认0
    filter_price_type  O  int   定价区间筛选类型 0/1/2/3/4(现单价/最近询价/最近采购价/最近入库价/库存均价)默认0
    price_region_min  O  float 定价价格筛选区间下限 不填该字段不传 应大于0
    price_region_max  O  float 定价价格筛选区间上限 不填该字段不传 应大于0,大于等于下限
    price_type  M  int   定价价格类型 0/1/2/3/4(现单价/最近询价/最近采购价/最近入库价/库存均价)默认0
    cal_type M  int   计算类型 0/1/2(加/乘/除)
    cal_num  M  float 计算因子 加: 正负六位,小数两位; 乘: 大于0,小数两位; 除: 大于0,小数两位
response
{
  "msg": "ok",
  "code": 0
}
逻辑:
        根据填写的公式类型和标准
        批量更新sku的公式字段

/product/all_sku_supplier/list 批量修改全选状态页详情

method
    get
request
    all M   int (0:当前页,1:全部页)
    spu_list O list spuids,只有在all为0时有效,适用于当前页
    category1_ids O list 一级分类ID列表
    category2_ids O list 二级分类ID列表
    pinlei_ids O list 品类ID列表
    salemenu_ids O list 报价单列表
    q O string 查询参数(按SPU别名/SKU名,SPUID/SKUID搜索)
    formula O int 是否按照预设公式展示(0:显示关闭公式的sku;1:显示开启公式的sku;默认显示全部)
    offset O int 偏移量 默认0
    limit O int 返回个数 默认10
response
        {
  "code": 0,
  "data": [
                    {
                        spu_id: 'C920973'
                        spu_name:   '白菜'
                        sku_count:  4
                        spu_supplier:
                  [
                    {
                    "upstream": 0,
                    "name": "蔬菜供应商",
                    "id": "T11087"
                    },
                  ],
                    }
                ]
    "msg": "ok",
  "pagination": {
    "offset": 20,
    "count": 4000,
    "limit": 10
  }

/station/skus/addr 订单添加商品接口/常用商品

Method:GET
请求:
    address_id   M   int     商户ID
    search_text  M   string  商品sku_id或者商品名称
    time_config_id M string  时间配置ID
    fetch_category O int     0-表示不拉取分类;1-表示拉取分类;
    active       O   int     0-表示拉取全部状态商品;1-表示只拉取有效的商品;
    usual_type   M    int    2表示用于sku搜索接口,1表示用于展示常用商品列表 
    offset       O   int     分页offset
    limit        O   int     分页limit

响应:

    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    id    M   string  SKUID
  sync_origin_id    M   string   真实交易ID
  spu_id    M   string  SPUID
  category_id_1 M   string  一级分类ID
  category_id_2 M   string  二级分类ID
  category_title_1  O   string  一级分类名
  category_title_2  O   string  二级分类名
  station_id    M   string  站点ID
  salemenu_id   M   string  销售单ID
  salemenu_name    M    string    销售单名称
  supplier_name M   string  供应商名
  name  M   string  商品名字
  desc  M   string  描述
  sale_unit_name    M   string  销售单位名
  std_unit_name M   string  标准单位名
  unit_price    M   float   标准单价
  sale_ratio    M   float   售卖比例
  sale_price    M   float   售卖单价
  state M   int 是否上架
  is_weigh  M   int 是否称重
  sale_num_least    M   float   最小售卖数
  outer_id  M   string  自定义ID
  is_price_timing   M   bool    是否时价
  frequency    O    int    下单频次
  last_quote_price    M    int    最近询价
        {earlier         M       list<dict>
            [
                price                       M       float       价格
                purchase_supplier_id        M       str         供应商id
                purchase_supplier_name      M       str         供应商名称
                is_priority                 O       int         是否为优先供应商,true:是
            ]
        newest         M       list<dict>
            [
                price                       M       float       价格
                purchase_supplier_id        M       str         供应商id
                purchase_supplier_name      M       str         供应商名称
                is_priority                 O       int         是否为优先供应商,true:是
            ]
        }
  last_purchase_price    M    int    最近采购价
        {earlier         M       list<dict>
            [
                price                       M       float       价格
                purchase_supplier_id        M       str         供应商id
                purchase_supplier_name      M       str         供应商名称
                is_priority                 O       int         是否为优先供应商,true:是
            ]
        newest         M       list<dict>
            [
                price                       M       float       价格
                purchase_supplier_id        M       str         供应商id
                purchase_supplier_name      M       str         供应商名称
                is_priority                 O       int         是否为优先供应商,true:是
            ]
        }
  last_in_stock_price    M    int    最新入库价
        {earlier         M       list<dict>
            [
                price                       M       float       价格
                purchase_supplier_id        M       str         供应商id
                purchase_supplier_name      M       str         供应商名称
                is_priority                 O       int         是否为优先供应商,true:是
            ]
        newest         M       list<dict>
            [
                price                       M       float       价格
                purchase_supplier_id        M       str         供应商id
                purchase_supplier_name      M       str         供应商名称
                is_priority                 O       int         是否为优先供应商,true:是
            ]
        }
  stock_avg_price     M    int    库存均价
  tax_rate    O    int    税率
  price_origin  M  int 价格来源。1:价格来自报价单,2:价格来自索价
  latest_in_stock_price   M     int 最近入库价    不存在为null
    latest_quote_price      M       int 最近询价      不存在为null
    imgs                                M               str     sku图片
    clean_food                  M               bool 是否为净菜


示例:
    request
        http://station.guanmai.cn/station/skus/addr?address_id=6191&offset=0&limit=10&search_text=上海青&fetch_category=1&active=1&time_config_id=ST001


    response
        {
  "msg": "ok",
  "code": 0,
  "data": [
    {
      "unit_price": "23.10",
      "now_stocks": 0,
      "category_id_1": "A3773",
      "pinlei_id": "P345256",
      "sale_num_least": 1.0,
      "purchase_supplier_id": "T7448",
      "stock_type": 2,
      "split_flag": 3,
      "desc": "",
      "sync_origin_id": "D2541205",
      "clean_food": false,
      "latest_std_sale_price": null,
      "latest_std_unit_name": null,
      "s_type": 0,
      "sale_price": "23.10",
      "supplier_name": "蛋类",
      "category_title_1": "蛋类",
      "sync_state": 1,
      "imgs": "https://img.guanmai.cn/product_pic/ebf5c88d7fd53c86.png",
      "spu_id": "C841257",
      "purchase_spec_id": "D2541204",
      "category_id_2": "B18243",
      "status": 2,
      "outer_id": "123",
      "is_weigh": true,
      "is_price_timing": false,
      "station_id": "T7442",
      "state": 1,
      "purchase_create_version": 11,
      "last_quote_price": {
        "newest": {
          "purchase_supplier_id": "T7448",
          "purchase_supplier_name": "蛋类供应商",
          "price": 2300
        },
        "earlier": [

        ]
      },
逻辑:
        根据usual_type判断搜索类型:常用/普通
        根据search_text模糊搜索
        如果sku数量不到20个,则从商品库拉取其他sku

station/skus/recognize 智能文字识别下单

Method: GET
请求:
    address_id     M    int     商户ID
    recognition_text    M    string    智能识别的文字信息
    time_config_id    M    string    时间配置ID
    fetch_category    O    int   0-表示不拉取分类;1-表示拉取分类
    active    O   int   0-表示拉取全部状态商品;1-表示只拉取有效的商品
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M dic {
    index: M list []  正则识别成功文字的索引,用于给前端标注哪些识别失败的地方
    vaild  M  list 识别成功的sku
    [[
      id    M   string  SKUID
      sync_origin_id    M   string   真实交易ID
      spu_id    M   string  SPUID
      category_id_1 M   string  一级分类ID
      category_id_2 M   string  二级分类ID
      category_title_1  O   string  一级分类名
      category_title_2  O   string  二级分类名
      station_id    M   string  站点ID
      salemenu_id   M   string  销售单ID
      salemenu_name    M    string    销售单名称
      supplier_name M   string  供应商名
      name  M   string  商品名字
      desc  M   string  描述
      sale_unit_name    M   string  销售单位名
      std_unit_name M   string  标准单位名
      unit_price    M   float   标准单价
      sale_ratio    M   float   售卖比例
      sale_price    M   float   售卖单价
      state M   int 是否上架
      is_weigh  M   int 是否称重
      sale_num_least    M   float   最小售卖数
      outer_id  M   string  自定义ID
      is_price_timing   M   bool    是否时价
      frequency    O    int    下单频次
      last_quote_price    M    int    最近询价
      last_purchase_price    M    int    最近采购价
      last_in_stock_price    M    int    最新入库价
      stock_avg_price     M    int    库存均价
      tax_rate    O    int    税率
      price_origin  M  int 价格来源。1:价格来自报价单,2:价格来自索价
      latest_in_stock_price   M     int 最近入库价    不存在为null
      latest_quote_price      M     int 最近询价      不存在为null
      imgs                              M               str     sku图片
      clean_food                    M               bool 是否为净菜
    ],]
    error_num   M   int 识别失败的个数

响应示例
    {  
   "data":{  
      "vaild":[  
         [  
            {  
               "sale_num":"3",
               "sale_ratio":1.0,
               "attrition_rate":0.0,
               "category_title_2":"牛",
               "outer_id":"",
               "last_purchase_price":{  
                  "earlier":[  

                  ],
                  "newest":{  
                     "purchase_supplier_id":"T13384",
                     "price":0,
                     "purchase_supplier_name":"综合供应商"
                  }
               },
               "version":8,
               "price_origin":1,
               "category_id_2":"B37093",
               "modify_time":"2019-06-12T16:20:25.750",
               "frequency":1,
               "stocks":-99999,
               "state":1,
               "category_title_1":"畜类",
               "purchase_spec_id":"D4207346",
               "s_type":0,
               "spu_id":"C1375671",
               "formula_info":{  
                  "price_type":0,
                  "cal_type":0,
                  "cal_num":500
               },
               "id":"D7552579",
               "stock_type":1,
               "split_flag":3,
               "is_weigh":1,
               "sale_unit_name":"斤",
               "is_price_timing":false,
               "stock_avg_price":0.0,
               "supplier_name":"自售单不许删",
               "latest_in_stock_price":0,
               "imgs":"https://img.guanmai.cn/product_pic/f39f5907a0ef6189.jpg",
               "formula_status":1,
               "purchase_supplier_id":"T13384",
               "std_unit_name":"斤",
               "tax_rate":0,
               "suggest_price_min":null,
               "unit_price":"18.00",
               "remark_type":7,
               "suggest_price_max":null,
               "last_quote_price":{  
                  "earlier":[  
                     {  
                        "purchase_supplier_id":"T13251",
                        "price":100,
                        "purchase_supplier_name":"水果供应商"
                     },
                     {  
                        "purchase_supplier_id":"T20991",
                        "price":100,
                        "purchase_supplier_name":"综合"
                     },
                     {  
                        "purchase_supplier_id":"T11365",
                        "price":134,
                        "purchase_supplier_name":"蔬菜供应商"
                     }
                  ],
                  "newest":{  
                     "purchase_supplier_id":"T13384",
                     "price":213,
                     "purchase_supplier_name":"综合供应商"
                  }
               },
               "sale_num_least":1.0,
               "purchase_create_version":1,
               "category_id_1":"A7661",
               "sync_origin_id":"D7552579",
               "sync_state":1,
               "pinlei_id":"P385923",
               "sale_price":"18.00",
               "last_in_stock_price":{  
                  "earlier":[  

                  ],
                  "newest":{  
                     "purchase_supplier_id":"T13384",
                     "price":0,
                     "purchase_supplier_name":"综合供应商"
                  }
               },
               "salemenu_id":"S12731",
               "desc":"",
               "spu_remark":null,
               "name":"牛柳",
               "station_id":"T7936",
               "latest_quote_price":134,
               "status":2,
               "create_time":"2018-12-21T20:11:07.735",
               "ingredients":[  
                  {  
                     "id":"D4207346",
                     "remark_type":1,
                     "proportion":1.0,
                     "attrition_rate":0.0,
                     "version":1,
                     "supplier_id":"T13384"
                  }
               ]
            }
         ]
      ],
      "index":[  
         [  
            0,
            4
         ]
      ],
      "error_num":0
   },
   "code":0,
   "msg":"ok"
}

新品需求

product/new_merchandise/list 「station 中获取商品需求列表」

跳转链接: product/new_merchandise/list

product/new_merchandise/updata 「station 修改需求列表」

跳转链接: product/new_merchandise/updata

product/new_merchandise/export 「商品需求数据导出功能」

跳转链接: product/new_merchandise/export