OPENAPI V3
登录控制台
首次登录赠送 10000 Token,可直接调试接口
充值、回调配置、调用日志、接口调试均在控制台完成

网单接口文档

网单接口用于查询线上订单(美团、饿了么、抖音、小程序等)及其商品明细。

网单接口

新增网单

POST
/openapi/v3/product-order/create

客户有自己的商城或者小程序,将订单推送到开放平台,开放平台处理商品,会员,支付等数据后,将订单下发到银豹收银系统。客户在银豹收银系统完成 接单-厨打-配送-收银 等一系列操作。收银后,生成销售单据,并扣相应商品库存。

Token 消耗 固定 200 token/次

请求参数

参数 类型 必填 说明
accountstring业务门店账号;网单会写入该账号对应门店。
timestring下单时间,格式 yyyy-MM-dd HH:mm:ss;不传默认当前时间。
orderNostring网单订单号,最大 32 位;建议不传,由银豹按默认规则生成。同一门店下不能重复。若客户传入自定义 orderNo,可在“网单/网络订单”界面搜索;但不符合银豹标准网单号格式时,不能在 POS “核销”界面通过网单号核销。
productOrderItemsarray<object>网单商品明细,至少 1 条,最多 200 条。
paymentsarray<object>支付方式列表;建议别传,由接口按规则自动处理。
commentstring订单备注。
contactAddressstring订单联系地址;配送订单可传配送地址。
contactTelstring订单联系人电话。
contactNamestring订单联系人姓名。
customerNumberstring会员编号;传入时必须存在。
shippingFeedecimal配送费,必须大于等于 0。
packageFeedecimal打包费,必须大于等于 0。
serviceFeedecimal服务费,必须大于等于 0。
activityFeeShopPartdecimal商家承担活动优惠金额,必须大于等于 0。
activityFeePlatFormPartdecimal平台承担活动优惠金额,必须大于等于 0。
latitudedouble配送地址纬度。
longitudedouble配送地址经度。
taxFeedecimal税费,必须大于等于 0。
totalAmountdecimal订单总金额,单位元;必须大于等于 0;以客户业务系统订单最终金额为准。
originalPricedecimal优惠前订单原价;不传默认等于订单总金额。
payTypeint支付类型:1 到店支付,2 在线支付;不传默认 2
deliveryTimestring预计送达时间,格式 yyyy-MM-dd HH:mm:ss
daySeqstring门店当日流水号或取餐序号。
deliveryTypeint配送类型,0:配送,1:自助点餐/自取;需要 POS 核销时请传 1
guestNumberint就餐人数,必须大于等于 0。
restaurantAreaNamestring堂食区域名称。
restaurantTableNamestring堂食桌台名称。
reservationTimestring预约到店/自提时间,格式 yyyy-MM-dd HH:mm:ss

支付明细字段

说明:payments 本身非必填;只有传入支付明细数组时,数组内每个对象才必须包含 payMethodCodepayAmountpayType=2 且不传 payments 时,服务端会自动使用开放平台支付;payType=1 时不允许传 payments

对象 字段 类型 必填 说明
payments[]payMethodCodeint条件必填仅当传入 payments[] 时必填。支付方式编码:7 会员余额;19 购物卡;-1755 开放平台。
payments[]payAmountdecimal条件必填仅当传入 payments[] 时必填。本支付方式支付金额必须大于 0,所有支付明细金额合计必须等于 totalAmount
payments[]shoppingCardUidlong条件必填仅当传入 payments[]payMethodCode=19 时必填,表示本次扣款的购物卡 UID;其他支付方式不允许传。

商品明细字段

说明:子字段的“必填”仅针对其父对象已传入的场景。productOrderItemAttributes 本身非必填;只有传入商品口味数组时,数组内每个对象才必须包含 productAttributeUid

对象 字段 类型 必填 说明
productOrderItems[]productBarcodestring商品条码或客户商品编码。服务端优先按条码匹配银豹商品资料,未匹配到时按未维护商品处理。
productOrderItems[]productNamestring条件必填商品名称。银豹已维护商品可不传;未维护商品必须传。
productOrderItems[]commentstring商品明细备注。也可以直接把口味等信息写在备注上。比如 去冰,3分甜,珍珠,椰果
productOrderItems[]eShopSellPricedecimal条件必填网店销售单价。银豹已维护商品可不传,默认取商品售价;未维护商品必须传。
productOrderItems[]productQuantitydecimal购买数量,必须大于 0。
productOrderItems[]productBuyPricedecimal未维护商品的进货价或成本价;不传默认 0。银豹已维护商品自动取商品资料成本价。
productOrderItems[]totalAmountdecimal商品明细实收小计。仅在实收小计不等于 eShopSellPrice * productQuantity 时传;不传则服务端自动计算。
productOrderItems[]productOrderItemAttributesarray<object>商品口味,最多 200 条。
productOrderItemAttributes[]productAttributeUidlong条件必填仅当传入 productOrderItemAttributes[] 时必填;不传商品口味时无需传。商品口味 UID 必须大于 0,且必须存在于商品口味资料中。
productOrderItemAttributes[]attributeValuedecimal商品口味值;如果没传,默认使用口味uid对应的值

业务规则

  • 新增成功后网单状态固定为null(初始化)。
  • orderNo 建议不传,统一由银豹默认规则生成。同一门店下,订单号不能重复。客户传入自定义 orderNo 时,可用于“网单/网络订单”界面搜索;若不符合银豹标准网单号格式,不能在 POS “核销”界面通过网单号核销。
  • payType 如果钱已经支付了,不用传。如果想把订单推到银豹后,在银豹收钱,传 1
  • 商品明细对外统一使用 productBarcode。条码匹配到银豹商品资料时,商品 UID、名称、售价、成本价会自动补齐;未匹配到时,按客户未维护商品落单,商品 UID 固定写入 0
  • payType=2payments 不传或为空时,服务端写入一条 payMethodCode=-1755payMethodName=开放平台 的已完成支付明细。
  • payments 非空,payMethodCode=7 时,服务端写入 payMethodName=CustomerBalance,并校验、扣减会员余额;余额不足时整单失败。
  • payments 非空,payMethodCode=19 时,服务端写入 payMethodName=购物卡,并校验、扣减指定购物卡余额;购物卡不存在、不属于当前会员或余额不足时整单失败。
  • 购物卡支付会校验 shoppingcard.expireDateTime,已过期购物卡不能使用;购物卡规则 shoppingcardrule.payLimit 非空时,会按订单总金额计算单笔最高可用金额,例如订单总额 200payLimit=80 时,该规则购物卡最多支付 160
  • payments 非空,payMethodCode=-1755 时,服务端写入 payMethodName=开放平台,只写支付明细,不扣减会员余额或购物卡余额。
  • 支付明细中包含会员余额或购物卡时,必须传 customerNumber 并能匹配到会员。

请求示例:银豹已维护商品

{
  "account": "store001",
  "time": "2026-05-18 12:30:00",
  "orderNo": "WEB202605180001",
  "contactAddress": "上海市浦东新区示例路 1 号",
  "contactTel": "13800138000",
  "contactName": "张三",
  "customerNumber": "VIP0001",
  "deliveryType": 0,
  "totalAmount": 88.50,
  "productOrderItems": [
    {
      "productBarcode": "690000000001",
      "productQuantity": 2,
      "productOrderItemAttributes": [
        {
          "productAttributeUid": 20000001,
          "attributeValue": 2.00
        }
      ]
    }
  ]
}

请求示例:银豹未维护商品

{
  "account": "store001",
  "contactTel": "13800138000",
  "contactName": "张三",
  "totalAmount": 44.00,
  "productOrderItems": [
    {
      "productBarcode": "CUSTOMER-SKU-001",
      "productName": "客户系统商品名称",
      "productQuantity": 2,
      "eShopSellPrice": 22.00,
      "productBuyPrice": 10.00
    }
  ]
}

请求示例:组合支付

{
  "account": "store001",
  "contactAddress": "上海市浦东新区示例路 1 号",
  "contactTel": "13800138000",
  "contactName": "张三",
  "customerNumber": "VIP0001",
  "deliveryType": 0,
  "totalAmount": 35.00,
  "productOrderItems": [
    {
      "productBarcode": "690000000001",
      "productQuantity": 1,
      "eShopSellPrice": 35.00
    }
  ],
  "payments": [
    {
      "payMethodCode": 7,
      "payAmount": 10.00
    },
    {
      "payMethodCode": -1755,
      "payAmount": 25.00
    }
  ]
}

请求示例:购物卡支付

{
  "account": "store001",
  "contactTel": "13800138000",
  "contactName": "张三",
  "customerNumber": "VIP0001",
  "totalAmount": 5.00,
  "productOrderItems": [
    {
      "productBarcode": "690000000001",
      "productQuantity": 1,
      "eShopSellPrice": 5.00
    }
  ],
  "payments": [
    {
      "payMethodCode": 19,
      "payAmount": 5.00,
      "shoppingCardUid": 100001
    }
  ]
}

返回示例

{
  "status": "success",
  "errorCode": 0,
  "result": {
    "id": 6036824,
    "orderNo": "WEB202605180001",
    "duplicate": false,
    "orderCreateDateTime": "2026-05-18 12:30:00"
  }
}

返回字段说明

字段 类型 说明
idlong网单主键 ID。
orderNostring网单订单号;客户传入时返回客户传入值,未传时返回服务端生成值。
duplicateboolean是否命中已有网单;当前新建成功返回 false
orderCreateDateTimestring网单下单时间,格式 yyyy-MM-dd HH:mm:ss

查询网单

POST
/openapi/v3/product-order/increment-page

请求参数

参数 类型 必填 说明
accountstring业务门店账号;
idlong网单主键 ID;传入时按精准查询计费。
orderNostring网单订单号;传入时按精准查询计费。
stateint网单状态。
datetimeBeginstring下单时间开始,格式 yyyy-MM-dd HH:mm:ss,包含该时间。
datetimeEndstring下单时间结束,格式 yyyy-MM-dd HH:mm:ss,不包含该时间,必须大于 datetimeBegin
lastIdlong分页游标。首次传 0 或不传;后续传上一次响应中的 nextLastId
orderstring排序方向,仅支持 ascdesc,默认 asc
limitint分页大小,默认 100,最大 100
needOrderItembooleantrue 时返回 productorderitem,额外消耗 20 token。
needOrderItemAttributebooleantrue 时返回 productorderitemattribute,额外消耗 20 token;服务端会自动加载商品明细作为属性挂载容器。

计费规则

  • idorderNo 任一字段时,基础消耗 100 token
  • 未传 idorderNo 时,按普通分页/范围查询计费,基础消耗 500 token
  • needOrderItem=true 额外消耗 20 token
  • needOrderItemAttribute=true 额外消耗 20 token

请求示例

{
  "account": "store001",
  "id": 6036824,
  "orderNo": "WEB202605180001",
  "state": 1,
  "datetimeBegin": "2026-05-01 00:00:00",
  "datetimeEnd": "2026-05-19 00:00:00",
  "lastId": 0,
  "order": "asc",
  "limit": 100,
  "needOrderItem": true,
  "needOrderItemAttribute": true
}

返回示例

{
  "status": "success",
  "errorCode": 0,
  "result": {
    "list": [
      {
        "id": 6036824,
        "time": "2026-05-18 12:30:00",
        "state": 1,
        "storeId": 10001,
        "customerAddress": "上海市浦东新区示例路 1 号",
        "customerTel": "13800138000",
        "customerName": "张三",
        "customerNumber": "VIP0001",
        "orderNo": "WEB202605180001",
        "deliveryType": 0,
        "totalAmount": 88.50,
        "orderSource": "MEITUAN_WAIMAI",
        "orderSourceSn": "MT202605180001",
        "updateTime": "2026-05-18 12:35:00",
        "sysUpdateTime": "2026-05-18 12:36:00",
        "productOrderItems": [
          {
            "id": 14749932,
            "productOrderId": 6036824,
            "productName": "拿铁",
            "productUid": 10000001,
            "productQuantity": 2,
            "productSellPrice": 22.00,
            "totalAmount": 44.00,
            "productOrderItemAttributes": [
              {
                "id": 944975,
                "productOrderItemId": 14749932,
                "productAttributeUid": 20000001,
                "attributeGroup": "taste",
                "attributeName": "甜度",
                "attributeValue": "少糖"
              }
            ]
          }
        ]
      }
    ],
    "hasMore": false,
    "nextLastId": 6036824
  }
}

返回字段说明

下表按当前接口 VO 完整列出网单主表返回字段。字段值为 null 时可能不出现在响应中。

字段 类型 说明
idlong网单主键 ID,可作为下一页分页游标来源。
timestring网单下单时间,格式为 yyyy-MM-dd HH:mm:ss
stateint网单状态: null 初始化 1 收到网单 2 已到店/已发货 3 已作废 4 已完成 5 已确认 8 待厨打/下发配送订单 20 客户确认订单 21 客户拒绝订单
storeIdint门店 ID,用于标识该网单所属门店,关联门店用户 ID。
customerAddressstring顾客收货地址或订单配送地址。
customerTelstring顾客联系电话。
customerNamestring顾客姓名或收货人名称。
customerIdlong顾客/会员用户 ID,非会员或无法匹配会员时可能为空。
customerNumberstring顾客会员编号。
orderNostring网单订单号,可用于精准查询单笔网单。
commentstring顾客下单备注或订单备注。
paymentMethodstring支付方式名称或来源平台返回的支付方式描述。
isOnlinePaymentCompletedint在线支付完成标记,用于判断线上支付是否已完成。1:已支付 null/0:未支付
deliveryTypeint履约方式: 0 或空为外卖 1 自助点餐 2 自提 3 预约 4 平台配送 11 批发当场出货 12 批发仓库出货
totalAmountdecimal订单总金额,单位元。
reservationTimestring预约到店/自提时间,仅自提单且带到店时间时返回。
taxFeedecimal税费金额,单位元。
serviceFeedecimal服务费金额,单位元。
shippingFeedecimal配送费或运费金额,单位元。
orderSourcestring订单来源标识,例如第三方外卖平台、小程序等。 MEITUAN_WAIMAI 美团外卖 ELEME_WAIMAI 饿了么 ELEBE_WAIMAI 饿百 ZIYING_MINIAPP 银豹小程序 ZIYING_MIAOSHA 秒杀单 ZIYING_KANJIA 砍价
orderSourceKeystring来源侧订单主键,用于和第三方或来源系统订单关联。
orderSourceSnstring第三方外卖平台单号;批发场景下可能为配货仓库用户 ID。
originalPricedecimal订单优惠前原价金额,单位元。
deliveryTimestring用户预计送达时间;“立即送达”场景可能返回 0 或为空。
payTypeint支付类型:1 到店支付/货到付款,2 在线支付。
updateTimestring网单业务更新时间,格式为 yyyy-MM-dd HH:mm:ss
packageFeedecimal打包费金额,单位元。
totalProfitdecimal订单总利润金额,单位元。
discountdecimal订单优惠金额,单位元。
usedPointdecimal本次订单使用的积分数量。
pointAfterUseddecimal积分使用后剩余的积分数量。
pointToMoneydecimal本次使用积分抵扣的金额,单位元。
guiderUidlong导购员 UID,用于关联订单所属导购。
daySeqstring门店当日订单流水号或取餐序号。
latitudedouble配送地址纬度。
longitudedouble配送地址经度。
restaurantAreaNamestring堂食餐厅区域名称。
restaurantTableNamestring堂食餐桌名称。
activityFeeShopPartdecimal商家承担的活动优惠金额,单位元。
activityFeePlatFormPartdecimal平台承担的活动优惠金额,单位元。
guestNumberint堂食或预约场景的就餐人数。
payMethodCodeint支付方式编码,对应系统支付方式字典。
cancelReasonstring订单取消原因。
refundReasonstring订单退款原因。
platTypeint下单平台: 0 微信 1 微信小程序 2 支付宝 3 网页 4 字节/抖音小程序 5 支付宝小程序 6 茶饮自助 7 小红书小程序 8 淘宝闪购
businessCommentstring商家内部备注。
businessTypeint业务类型: 0 普通订单 1 预订单 10 拼团/团购 11 社区团购 13 砍价 14 秒杀 15 预售 20 预订餐 22 排队等位预点单 30 盲盒订单 33 微信视频号订单 40 周期购订单 60 企业订单 100 批发开单 200 代客下单 300 付款码单据
sourceTypeint订单来源类型: 0 本店 1 总部直接下单 2 总部选择门店下单 3 商圈 4 连锁小程序/派单中心 5 农贸 10 美团 11 饿了么 12 百度 20 聚合小程序 30 付款码
isReceivedint收货/取货状态:0 未收货/未取货,1 已收货/已取货。
sysCreateTimestring系统创建时间,格式为 yyyy-MM-dd HH:mm:ss
sysUpdateTimestring系统最后更新时间,格式为 yyyy-MM-dd HH:mm:ss
productOrderItemsarray<object>网单商品明细列表,需传 needOrderItem=trueneedOrderItemAttribute=true

明细对象字段

下表完整列出 productOrderItems 和 productOrderItemAttributes 的返回字段。

对象 字段 类型 说明
productOrderItems[]idlong网单商品明细主键 ID。
productOrderItems[]productOrderIdlong所属网单主键 ID,对应主表 id
productOrderItems[]productNamestring商品名称。
productOrderItems[]productUidlong商品 UID,用于关联商品资料。
productOrderItems[]productBarcodestring商品条码。
productOrderItems[]eShopSellPricedecimal网店销售价,单位元。
productOrderItems[]productQuantitydecimal购买商品数量。
productOrderItems[]productBuyPricedecimal商品进货价或成本价,单位元。
productOrderItems[]productSellPricedecimal商品销售单价,单位元。
productOrderItems[]isCustomerDiscountint是否参与会员折扣标记。
productOrderItems[]customerDiscountdecimal会员折扣值或折扣比例。
productOrderItems[]customerPricedecimal会员价,单位元。
productOrderItems[]isCustomerPointint是否参与会员积分标记。
productOrderItems[]commentstring商品明细备注。
productOrderItems[]boxNumint打包盒数量。
productOrderItems[]boxPricedecimal打包盒单价,单位元。
productOrderItems[]unitstring商品销售单位。
productOrderItems[]manualDiscountdecimal人工优惠金额,单位元。
productOrderItems[]productTotalProfitdecimal该商品明细总利润,单位元。
productOrderItems[]productTotalAmountdecimal该商品明细商品金额小计,单位元。
productOrderItems[]productDiscountdecimal该商品明细优惠金额,单位元。
productOrderItems[]kdsStateint厨显/KDS 制作状态。
productOrderItems[]packageNostring套餐编号。
productOrderItems[]stateint商品明细状态: 0 正常 1 退款中 2 退款成功 3 退款失败
productOrderItems[]refundQuantitydecimal该商品明细累计退款数量。
productOrderItems[]refundStateint退款处理状态: -2 初始化 -1 开始第三方支付退款 0 完成第三方支付退款 1 完成非第三方支付退款 2 上传销售单成功 3 上传销售单失败 4 完成非第三方支付退款并返回销售单请求体
productOrderItems[]totalAmountdecimal商品明细小计,包含商品金额和口味金额,单位元。
productOrderItems[]productOrderItemAttributesarray<object>商品明细属性,需传 needOrderItemAttribute=true。
productOrderItemAttributes[]idlong商品明细属性主键 ID。
productOrderItemAttributes[]productOrderItemIdlong所属商品明细 ID,对应 productOrderItems[].id
productOrderItemAttributes[]productAttributeUidlong商品属性 UID,用于关联口味、规格等属性资料。
productOrderItemAttributes[]attributeGroupstring属性分组编码,例如口味组或规格组。
productOrderItemAttributes[]attributeNamestring属性名称,例如甜度、温度、规格名称。
productOrderItemAttributes[]attributeValuestring属性选择值,例如少糖、常温、大杯。
productOrderItemAttributes[]attributeOriginalValuestring属性原始值或口味原价。