Skip to content
Evgeny Voronov edited this page Jun 12, 2018 · 18 revisions

Welcome to user api wiki!

api prefix: /user

User Backend APIS

Summary

get info from token
generate token from email
Update user info from token, email
Update user idendity document from token, email
Update user selfie from token, email


Description

  • getinfo from token
/**
 * @function: Get user info from token
 * 
 * @method: GET /info/:token
 * 
 * @param {String|Required} token
 * 
 * @return
 * { "status": 200, "msg": "success", data: userInfo }
 * 
 * userInfo = {
 *  email, token, approvalStatus, approvalDescriptin
 * }
 * 
 * approvalStatus = enum: ['NO_SUBMISSION_YET', PENDING', 'APPROVED', 'ACTION_REQUESTED', 'BLOCKED']
 */
  • Generate token for user email
/**
 * @function: Generate token for user email
 * 
 * @method: POST /gentoken
 * 
 * @param {String|Required} email
 * 
 * @return
 * { "status": 200, "msg": "success", data: { token, email } }
*/
  • Update user from token, email
 * @function: Update user from token, email
 *
 * @method: POST /update
 *
 * @param {String|Required} email
 * @param {String|Required} token
 *
 * @param {String} firstname
 * @param {String} lastname
 * @param {String} dob
 * @param {String} documentExpireDate
 * @param {String} nationalityCountry
 * @param {String} documentId
 *
 * @param {String} phone
 * @param {String} residenceCountry
 * @param {String} residenceAddress
 *
 * @param {String} adminContact
 * @param {String} adminMessage
 * @param {String} backgroundCheckId
 *
 * @return
 * { "status": 200, "msg": "success", data: userInfo }
  • Update user idendity document from token, email
 * @method: POST /update/idendity
 *
 * @param {String|Required} email
 * @param {String|Required} token
 *
 * @param {String} documentType
 * @param {String} identityDocument
 *
 * @return
 * { "status": 200, "msg": "success", data: userInfo }
  • Update user idendity document from token, email
 * @method: POST /update/selfie
 *
 * @param {String|Required} email
 * @param {String|Required} token
 *
 * @param {String} selfie
 *
 * @return
 * { "status": 200, "msg": "success", data: userInfo }
Clone this wiki locally