-
Notifications
You must be signed in to change notification settings - Fork 16
Admin
Galen Danziger edited this page Jul 9, 2018
·
17 revisions
Welcome to admin api wiki!
api prefix: /admin
Admin signup
Verify admin user
Admin login
Set approval status of the user
Get submission list by params
Update user identity document
Update user selfie
Get user documents
POST /signup
Name | Type | Mandatory | Default | Description |
---|---|---|---|---|
String | Yes | undefined | admin user email | |
password | String | Yes | undefined | admin password |
- for successful case:
{ status: 200, msg: 'sccuess' }
- for failed case:
{ status: 400, msg: err_msg, data: err }
GET /verify/:ownerConfirmToken
Approve admin user.
- for successed case
{ status: 200, msg: 'sccuess' }
- for failed case
{ status: 400, msg: err_msg, data: err }
POST /signin
Name | Type | Mandatory | Default | Description |
---|---|---|---|---|
String | Yes | undefined | admin user email | |
password | String | Yes | undefined | admin password |
- for successed case
{ status: 200, msg: 'sccuess', data: { token } }
- for failed case
{ status: 400, msg: err_msg, data: err }
POST /approve_user
Name | Type | Mandatory | Default | Description |
---|---|---|---|---|
token | String | Yes | undefined | admin user token |
useremail | String | Yes | undefined | user email |
approvalStatus | String | Yes | undefined | approval status filter, { 'NO_SUBMISSION_YET', 'PENDING', 'APPROVED', 'ACTION_REQUESTED', 'BLOCKED' } |
approvalDescription | String | No | undefined | description only for ACTION_REQUESTED status |
- for successed case
{ status: 200, msg: 'sccuess', data: userinfo }
- for failed case
{ status: 400, msg: err_msg, data: err }
GET /submission_list
Name | Type | Mandatory | Default | Description |
---|---|---|---|---|
token | String | Yes | undefined | admin user token |
offset | Number | No | 0 | offset from the latest |
count | Number | No | 16 | submission count |
approvalStatus | String | No | undefined | approval status filter, { 'NO_SUBMISSION_YET', 'PENDING', 'APPROVED', 'ACTION_REQUESTED', 'BLOCKED' } |
useremail | String | No | undefined | user email filter |
- for successed case
{ status: 200, msg: 'sccuess', data: { total, result: [submission] } }
submission = {
"documentType": "PASSPORT",
"approvalStatus": "NO_SUBMISSION_YET",
"_id": "5b25814065da8b5b209a2892",
"email": "[email protected]",
"password": "$2a$10$OLqgkzBhbJvNfTNMmfG31.gYMGEsF6XpDOtbSAbW2BJQ4yIcYthwC",
"default_password": "b6d4122",
"createdAt": "2018-06-16T21:29:36.999Z",
"updatedAt": "2018-06-16T21:29:37.000Z",
"__v": 0,
"time_diff": 641609
}
- for failed case
{ status: 400, msg: err_msg, data: err }
POST /update/identity
Name | Type | Mandatory | Default | Description |
---|---|---|---|---|
token | String | Yes | undefined | admin user token |
useremail | String | Yes | undefined | user email |
documentType | String | Yes | undefined | document type, { 'PASSPORT', 'IDCARD' } |
identityDocument | base64_image | Yes | undefined | base64 image raw data |
- for successful case
{ status: 200, msg: 'sccuess', data: user_info }
- for failed case
{ status: 400, msg: err_msg, data: err }
POST /update/selfie
Name | Type | Mandatory | Default | Description |
---|---|---|---|---|
token | String | Yes | undefined | admin user token |
useremail | String | Yes | undefined | user email |
selfie | base64_image | Yes | undefined | base64 image raw data |
- for successful case
{ status: 200, msg: 'sccuess', data: user_info }
- for failed case
{ status: 400, msg: err_msg, data: err }
GET /userdocuments
Name | Type | Mandatory | Default | Description |
---|---|---|---|---|
token | String | Yes | undefined | admin user token |
useremail | String | Yes | undefined | user email |
type | String | No | all | document type, { selfie, identityDocument, all } |
- for successful case
{ status: 200, msg: 'sccuess', data: [{type: base64_image}] }
- for failed case
{ status: 400, msg: err_msg, data: err }