开发指南 官网
API 2.0 > 2.3 储值 > 2.3.3 获取用户储值记录

2.3.3 获取用户储值记录

开启令牌和权限后可调用。签名方式请查看开发指南
场景描述:根据企迈云商当前店铺会员的充值、消费记录查询该会员储值记录

请求地址

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

公共参数

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

请求参数

参数 参数类型 是否必填 默认值 描述
page int 1 页数
page_size int 10 每页多少条
reta_action string 动作:\r\n1:充值,\r\n2:消费
user_mobile int 手机号
user_nickname string 用户昵称
start_time TimeStamp 开始时间
end_time TimeStamp 结束时间

响应参数

参数 参数类型 描述
status bool 成功或失败
code int 成功/错误编码
message string 成功/错误描述
data array
 ├current_page int 当前页
 ├per_page int 每页显示数
 ├last_page int 最后一页
 ├total int 总条数
 ├reta_list array
  ├0 array
   ├id int 数据id
   ├user_id int 用户id
   ├order_id int 订单ID
   ├user_nickname string 用户昵称
   ├user_mobile string 用户手机号
   ├original_balance string 原始余额
   ├changed_balance string 充值 / 消费后余额(元)
   ├action_log string 充值 / 消费金额(元)
   ├amount string 余额
   ├remarks string 备注
   ├action int 动作
   ├created_at TimeStamp 创建时间
   ├updated_at TimeStamp 更新时间
   ├ action_text string 类型

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "user.balance-history",
    "Params": {
        "page": "",
        "page_size": "",
        "reta_action": "",
        "user_mobile": "",
        "user_nickname": "",
        "start_time": "",
        "end_time": ""
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "current_page": "",
        "per_page": "",
        "last_page": "",
        "total": "",
        "reta_list": [
            {
                "id": "",
                "user_id": "",
                "order_id": "",
                "user_nickname": "",
                "user_mobile": "",
                "original_balance": "",
                "changed_balance": "",
                "action_log": "",
                "amount": "",
                "remarks": "",
                "action": "",
                "created_at": "",
                "updated_at": "",
                " action_text": ""
            }
        ]
    }
}

异常示例

{
    "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 user.balance-history 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述
user_id int 用户ID
page int 1 页数
page_size int 10 每页多少条
cy_action string 动作\r\n1:添加 \r\n2:编辑\r\n3:删除\r\n\r\n4:充值\r\n5:消费

响应参数

参数 参数类型 描述
status bool 成功或失败
code int 成功/错误编码
message string 成功/错误描述
data array
 ├current_page int 当前页
 ├per_page int 每页显示数
 ├last_page int 最后一页
 ├total int 总条数
 ├cy_list array
  ├0 array
   ├id int 储值纪录id
   ├data_id int data_id
   ├user_id int 用户id
   ├service_type Date 修改时间
   ├multi_store_id int 多门店ID
   ├amount Money(元) 金额
   ├action int 用户动作,4:充值 5:消费
   ├note string 描述
   ├from_flag int 来源id
   ├from_name string 来源店铺的名称
   ├created_at Date 生成时间
   ├ext 订单ID 扩展参数
   ├source int 1-微信小程序,2-支付宝口碑,3-支付宝小程序
   ├ext_array array
    ├order array
     ├order_id int 订单ID
     ├order_no string 订单编号
   ├amount_text string 格式化的金额信息
   ├source_desc string 来源详情,参考source字段(1-微信小程序,2-支付宝口碑,3-支付宝小程序)

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "user.balance-history",
    "Params": {
        "user_id": "",
        "page": "",
        "page_size": "",
        "cy_action": ""
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "current_page": "",
        "per_page": "",
        "last_page": "",
        "total": "",
        "cy_list": [
            {
                "id": "",
                "data_id": "",
                "user_id": "",
                "service_type": "",
                "multi_store_id": "",
                "amount": "",
                "action": "",
                "note": "",
                "from_flag": "",
                "from_name": "",
                "created_at": "",
                "ext": "",
                "source": "",
                "ext_array": {
                    "order": {
                        "order_id": "",
                        "order_no": ""
                    }
                },
                "amount_text": "",
                "source_desc": ""
            }
        ]
    }
}

异常示例

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

错误码

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

免费升级

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

免费专业培训

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

7×24小时服务支持

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

 

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