订单推送api
| 接口地址 | http://host:port/pospal-api2/openapi/v1/orderopenapi/addonlineorder | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appid | 是 | string | pospal配置的访问凭证 |
| paymethod | 是 | string | 九游会棋牌的支付方式:
cash,表示现金支付; customerbalance,表示用会员余额支付,接口会根据customernumber去扣除对应会员的余额; wxpay,表示微信支付 alipay,表示支付宝支付 paycode_xxx,表示自定义支付(通过销售单据api的 querymypaymethod 接口获取) 九游会棋牌的支付方式为wxpay或alipay或自定义支付时必须设置payonline=1 如果已经付完款,且后续 需要 退款,反结账,请使用自定义支付,且ordersource = 'openapi'。 |
| customernumber | 否 | string | 会员号,订单是哪个会员下的。 如果paymethod= customerbalance,参数customernumber不能为空 |
| shippingfee | 否 | bigdecimal | 运费 |
| orderremark | 否 | string | 订单备注 |
| orderdatetime | 是 | string | 订单产生的时间,格式为yyyy-mm-dd hh:mm:ss |
| contactaddress | 是 | string | 送货地址,联系地址 |
| contactname | 是 | string | 联系人姓名 |
| contacttel | 是 | string | 联系人电话 |
| items | 是 | list | 商品列表 |
| productuid | 是 | long | 商品在银豹系统的唯一标识 |
| comment | 否 | string | 针对商品条目的备注 |
| quantity | 是 | bigdecimal | 数量 |
| manualsellprice | 否 | bigdecimal | 商品单价,如果为空,以银商品在银豹系统的单价为准 |
| deliverytype | 否 | integer | 配送类型,默认为0-外卖单。 0外卖单; 1店内单,自助单 |
| dinnersnumber | 否 | integer | 就餐人数 |
| restaurantareaname | 否 | string | 餐厅区域名,在银豹后台要先设置好,参数值必须与设置好的对应 |
| restauranttablename | 否 | string | 餐桌名称,桌号,在银豹后台要先设置好,参数值必须与设置好的对应 |
| reservationtime | 否 | string | 到店时间,预约时间,格式为yyyy-mm-dd hh:mm:ss |
| skipproductstockvalidation | 否 | integer | 是否允许0库存销售,设为1则允许0库存销售,目前只有微店用 |
| payonline | 否 | integer | 是否已经完成线上付款。若线上已付款,则设置payonline=1 且paymethod 只能为wxpay或alipay 或自定义九游会棋牌的支付方式。否则,该参数不传 |
| ordersource | 否 | string | 为openapi时,商品单价按用户传值固定不变;为空时,按网单下单正常逻辑来计算 |
| dayseq | 否 | string | 牌号,取餐号。当ordersource=openapi时,才生效,如果不传,不会默认生成。 当ordersource!=openapi时,后台会默认生成一个 |
| totalamount | 否 | bigdecimal | 总金额,ordersource不为空时,totalamount必填 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| data | json | 实体信息 | |
| orderno | string | 订单序列号 | |
| ordercreatedatetime | string | 下单时间 | |
| customernumber | string | 订单会员号 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/orderopenapi/cancleorder | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appid | 是 | string | pospal配置的访问凭证 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/orderopenapi/shiporder | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appid | 是 | string | pospal配置的访问凭证 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| 接口地址 | http://localhost:8080/pospal-api2/openapi/v1/orderopenapi/completeorder | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appid | 是 | string | pospal配置的访问凭证 |
| shouldaddticket | 否 | boolean | 是否在银豹收银系统生成流水单据 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/orderopenapi/queryorderbyno | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appid | 是 | string | pospal配置的访问凭证 |
| orderno | 否 | string | 订单号 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| data | json | 订单实体数据 | |
| paymethod | string | 九游会棋牌的支付方式: cash,表示现金支付 customerbalance,表示用会员余额支付,接口会根据 customernumber去扣除对应会员的余额 |
|
| customernumber | string | 会员号,订单是哪个会员下的。 如果paymethod=customerbalance,参数customernumber不能为空 |
|
| shippingfee | bigdecimal | 运费 | |
| orderremark | string | 订单备注 | |
| orderdatetime | string | 订单产生的时间,格式为yyyy-mm-dd hh:mm:ss | |
| contactaddress | string | 送货地址,联系地址 | |
| contactname | string | 联系人姓名 | |
| contacttel | string | 联系人电话 | |
| totalamount | bigdecimal | 总金额 | |
| state | int | 订单状态 null = 0; //定单创建时的状态 synced = 1; //定单已同步到客户端的状态 shipped = 2; //定单已发货状态 canceled = 3; //定单取消状态 completed = 4; //定单结束状态 completed = 5; //商家确认接收新订单 completed = 8; //待厨打/下发配送订单 |
|
| dayseq | string | 牌号,取餐号 | |
| items | list | 商品列表 | |
| productuid | long | 商品在银豹系统的唯一标识 | |
| productname | string | 商品名称 | |
| productbarcode | string | 商品条码 | |
| eshopsellprice | bigdecimal | 网店网店销售价 | |
| productquantity | bigdecimal | 数量 | |
| productbuyprice | bigdecimal | 商品进货价 | |
| productsellprice | bigdecimal | 商品销售价 | |
| iscustomerdiscount | boolean | 是否开启会员折扣 | |
| customerdiscount | bigdecimal | 会员折扣率 | |
| customerprice | bigdecimal | 会员价 | |
| comment | string | 针对商品条目的备注 | |
| deliverytype | integer | 0或空为外卖:门店配送,商家自己送货上门
1为自助点餐 2为自提 3为预约单 4为平台配送,如美团配送,百度配送 |
|
| 接口地址 | http://host:port/pospal-api2/openapi/v1/orderopenapi/queryorderbyid | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appid | 是 | string | pospal配置的访问凭证 |
| id | 是 | int | 订单id |
| 返回结果 |
| ||
| 字段名 | 类型 | 说明 | |
|
| |||
| 接口地址 | http://host:port/pospal-api2/openapi/v1/orderopenapi/queryorderpages | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appid | 是 | string | pospal配置的访问凭证 |
| starttime | 是 | string | 格式为yyyy-mm-dd hh:mm:ss |
| endtime | 是 | string | 格式为yyyy-mm-dd hh:mm:ss endtime - starttime <= 1天 |
| postbackparameter | 否 | json | 查询ag九游会ag九游会官网首页时可以不传,之后的内容从返回结果中取出 |
| parametertype | 是 | string | 从返回结果中取出 |
| parametervalue | 是 | string | 从返回结果中取出 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| data | list | 订单实体数据列表 | |
| 实体数据 | json | 参照根据单号查询字段描述 | |