User Update-Request
STAGING_URL: https://switch-api-staging.herokuapp.com
LIVE_URL: https://switchapi.azurewebsites.net
Create Update-Request
POST
https://switch-api-staging.herokuapp.com/user/update_requests/:user_attribute
This endpoint allows the user to request for an update on his/her profile or BVN.
Path Parameters
user_attribute
string
The attribute being updated. Could be any of the following: name, email, address, phone or date_of_birth
Headers
auth_token
string
Format for auth_token is Bearer token_string
Request Body
zipcode
string
The user's zipcode. Required when user_attribute is address
bvn_change
boolean
Determines whether the changes should be made on the user's BVN. Defaults to true
city
string
The user's city of residence. Required when user_attribute is address
state
string
The user's state of residence. Required when user_attribute is address
reason
string
Only required when user_attribute is name. Could be either marriage, spelling_error or total_name_change.
first_name
string
The new first name. Required when user_attribute is name
last_name
string
The new last name. Required when user_attribute is name
string
The new email. Required when user_attribute is email
address
string
The new street address. Required when user_attribute is address
phone
string
The new phone number. Required when user_attribute is phone
date_of_birth
string
The correct date of birth. Required when user_attribute is date_of_birth
switch_change
boolean
Determines whether the changes should be made on the Switch app. Defaults to false
marriage_certificate_url
string
The url of the image containing the marriage certificate. Required when user_attribute is name and reason is marriage
affidavit_url
string
The url of the image containing the affidavit. Required when - user_attribute is name and reason is marriage - user_attribute is name and reason is total_name_change - user_attribute is date_of_birth
newspaper_publication_url
string
The url of the image containing the newspaper publication. Required when user_attribute is name and reason is - marriage - total_name_change
photo_id_url
string
The url of the image containing the photo id. Required when - user_attribute is name - user_attribute is date_of_birth
photo_id_issuer
string
The photo id issuer (valid values: drivers_license, voters_card, international_passport and national_id_card)
photo_id_number
string
The number of the photo id
photo_id_expiry
string
The expiry date of the photo id
utility_bill_url
string
The url of the image containing the utility bill. Required when user_attribute is address
birth_certificate_url
string
The url of the image containing the birth certificate. Required when user_attribute is date_of_birth
{
"message": "Your update-request has been received and will be processed within the next 7 working days."
}
Get user's update-requests
GET
https://switch-api-staging.herokuapp.com/user/update_requests
Retrieves all the user's update-requests
Headers
auth_token
string
Format for auth_token is Bearer token_string
{
"message": "User update-requests retrieved successfully",
"data": [
{
"id": 32,
"old_value": {
"first_name": "Tayo",
"last_name": "Tade"
},
"new_value": {
"first_name": "Ayo",
"last_name": "Ade"
},
"user_attribute": "name",
"reason": "total_name_change",
"switch_change": false,
"bvn_change": true,
"status": "pending",
"created_at": "2019-05-10T11:26:02.500Z"
},
{
"id": 33,
"old_value": {
"email": "tayo@gmail.com"
},
"new_value": {
"email": "someone@email.com"
},
"user_attribute": "email",
"reason": "spelling_error",
"switch_change": false,
"bvn_change": true,
"status": "pending",
"created_at": "2019-05-10T11:26:58.032Z"
},
{
"id": 34,
"old_value": {
"phone": "+2348184292899"
},
"new_value": {
"phone": "+2348023193506"
},
"user_attribute": "phone",
"reason": "spelling_error",
"switch_change": false,
"bvn_change": true,
"status": "pending",
"created_at": "2019-05-10T11:27:37.279Z"
},
{
"id": 35,
"old_value": {
"date_of_birth": "1991-11-10"
},
"new_value": {
"date_of_birth": "1990-11-10"
},
"user_attribute": "date_of_birth",
"reason": "spelling_error",
"switch_change": false,
"bvn_change": true,
"status": "pending",
"created_at": "2019-05-10T11:29:29.290Z"
},
{
"id": 36,
"old_value": {
"address": "some street",
"city": "some city",
"state": "some state",
"zipcode": "something"
},
"new_value": {
"address": "street",
"city": "city",
"state": "state",
"zipcode": "zipcode"
},
"user_attribute": "address",
"reason": "spelling_error",
"switch_change": false,
"bvn_change": true,
"status": "pending",
"created_at": "2019-05-10T11:38:01.146Z"
}
]
}
Last updated
Was this helpful?