Member

post
Đăng ký thành viên

{{api-endpoint}}/member/register
Request
Response
Request
Headers
Authentication
required
string
Access token
Body Parameters
merchantId
required
string
gender
optional
boolean
dateOfBirth
optional
string
Định dạng yyyy-mm-dd (Ví dụ:1990-02-01)
password
optional
string
email
optional
string
countryCode
optional
string
phoneNumber
required
string
Số điện thoại thành viên
firstName
required
string
lastName
required
string
Response
200: OK
{
"status": "success",
"code": 0,
"data": {
"merchantId": "1148e25c-1bb7-4fae-ba58-f5e62d550f77",
"id":"e0614177-1693-4ed8-b1b1-65e7ccaaa817",
"phoneNumber": "0912434330",
"isPhoneVerify": false,
"email": "",
"isEmailVerify": false,
"firstName": "Viet cnv",
"lastName": "Nguyen",
"gender": false
}
}
404: Not Found
Could not find a cake matching this query.
{ "message": "Ain't no cake like that."}

Request Example

{
"merchantId":"1148e25c-1bb7-4fae-ba58-f5e62d550f77",
"firstName":"Viet cnv",
"lastName":"Nguyen",
"phoneNumber":"0912434333"
}

post
Thay đổi thông tin

{{api-endpoint}}/member/update-info
Request
Response
Request
Headers
Authentication
required
string
Access token
Query Parameters
memberId
required
string
Mã thành viên
merchantId
required
string
Mã thương hiệu
Body Parameters
gender
optional
boolean
dateOfBirth
optional
string
Ngày tháng năm sinh (1990-02-01)
password
optional
string
email
optional
string
countryCode
optional
string
phoneNumber
required
string
Số điện thoại thành viên
firstName
required
string
lastName
required
string
Response
200: OK
{
"status": "success",
"code": 0,
"data": {
"merchantId": "1148e25c-1bb7-4fae-ba58-f5e62d550f77",
"memberId": "248eb8d4-966c-4ad1-b43a-b4ec6757c114",
"countryCode": "",
"phoneNumber": "",
"isPhoneVerify": false,
"email": "[email protected]",
"isEmailVerify": false,
"firstName": "Z",
"lastName": "M",
"dateOfBirth": "2020-08-04T00:00:00Z",
"gender": false,
"avatar": "https://peko-engine.s3-ap-southeast-1.amazonaws.com/a559f911-3adb-49fe-82e2-46a29b5fa44d.png",
"level": {
"id": "7277edf8-bb9f-42a9-8c32-b4127f611f71",
"name": "Platinum",
"privileges": [
{
"id": "b0bbddd7-1aa2-4f8f-a7d3-66bbe581f03c",
"name": "PercentDiscount"
}
]
},
"point": {
"total": 4415,
"expiresIn": "0001-01-01T00:00:00"
}
}
}

post
Thay đổi mật khẩu

{{api-endpoint}}/member/update-password
Request
Response
Request
Query Parameters
merchantId
required
string
memberId
required
string
Body Parameters
password
required
string
confirmPassword
required
string
Response
200: OK
{
"status": "success",
"code": 0,
"data": {
"merchantId": "1148e25c-1bb7-4fae-ba58-f5e62d550f77",
"memberId": "248eb8d4-966c-4ad1-b43a-b4ec6757c114",
"countryCode": "",
"phoneNumber": "",
"isPhoneVerify": false,
"email": "[email protected]",
"isEmailVerify": false,
"firstName": "Z",
"lastName": "M",
"dateOfBirth": "2020-08-04T00:00:00Z",
"gender": false,
"avatar": "https://peko-engine.s3-ap-southeast-1.amazonaws.com/a559f911-3adb-49fe-82e2-46a29b5fa44d.png",
"level": {
"id": "7277edf8-bb9f-42a9-8c32-b4127f611f71",
"name": "Platinum",
"privileges": [
{
"id": "b0bbddd7-1aa2-4f8f-a7d3-66bbe581f03c",
"name": "PercentDiscount"
}
]
},
"point": {
"total": 4415,
"expiresIn": "0001-01-01T00:00:00"
}
}
}

Request Example

post
Thay đổi ảnh đại diện

{{api-endpoint}}/member/update-avatar
Request
Response
Request
Headers
Authentication
required
string
Access token
Query Parameters
merchantId
required
string
Mã thương hiệu
memberId
required
string
Mã thành viên
Form Data Parameters
files
required
string
Response
200: OK
{
"status": "success",
"code": 0,
"data": {
"merchantId": "1148e25c-1bb7-4fae-ba58-f5e62d550f77",
"memberId": "248eb8d4-966c-4ad1-b43a-b4ec6757c114",
"countryCode": "",
"phoneNumber": "",
"isPhoneVerify": false,
"email": "[email protected]",
"isEmailVerify": false,
"firstName": "Z",
"lastName": "M",
"dateOfBirth": "2020-08-04T00:00:00Z",
"gender": false,
"avatar": "https://peko-engine.s3-ap-southeast-1.amazonaws.com/a559f911-3adb-49fe-82e2-46a29b5fa44d.png",
"level": {
"id": "7277edf8-bb9f-42a9-8c32-b4127f611f71",
"name": "Platinum",
"privileges": [
{
"id": "b0bbddd7-1aa2-4f8f-a7d3-66bbe581f03c",
"name": "PercentDiscount"
}
]
},
"point": {
"total": 4415,
"expiresIn": "0001-01-01T00:00:00"
}
}
}

Request Example

get
Lấy chi tiết thành viên

{{api-endpoint}}/member
Request
Response
Request
Headers
Authentication
required
string
Access token
Query Parameters
merchantId
required
string
Mã thương hiệu
memberId
required
string
Mã thành viên
Response
200: OK
{
"status": "success",
"code": 0,
"data": {
"merchantId": "1148e25c-1bb7-4fae-ba58-f5e62d550f77",
"memberId": "248eb8d4-966c-4ad1-b43a-b4ec6757c114",
"countryCode": "",
"phoneNumber": "",
"isPhoneVerify": false,
"email": "[email protected]",
"isEmailVerify": false,
"firstName": "Z",
"lastName": "M",
"dateOfBirth": "2020-08-04T00:00:00Z",
"gender": false,
"avatar": "https://peko-engine.s3-ap-southeast-1.amazonaws.com/a559f911-3adb-49fe-82e2-46a29b5fa44d.png",
"level": {
"id": "7277edf8-bb9f-42a9-8c32-b4127f611f71",
"name": "Platinum",
"privileges": [
{
"id": "b0bbddd7-1aa2-4f8f-a7d3-66bbe581f03c",
"name": "PercentDiscount"
}
]
},
"point": {
"total": 4415,
"expiresIn": "0001-01-01T00:00:00"
}
}
}

get
Lấy danh sách thành viên

{{api-endpoint}}/members
Lấy danh sách thành viên của Merchant. Mặc định là trả về 25 bản ghi trong 1 page.
Request
Response
Request
Query Parameters
merchantId
required
string
page
required
integer
Bắt đầu là 1
Response
200: OK
{
"status": "success",
"code": 0,
"msg": "OK",
"data": {
"pageIndex": 1,
"members": [
{
"merchantId": "1148e25c-1bb7-4fae-ba58-f5e62d550f77",
"memberId": "906f1f1e-42fb-41cd-a910-c4d787e9aed2",
"phoneNumber": "031333338",
"isPhoneVerify": false,
"isEmailVerify": false,
"firstName": "muzan3",
"lastName": "mibutsuji",
"dateOfBirth": "2020-06-01",
"gender": false,
"level": {
"id": "dbe64a89-5a42-4dfd-9ea6-6aeb9a82d668",
"name": "Basic",
"privileges": []
},
"point": {
"total": 0,
"expiresIn": "0001-01-01T00:00:00Z"
}
},
{
"merchantId": "1148e25c-1bb7-4fae-ba58-f5e62d550f77",
"memberId": "253d5f38-028a-49f1-824c-a9b92c129be0",
"phoneNumber": "037333338",
"isPhoneVerify": false,
"isEmailVerify": false,
"firstName": "muzan3",
"lastName": "mibutsuji",
"dateOfBirth": "2020-06-01",
"gender": false,
"level": {
"id": "dbe64a89-5a42-4dfd-9ea6-6aeb9a82d668",
"name": "Basic",
"privileges": []
},
"point": {
"total": 0,
"expiresIn": "0001-01-01T00:00:00Z"
}
}
]
}
}