User
Info about user(s)
STAGING_URL: https://switchapi3.azurewebsites.net
LIVE_URL: https://switchapi.azurewebsites.net
Get user info
GET
https://switchapi3.azurewebsites.net/user
This endpoint allows you to get user info
Headers
Authorization
string
The format of `Authorization` is `Bearer token_string`
{
"message": "User retrieved successfully",
"data": {
"id": "11",
"email": "beyonceknowles@gmail.com",
"phone": "+2348154634619",
"first_name": "Beyonce",
"last_name": "Knowles",
"date_of_birth": "1981-09-04",
"photo_id_url": "+2348154634619_id_card_beyonce.jpg",
"image_selfie_url": "+2348154634619_image_selfie_url_beyonce.jpg",
"signature_url": null,
"address": "19, Okotie Eboh",
"is_verified": false,
"gender": "female",
"country": "NG",
"blacklisted": false,
"switch_id": 100111,
"two_factor_authentication_enabled": true,
"two_factor_authentication_type": "pin",
"phone_verified": true,
"pin_set": true,
"payment_link_slug": "100111",
"city": "Ikoyi",
"state": "Lagos",
"zipcode": "101233",
"last_sign_in": "2019-02-11T13:21:59.409Z",
"photo_id_issuer": null,
"photo_id_number": null,
"photo_id_expiry": null,
"switch_bank_account_name": null,
"switch_bank_account_number": null,
"google_auth_set_up": false,
"nigerian_contact_name": null,
"nigerian_contact_phone": null,
"nigerian_contact_address": null,
"nigerian_contact_relationship": null,
"switch_bank_customer_id": null,
"disabled": false,
"has_pending_disable_request": false,
"has_pending_enable_request": false,
"fraud_status": "whitelisted",
"verified_at": null,
"verification_requested": false,
"bvn": null,
"security_question_set": true,
"is_diaspora": false,
"has_wallet": true,
"invite_link": "http://localhost:3000/register/100111"
}
}
Get user balance
GET
https://switchapi3.azurewebsites.net/user/balance
This endpoint retrieves the user's balance.
Headers
Authorization
string
The format for Authorization is Bearer token_string
#Unverified user
{
"message": "User balance retrieved successfully",
"data": {
"wallet": {
"main_balance": 2278497,
"soft_balance": 2278497
}
}
}
#Verified user
{
"message": "User balance retrieved successfully",
"data": {
"wallet": {
"main_balance": 500000,
"soft_balance": 500000
},
"account": {
"main_balance": 13917367,
"soft_balance": 13932617
}
}
}
Change password
POST
https://switchapi3.azurewebsites.net/user/update_password
Change user password
Headers
auth_token
string
Format of auth_token is Bearer token_string
Request Body
password_confirmation
string
password confirmation
password
string
The new password
current_password
string
The user's current password
{
"message": "User password changed successfully",
"data": {
"id": 1,
"email": "omitirand@gmail.com",
"first_name": "Demilade",
"last_name": "Omitiran",
"phone": "+2348184392899",
"date_of_birth": "1995-12-13",
"gender": "male",
"country": "Nigeria",
"is_verified": false,
"blacklisted": false,
"pin_set": true,
"phone_verified": true,
"two_factor_authentication_enabled": true,
"bvn": "22xxxxxx380",
"address": "Alagomeji",
"photo_id_url": "https://drive.google.com/open?id=1-RjU8CngD7dpnGMxaqFq1WIBPI9OIc6x",
"image_selfie_url": "https://drive.google.com/open?id=1-RjU8CngD7dpnGMxaqFq1WIBPI9OIc6x",
"signature_url": "https://drive.google.com/open?id=1-RjU8CngD7dpnGMxaqFq1WIBPI9OIc6x",
"switch_id": 1,
"payment_link_slug": "payment.link.com",
"city": "Yaba",
"state": "Lagos",
"full_address": "Alagomeji Lagos Yaba 100001",
"zipcode": "100001",
"last_sign_in": "2019-02-20T10:04:05.281Z",
"photo_id_expiry": "2020-04-01T00:00:00.000Z",
"photo_id_issuer": "national_id_card",
"photo_id_number": "11",
"verification_requested": true,
"wallet": {
"wallet_balance": "0.0",
"soft_balance": "0.0"
},
"authenticator_uri": "otpauth://totp/SWITCH:omitirand@gmail.com?secret=4do6n2znuburdnme&issuer=SWITCH",
"two_factor_authentication_type": "pin",
"security_question_set": true
}
}
Get Wallet Balance
GET
https://switchapi3.azurewebsites.net/user/balance/wallet
This endpoint retrieves wallet balance.
Headers
SWI-CID
string
Client ID
Authorization
string
Format is Bearer token.
{
"message": "User wallet balance retrieved successfully",
"data": {
"main_balance": 3532000,
"soft_balance": 4532000,
"currency": "NGN"
}
}
Get Savings Account Balance
GET
https://switchapi3.azurewebsites.net/user/balance/account
This endpoint retrieves the user's savings account balance.
Headers
SWI-CID
string
Client ID
Authorization
string
Format is Bearer token
{
"message": "User savings account balance retrieved successfully",
"data": {
"main_balance": 0,
"soft_balance": 0,
"account_number": "0072137711",
"currency": "NGN"
}
}
Get Dom Account Balance
GET
https://switchapi3.azurewebsites.net/user/balance/dom_accounts
This endpoint retrieves the balances of all the user's dom accounts.
Headers
SWI-CID
string
Client ID
Authorization
string
Format is Bearer token.
{
"message": "User domiciliary account balance retrieved successfully",
"data": [
{
"main_balance": 0,
"soft_balance": 0,
"account_number": "0072137711",
"currency": "USD"
}
]
}
Last updated
Was this helpful?