API document

1. Mobile APIs

1.1 User login

(v1.user.generalLogin)

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
phoneNumberstringRequired
passwordstringRequired
positionstring · enumRequiredDefault: userPossible values:
Responses
post
/api/public/device/user/login

1.2 Verify user's phone

  • Kiểm tra một số điện thoại đã tồn tại trên hệ thống hay chưa

  • Tạo contact mới nếu số điện thoại chưa đăng ký trên hệ thống

(v1.user.verifyPhoneNumber)

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
phoneNumberstring · min: 6 · max: 6Optional
deviceIdstringOptional
Responses
get
/api/public/user/verifyPhone

1.3 Add user to an organization

(v1.user.addToOrg)

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
orgIdstringRequired
Responses
post
/api/private/user/org

1.4 Reset user's password

(v1.user.resetPassword)

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
phoneNumberstringRequired
otpstringRequired
newPasswordstringRequired
Responses
post
/api/public/user/reset-password

1.5 Register fcm token

(v1.user.registerNotification)

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
fcmTokenstringRequired
tokenTypestring · enumOptionalDefault: userPossible values:
Responses
post
/api/private/user/fcmToken

1.6 Deregister fcm token

(v1.user.deregisterNotification)

delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
fcmTokenstringOptional
tokenTypestring · enumOptionalDefault: userPossible values:
Responses
delete
/api/private/user/fcmToken

1.7 List user's orders

(v1.order.userListOrder)

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
startTimestring · date-timeOptionalExample: 1998-01-10T13:00:00.000Z
indexnumberOptional
pagenumber · min: 10OptionalDefault: 10
isPaidbooleanOptionalExample: false
isDeliveriedbooleanOptionalExample: false
orderStatusstring · enumOptionalExample: successPossible values:
orderTypestring · enumOptionalExample: pudoPossible values:
isDeliveridbooleanOptionalExample: false
Responses
get
/api/private/user/order

1.8 Get user's order

(v1.order.userGetOrder)

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
orderIdstringRequired
Responses
get
/api/private/user/order/{orderId}

Last updated