开发指南 官网
API 2.0 > 4.1 订单查询 > 4.1.1 获取订单列表

4.1.1 获取订单列表

开启令牌和权限后可调用。签名方式请查看开发指南
场景描述:获取当前店铺下所有的订单列表

请求地址

请求方式 版本信息 请求地址
POST V2 http://openapi.zvcms.com/api/v2

公共参数

参数 参数类型 是否必填 默认值 描述
OpenId string 密钥Id
GrantCode string 授权code
Token string 签名,参考《数字签名sign》
Timestamp string 当前时间戳
Nonce string 随机正整数
Action string order.order-list 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述
status int 订单状态 0 全部订单 1待支付 7已完成 8已关闭
source int 订单来源:1-微信小程序,2-支付宝口碑,3-支付宝小程序 4- 美团 5- 饿了么 6- 支付宝插件 7- 支付宝H5 8- 收银机 9-代客下单
begin_time string 开始时间
end_time string 结束时间
page int 1 请求的页数
multi_store_id int 0 门店id
type string 订单类型1- 商品订单,2- 扫码订单,3- 购买储值订单,4- 扫用户付款码订单,5- 拼团订单,6- 礼品卡订单,7- 微众订单,8- 卡券订单,9- 扫码购订单,10- 会员卡订单
code int 自提提货码
pay_mode int 支付方式
limit int 20 每页大小
order_status int 待自提订单状态
send_status int 发货状态 0 未发货 1:发货 2:部分发货
brand_sign int 品牌标识
invoice Int 是否开发票
dispatch Int 配送方式 1:快递 2:同城 3:自提
pay_begin_time TimeStamp 付款时间(开始)
pay_end_time TimeStamp 付款时间(结束)
send_begin_time TimeStamp 发货时间(开始)
send_end_time TimeStamp 发货时间(结束)
order_no string 订单编号
user_id Int 用户ID
keywords string 商品名称
mobile string 配送手机号
pick_time TimeStamp 自提时间

响应参数

参数 参数类型 描述
status bool 请求成功或者失败
code int 成功/错误编码
message string 成功/错误描述
data array
 ├current_page int 当前的页码
 ├last_page int 总页数
 ├total int 总条数
 ├order_types array 订单类型
 ├payMode array
  ├0 array
   ├id int 支付方式数字
   ├name string 支付方式说明
 ├source array
  ├0 array
   ├id int 来源 id
   ├name string 来源说明
 ├dispatch array
  ├0 array
   ├id int 配送方式id
   ├name string 配送方式说明
 ├status_all array "1": "待支付", "2": "退款中", "3": "待发货", "4": "待收货", "5": "已取消", "6": "已作废", "7": "已完成", "8": "已关闭", "9": "已删除", "10": "待接单", "11": "待自提"
 ├where array
  ├limit int 每页大小
  ├code int
  ├pay_mode int 支付状态
 ├multiStoreLists array
  ├0 array
   ├id int' 门店ID
   ├name string 门店名称,
   ├work_status int 营业状态
 ├reta_list array
  ├0 array
   ├id int 订单ID号
   ├order_no string 订单编号
   ├user_id int 用户ID
   ├order_type Int 订单类型1- 商品订单,2- 扫码订单,3- 购买储值订单,4- 扫用户付款码订单,5- 拼团订单,6- 礼品卡订单,7- 微众订单,8- 卡券订单,9- 扫码购订单,10- 会员卡订单
   ├status Int 订单状态 1生成订单,2支付订单,3取消订单(客户触发),4作废订单(管理员触发),5完成订单,6已关闭
   ├total_amount Int 订单总金额
   ├amount Int 应付金额
   ├refund_status Int 是否申请退款
   ├invoice Int 是否开发票
   ├invoice_type Int 发票类型 1-单位 0-个人
   ├invoice_title Int 发票title
   ├invoice_tax_code string 增值税税号
   ├refund Int 退款数量
   ├comment_status Int 评论状态
   ├completed_at Int 订单完成时间
   ├comment_at Int 评价时间
   ├user_remarks string 用户备注
   ├seller_remarks string 商家备注
   ├created_at Int 下单时间
   ├updated_at Int 更新时间
   ├ext string 扩展信息表
   ├source Int 订单来源 1:平台 2:商户
   ├send_status Int 发货状态 0 未发货 1:发货 2:部分发货
   ├pay_status int 支付状态 0- 未支付 1- 已支付
   ├trade_no string 外部支付订单编号
   ├inside_trade_no string 内部支付订单编号
   ├payment_id int 支付方式ID 0- 无第三方支付方式,1- 微信支付,2- 支付宝支付,4- 现金支付,5- 自有微信,6- 自有支付宝,7- pos刷卡支付,9- 微众卡支付
   ├not_use_discount_amount int 订单新增不参与优惠的金额
   ├dispatch_type int 配送类型 0 扫码买单 1:快递 2:同城 3:自提
   ├pick_user string 提货人姓名
   ├pick_mobile string 提货人联系电话
   ├self_pick_id Int 自提点编号
   ├addr_id Int 收货人地址编号
   ├freight string 运费
   ├minus_amount int 优惠总金额
   ├card_minus int 会员折扣
   ├coupon_discount int 会员折扣
   ├pick_at int 提货时间
   ├multi_store_id int 多门店ID,默认0-不关联到门店
   ├use_wallet int 是否使用钱包支付 0- 未使用 1-使用
   ├wallet_amount int 钱包使用金额
   ├is_invoice int 是否开发票1:不开发票 2:开
   ├index_stock int 是否使用独立库存 0- 未使用 1- 使用
   ├reserve_delivery_time date 预约配送时段
   ├use_wallet_source int 使用余额的来源 0- 店铺 1-平台
   ├receive_status int 订单接收状态 0-未接单 1-已接单
   ├receive_at int 接单时间
   ├express int 子配送快递方式 0-自送
   ├is_auto_verify int 核销类型 0- 默认 1- 商家核销 2- 系统自动核销
   ├pick_up_time int 自提预约时间
   ├third_trade_no int 第三方支付订单编号
   ├receive_point int 订单获得积分
   ├cashback_order_no int 返现订单号
   ├multi_name string 门店名称
   ├can_refund int 商家是否可以退款 true-可以 false-不可以
   ├refund_id int 售后订单ID
   ├pay_mode int 支付方式
   ├verify_text string 核销内容
   ├status_text int 当前状态(文本)
   ├order_type_text int 订单类型
   ├reward_minus int 满减
   ├gift_card_discount string 礼品卡优惠
   ├is_express int 是否是快递 0-否 1-是
   ├count int 商品数量
   ├dispatch_type_text string 配送类型(文本)
   ├order_source string 订单来源
   ├is_newer_price int 是否新客价
   ├state int 状态 1 => '待支付',2 => '退款中' 3 => '待发货', 4 => '待收货',5 => '已取消',6 => '已作废',7 => '已完成',8 => '已关闭',9 => '已删除',10 => '待接单',11 => '待自提',
   ├user_name string 用户名
   ├paid_amount int 退款金额
   ├items array
    ├0 array
     ├id int 订单商品id
     ├order_id int 主订单ID
     ├data_id int 商品ID
     ├entity_id int 商品实体ID
     ├is_paid_card int 是否是付费会员卡
     ├name string 商品名称
     ├image string 商品图片
     ├price string 商品价格
     ├minus Money(元) 优惠金额
     ├num string 商品数量
     ├is_send string 是否已发货 0:未发货;1:已发货;2:已经退货
     ├sent_at string 发货时间
     ├spec string 规格
     ├ messages string 商品留言
     ├freight string 运费
     ├refund_status int 售后订单 0-没有 1-有
     ├refund int 退款数量
     ├ext string 扩展说明
     ├product_no int 商品条码
     ├product_marking int 商品标识
     ├is_gift int 是否赠品 0- 否 1- 是
     ├is_verified int 是否核销 0- 未核销 1-已核销
     ├validity_period_type int 卡券有效期类型:0 - 普通商品无效期概念 1-长期有效,2-自定义有效期
     ├brand_id int 品牌id
     ├brand_sign int 品牌标识
     ├brand_name string 品牌名称
     ├brand_img string 品牌图片
     ├is_newer_price int 是否新客价
     ├newer_price int 商品新客价
     ├is_limit_discount int 是否享受限时折扣优惠
   ├user array
    ├id int 用户id
    ├nickname string 用户名
    ├avatar string 用户头像
    ├mobile string 用户电话

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "order.order-list",
    "Params": {
        "status": "",
        "source": "",
        "begin_time": "2018-6-26",
        "end_time": "2018-7-24",
        "page": "1",
        "multi_store_id": "",
        "type": "",
        "code": "",
        "pay_mode": "",
        "limit": "",
        "order_status": "",
        "send_status": "",
        "brand_sign": "",
        "invoice": "",
        "dispatch": "",
        "pay_begin_time": "",
        "pay_end_time": "",
        "send_begin_time": "",
        "send_end_time": "",
        "order_no": "",
        "user_id": "",
        "keywords": "",
        "mobile": "",
        "pick_time": ""
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "current_page": "1",
        "last_page": "",
        "total": "",
        "order_types": "",
        "payMode": [
            {
                "id": "1",
                "name": "微信支付"
            }
        ],
        "source": [
            {
                "id": "2",
                "name": "门店"
            }
        ],
        "dispatch": [
            {
                "id": "",
                "name": ""
            }
        ],
        "status_all": "",
        "where": {
            "limit": "",
            "code": "",
            "pay_mode": ""
        },
        "multiStoreLists": [
            {
                "id": "",
                "name": "",
                "work_status": ""
            }
        ],
        "reta_list": [
            {
                "id": "",
                "order_no": "",
                "user_id": "",
                "order_type": "",
                "status": "",
                "total_amount": "",
                "amount": "",
                "refund_status": "",
                "invoice": "",
                "invoice_type": "",
                "invoice_title": "",
                "invoice_tax_code": "",
                "refund": "",
                "comment_status": "",
                "completed_at": "",
                "comment_at": "",
                "user_remarks": "",
                "seller_remarks": "",
                "created_at": "",
                "updated_at": "",
                "ext": "",
                "source": "",
                "send_status": "",
                "pay_status": "",
                "trade_no": "",
                "inside_trade_no": "",
                "payment_id": "",
                "not_use_discount_amount": "",
                "dispatch_type": "",
                "pick_user": "",
                "pick_mobile": "",
                "self_pick_id": "",
                "addr_id": "",
                "freight": "",
                "minus_amount": "",
                "card_minus": "",
                "coupon_discount": "",
                "pick_at": "",
                "multi_store_id": "",
                "use_wallet": "",
                "wallet_amount": "",
                "is_invoice": "",
                "index_stock": "",
                "reserve_delivery_time": "",
                "use_wallet_source": "",
                "receive_status": "",
                "receive_at": "",
                "express": "",
                "is_auto_verify": "",
                "pick_up_time": "",
                "third_trade_no": "",
                "receive_point": "",
                "cashback_order_no": "",
                "multi_name": "",
                "can_refund": "",
                "refund_id": "",
                "pay_mode": "",
                "verify_text": "",
                "status_text": "",
                "order_type_text": "",
                "reward_minus": "",
                "gift_card_discount": "",
                "is_express": "",
                "count": "",
                "dispatch_type_text": "",
                "order_source": "",
                "is_newer_price": "",
                "state": "",
                "user_name": "",
                "paid_amount": "",
                "items": [
                    {
                        "id": "",
                        "order_id": "",
                        "data_id": "",
                        "entity_id": "",
                        "is_paid_card": "",
                        "name": "商品名称",
                        "image": "",
                        "price": "",
                        "minus": "",
                        "num": "",
                        "is_send": "",
                        "sent_at": "",
                        "spec": "",
                        " messages": "",
                        "freight": "",
                        "refund_status": "",
                        "refund": "",
                        "ext": "扩展说明",
                        "product_no": "342154",
                        "product_marking": "32543534",
                        "is_gift": "1",
                        "is_verified": "1",
                        "validity_period_type": "1",
                        "brand_id": "1",
                        "brand_sign": "",
                        "brand_name": "",
                        "brand_img": "",
                        "is_newer_price": "",
                        "newer_price": "",
                        "is_limit_discount": ""
                    }
                ],
                "user": {
                    "id": "",
                    "nickname": "",
                    "avatar": "",
                    "mobile": ""
                }
            }
        ]
    }
}

异常示例

{
    "status": true,
    "code": "异常编码,根据不同的业务返回编码",
    "message": "异常说明:查询的信息不存在"
}

错误码

{
    "status": false,
    "code": "系统错误编码:详见全局返回编码",
    "message": "系统错误说明"
}

请求地址

请求方式 版本信息 请求地址
POST V2 http://openapi.zvcms.com/api/v2

公共参数

参数 参数类型 是否必填 默认值 描述
OpenId string 密钥Id
GrantCode string 授权code
Token string 签名,参考《数字签名sign》
Timestamp string 当前时间戳
Nonce string 随机正整数
Action string order.order-list 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述
type_cate Int 1 订单类型 1外卖,2堂食,3买单 4 预约
keywords string 联合“keywords_type”字段使用
status int 订单状态 0 全部订单 1待支付 7已完成 8已关闭
source int 订单来源:1-微信小程序,2-支付宝口碑,3-支付宝小程序 4- 美团 5- 饿了么 6- 支付宝插件 7- 支付宝H5 8- 收银机 9-代客下单
begin_time string 开始时间
end_time string 结束时间
page int 1 请求的页数
page_size int 10 请求的每页返回的数据条数
mutil_user int 订单类型 1单人点餐 2多人点餐
express int 配送方式 0自送1商家配送3达达配送 4UU跑腿
multi_store_id int 0 门店id
keywords_type string order_no customer_id - 用户ID;customer_phones - 下单人手机号;sort_num - 取单号;linkman_phone - 取餐人手机号;third_order_no - 三方单号;mobile - 收货人手机号;order_no - 订单号【如果不传则默认使用order_no】

响应参数

参数 参数类型 描述
status bool 请求成功或者失败
code int 成功/错误编码
message string 成功/错误描述
data array
 ├current_page int 当前的页码
 ├last_page int 总页数
 ├total int 总条数
 ├item_list array
  ├0 array
   ├order_no string 订单号
   ├created_at string 创建时间(unix时间戳)
   ├status int 订单状态 0 全部订单 1待支付 7已完成 8已关闭( type_cate =4时 预约状态 0-申请中 1-通过 2-拒绝 3-取消)
   ├pay_status int 支付状态 1已支付 0未支付
   ├send_status int 配送状态 0:未发送, 1:已发送, 2:部分发送
   ├receive_status int 订单接收状态 0-未接单 1-已接单
   ├refund_status int 申请退款 0 未申请 1申请
   ├amount float 应付金额
   ├freight float 运费(单位:元)
   ├minus_amount float 优惠金额
   ├postscript string 备注
   ├total_amount float 总金额
   ├sort_num string 取单号
   ├people_number int 人数
   ├table_number int 桌号
   ├express int 配送快递 0自送 1商家配送, 2蜂鸟配送(暂时不启用) 3 达达配送, 4 UU跑腿
   ├multi_store_id int 多门店id
   ├payed_at string 付款时间(unix时间戳)
   ├source int 订单来源 1 小程序 2 口碑
   ├source_txt string 来源文字
   ├multi_store_name string 门店名称
   ├refund_order_id string 退款单号
   ├refund_order_status int 退款订单状态 退款状态,1:退款中 2:退款成功 3:退款关闭
   ├refund_order_status_text string 退款状态文字
   ├expressType int 快递类型 1商家配送, 2蜂鸟配送, 3达达配送, 4UU跑腿
   ├is_open_third int 是否开启第三方配送 1是 o否
   ├status_text string 状态文字
   ├final_status int 状态
   ├third_delivery string 第三方配送
   ├tableware_price float 餐具费用
   ├pack_cost float 打包费
   ├state int 状态 1 => '待支付', 2 => '待接单', 3 => '待发货', 4 => '待收货 已发货' 5 => '已取消', 6 => '已作废', 7 => '已完成', 8 => '已关闭', 9 => '退款中',
   ├user_name string 用户昵称
   ├pay_user_name string 支付用户名称
   ├actual_amount float 实付金额( typecate =3时参数)
   ├order_amount float 订单金额( typecate =3时参数)
   ├coupon_money float 优惠券优惠金额( typecate =3时参数)
   ├quota_discount float 满额优惠金额( typecate =3时参数)
   ├note string 管理员备注( typecate =4时参数)
   ├discount_money float 打折优惠金额 ( typecate =3时参数)
   ├card_discount float 会员卡优惠折扣( typecate =3时参数)
   ├reserve_name string 预定人姓名( typecate =4时参数)
   ├mobile string 联系电话( typecate =4时参数)
   ├repast_num int 就餐人数( typecate =4时参数)
   ├type string 预约类型文字( typecate =4时参数)
   ├explain string 拒绝说明(理由)( typecate =4时参数)
   ├reserve_at string 预约时间( typecate =4时参数)
   ├remark string 预约备注( typecate =4时参数)
   ├goods array
    ├0 array
     ├goods_id int 商品id
     ├name string 商品名称
     ├image string 商品图片
     ├price float 商品价格(单位:元,原价)
     ├minus float 优惠金额(单位:元)
     ├cost_price float 成本价格
     ├num int 数量
     ├is_send int 是否已发货 0:未发货; 1:已发货; 2:已经退货
     ├sent_at string 发货时间
     ├is_give int 是否赠品 1是 o否
     ├income_rate float 推广员佣金(单位:元)
     ├income_rate2 float 邀请人佣金(单位:元)
     ├freight float 运费(单位:元)
     ├refund_status int 售后订单 0-没有 1-有
     ├refund int 退款数量
     ├submit_at string 购买商品提交时间
     ├user_name string 用户昵称
     ├trade_mark string 商品编码
     ├spec array 规格信息(数组形式,键是规格名,值是规格的值)
     ├property array
      ├0 array
       ├id int 做法id
       ├name string 做法名称
       ├values array
        ├0 array
         ├id int 做法值id
         ├value string 做法值名称
         ├code string 做法值码
         ├status string 状态
   ├multi_store_mark string 门店编码
   ├typeCate int 订单类型 1 堂食 2 外带 3 外卖 4 自助买单
   ├pay_model array
    ├id int 1:余额支付 2:微信支付 3:支付宝支付 6 :混合支付 -1 :未支付
    ├name string 支付方式名称
   ├wallet_amount float 余额支付金额(当支付方式为混合支付时有值)
   ├order_refund_amount float 实际退款金额
   ├completed_at string 订单完成时间(unix时间戳)
   ├id int 订单ID

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "order.order-list",
    "Params": {
        "type_cate": "11",
        "keywords": "",
        "status": "",
        "source": "",
        "begin_time": "2018-6-26",
        "end_time": "2018-7-24",
        "page": "1",
        "page_size": "10",
        "mutil_user": "",
        "express": "",
        "multi_store_id": "",
        "keywords_type": ""
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "current_page": "1",
        "last_page": "",
        "total": "",
        "item_list": [
            {
                "order_no": "",
                "created_at": "1528186309",
                "status": "",
                "pay_status": "",
                "send_status": "",
                "receive_status": "",
                "refund_status": "",
                "amount": "",
                "freight": "",
                "minus_amount": "",
                "postscript": "",
                "total_amount": "",
                "sort_num": "",
                "people_number": "",
                "table_number": "",
                "express": "",
                "multi_store_id": "",
                "payed_at": "",
                "source": "",
                "source_txt": "",
                "multi_store_name": "",
                "refund_order_id": "",
                "refund_order_status": "",
                "refund_order_status_text": "",
                "expressType": "",
                "is_open_third": "",
                "status_text": "",
                "final_status": "",
                "third_delivery": "",
                "tableware_price": "",
                "pack_cost": "",
                "state": "",
                "user_name": "",
                "pay_user_name": "",
                "actual_amount": "",
                "order_amount": "",
                "coupon_money": "",
                "quota_discount": "",
                "note": "",
                "discount_money": "",
                "card_discount": "",
                "reserve_name": "",
                "mobile": "",
                "repast_num": "",
                "type": "",
                "explain": "",
                "reserve_at": "",
                "remark": "",
                "goods": [
                    {
                        "goods_id": "",
                        "name": "",
                        "image": "",
                        "price": "",
                        "minus": "",
                        "cost_price": "",
                        "num": "",
                        "is_send": "",
                        "sent_at": "",
                        "is_give": "",
                        "income_rate": "",
                        "income_rate2": "",
                        "freight": "",
                        "refund_status": "",
                        "refund": "",
                        "submit_at": "",
                        "user_name": "",
                        "trade_mark": "",
                        "spec": "",
                        "property": [
                            {
                                "id": "3",
                                "name": "大师傅打是否",
                                "values": [
                                    {
                                        "id": "5",
                                        "value": "是否当第三方",
                                        "code": "Z5CD8E3ADB34052253",
                                        "status": "true"
                                    }
                                ]
                            }
                        ]
                    }
                ],
                "multi_store_mark": "",
                "typeCate": "",
                "pay_model": {
                    "id": "",
                    "name": ""
                },
                "wallet_amount": "",
                "order_refund_amount": "",
                "completed_at": "",
                "id": ""
            }
        ]
    }
}

异常示例

{
    "status": true,
    "code": "异常编码,根据不同的业务返回编码",
    "message": "异常说明:查询的信息不存在"
}

错误码

{
    "status": false,
    "code": "系统错误编码:详见全局返回编码",
    "message": "系统错误说明"
}

免费升级

营销功能、插件持续每月更新开发升级

免费专业培训

每月建站、微信营销、电商等互联网增值培训

7×24小时服务支持

400电话、QQ、微信、在线等多渠道售后支持

 

安徽智迈科技股份有限公司 版权所有 Copyright 2009-2018 皖公网安备 34019202000074号 增值电信业务经营许可证:皖B2-20170075