Skip to content
Ohta Yoshida edited this page Jun 18, 2018 · 18 revisions

Welcome to user api wiki!

User Backend APIS

api prefix: /user

Summary

Get token from email
Get user info from token
Update user info from token
Update user idendity document from token
Update user selfie document from token


Description

Get token from email

 POST /gentoken

QUERY PARAMS

Name Type Mandatory Default Description
email String Yes undefined user email

RETURN

  • for successed case
{ status: 200, msg: 'sccuess', data: { token } }
  • for failed case
{ status: 400, msg: err_msg, data: err }

Get user info from token

 GET /info/:token

RETURN

  • for successed case
{ 
    status: 200, 
    msg: 'sccuess', 
    data: {
        email, token, approvalStatus, approvalDescriptin
    } 
}
  • for failed case
{ status: 400, msg: err_msg, data: err }

Update user from token

 POST /update

QUERY PARAMS

Name Type Mandatory Default Description
token String Yes undefined token
firstname String No undefined user firstname. If undefined, no change
lastname String No undefined user lastname. If undefined, no change
dob String No undefined user dob. If undefined, no change
documentExpireDate String No undefined documentExpireDate. If undefined, no change
nationalityCountry String No undefined nationalityCountry. If undefined, no change
documentId String No undefined documentId. If undefined, no change
phone String No undefined phone. If undefined, no change
residenceCountry String No undefined residenceCountry. If undefined, no change
residenceAddress String No undefined residenceAddress. If undefined, no change
adminContact String No undefined adminContact. If undefined, no change
adminContact String No undefined adminContact. If undefined, no change
adminContact String No undefined adminContact. If undefined, no change
adminMessage String No undefined adminMessage. If undefined, no change
backgroundCheckId String No undefined backgroundCheckId. If undefined, no change

RETURN

  • for successed case
{ status: 200, msg: 'sccuess', data: userInfo }
  • for failed case
{ status: 400, msg: err_msg, data: err }

Update user idendity document from token

 POST /update/identity

QUERY PARAMS

Name Type Mandatory Default Description
token String Yes undefined token
documentType String Yes undefined document type. { PASSPORT, IDCARD }
identityDocument String Yes undefined base64_image raw data

RETURN

  • for successed case
{ status: 200, msg: 'sccuess', data: userInfo }
  • for failed case
{ status: 400, msg: err_msg, data: err }

Update user selfie document from token

 POST /update/selfie

QUERY PARAMS

Name Type Mandatory Default Description
token String Yes undefined token
selfie String Yes undefined base64_image raw data

RETURN

  • for successed case
{ status: 200, msg: 'sccuess', data: userInfo }
  • for failed case
{ status: 400, msg: err_msg, data: err }
Clone this wiki locally