您现在的位置是:首页 >其他 >项目接口文档信息网站首页其他

项目接口文档信息

阿银的万事屋 2024-06-14 17:20:28
简介项目接口文档信息

备注

  • 注1:状态码表格
codedesc
20001用户信息注册成功
40001用户信息注册失败,请重试
20011用户基本信息查询成功
40011用户基本信息查询失败,请重试
20012抵扣卷信息查询成功
40012抵扣卷信息查询失败,请重试
20013邀请信息查询成功
40013邀请信息查询失败,请重试
20021用户信息更新成功
40021用户信息更新失败,请重试
20031余额日志信息查询成功
40031余额日志信息查询失败,请重试
20032积分日志信息查询成功
40032积分日志信息查询失败,请重试
20041预支付申请成功
40041预支付申请失败,请重试
20051提现成功
40051提现失败,请重试

/user

POST /user/registry

RequestBody:

{
	"username": "张三",
	"phone": "18150000000",
	"invitePhone": (可选字段)"18000000000"
}

ResponseBody:

{
	"code": "{状态码,参见注1}",
	"message": "{每个状态码将对应一个message}",
	"data": ""
}

GET /user/message/base?phone

No RequestBody

ResponseBody:

{
	"code": "{状态码,参见注1}",
	"message": "{每个状态码将对应一个message}",
	"data": {
		"username": "张三",
		"phone": "18150000000",
		"rewards": "52",
		"points": "1000",
		"isVIP": "1" or "0"
	}
}

GET /user/message/coupons?phone

No RequestBody

ResponseBody:

{
	"code": "{状态码,参见注1}",
	"message": "{每个状态码将对应一个message}",
	"data": {
		"coupons": "3"
	}
}

GET /user/message/invite?phone

No RequestBody

ResponseBody:

{
	"code": "{状态码,参见注1}",
	"message": "{每个状态码将对应一个message}",
	"data": {
		"invite": ["phone1"...]
	}
}

POST /user/byother

RequestBody:

{
	"username": "张三",
	"phone": "18150000000",
	"rewards": (可选字段)"55",
	"points": (可选字段)"1100",
	"address": (可选字段)"xx路1037号"
}

ResponseBody:

{
	"code": "{状态码,参见注1}",
	"message": "{每个状态码将对应一个message}",
	"data": ""
}

POST /user/byself

RequestBody:

{
	"username": "张三",
	"phone": "18150000000",
	"rewards": (可选字段)"55",
	"points": (可选字段)"1100",
	"isVIP": (可选字段)"1",
}

ResponseBody:

{
	"code": "{状态码,参见注1}",
	"message": "{每个状态码将对应一个message}",
	"data": ""
}

/log

GET /log/rewards?phone

{
	"page": "{当前展示页}",
	"size": "{每页展示数}"
}

ResponseBody:

{
	"code": "{状态码,参见注1}",
	"message": "{每个状态码将对应一个message}",
	"data": {
		[
			{
				"date": "2023-1-1 00:00:00",
				"update": "+1",
				"desc": "刷卡满10000元,返利1余额"
			},
			{
				"date": "2023-1-1 13:00:00",
				"update": "-1",
				"desc": "提现1余额"
			},
			...
		],
		"total": "{符合要求的总条目数}", 
		"page": "{当前展示页}",
		"size": "{每页展示数}",
		"income": "{总条目数的收入数}",
		"outcome": "{总条目数的支出数}"
	}
}

GET /log/points?phone

{
	"page": "{当前展示页}",
	"size": "{每页展示数}"
}

ResponseBody:

{
	"code": "{状态码,参见注1}",
	"message": "{每个状态码将对应一个message}",
	"data": {
		[
			{
				"date": "2023-1-1 00:00:00",
				"update": "+1000",
				"desc": "刷卡满10000元,积分+1000"
			},
			{
				"date": "2023-1-1 13:00:00",
				"update": "-1000",
				"desc": "抽奖一次,花费1000"
			},
			...
		],
		"total": "{符合要求的总条目数}", 
		"page": "{当前展示页}",
		"size": "{每页展示数}",
		"income": "{总条目数的收入数}",
		"outcome": "{总条目数的支出数}"
	}
}

/pay

POST /pay/prepay

RequestBody:

{
	"desc": "君享惠-购买会员",
	"total": "298"
}

ResponseBody:

{
	"code": "{状态码,参见注1}",
	"message": "{每个状态码将对应一个message}",
	"data": {
		"appId": "{商户id}"
	    "timeStamp": "{时间戳}"
	    "nonceStr": "{随机字符}"
	    "package": "{预支付会话标识}"
	    "signType": "MD5"
	}
}

POST /pay/notify

RequestBody:

{
    "id": "EV-2018022511223320873",
    "create_time": "2015-05-20T13:29:35+08:00",
    "resource_type": "encrypt-resource",
    "event_type": "TRANSACTION.SUCCESS",
    "summary": "支付成功",
    "resource": {
        "original_type": "transaction",
        "algorithm": "AEAD_AES_256_GCM",
        "ciphertext": "",
        "associated_data": "",
        "nonce": ""
    }
}

ResponsBody:

{  
    "code": "{SUCCESS OR FAIL}",
    "message": "" or "{失败原因}"
}

/cashback

POST /cashback/cash

RequestBody:

{
	"phone": "{商户手机号}",
	"total": "{提现金额}"
}

ResponseBody:

{
	"code": "{状态码,参见注1}",
	"message": "{每个状态码将对应一个message}",
	"data": ""
}
风语者!平时喜欢研究各种技术,目前在从事后端开发工作,热爱生活、热爱工作。