Update a customer
curl --request PATCH \
--url https://{host}/v1/customers/{customerId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"first_name": "Adaeze",
"last_name": "Okafor",
"middle_name": "Chioma",
"email": "adaeze.okafor@example.com",
"phone_number": "+2348012345678",
"date_of_birth": "1994-03-21",
"alias": "Mama Ada"
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'Adaeze',
last_name: 'Okafor',
middle_name: 'Chioma',
email: 'adaeze.okafor@example.com',
phone_number: '+2348012345678',
date_of_birth: '1994-03-21',
alias: 'Mama Ada'
})
};
fetch('https://{host}/v1/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/customers/{customerId}"
payload = {
"first_name": "Adaeze",
"last_name": "Okafor",
"middle_name": "Chioma",
"email": "adaeze.okafor@example.com",
"phone_number": "+2348012345678",
"date_of_birth": "1994-03-21",
"alias": "Mama Ada"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_type": "individual",
"first_name": "Adaeze",
"last_name": "Okafor",
"phone_number": "+2348012345678",
"date_of_birth": "1994-03-21",
"mode": "<string>",
"status": "<string>",
"kyc_tier": 123,
"kyc_status": "<string>",
"date_created": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"middle_name": "Chioma",
"email": "adaeze.okafor@example.com",
"address": {
"line1": "12 Allen Avenue",
"city": "Ikeja",
"state": "Lagos",
"country": "NG",
"landmark": "Opposite the filling station"
},
"alias": "Mama Ada",
"deactivated_at": "2023-11-07T05:31:56Z",
"deactivation_reason": "<string>",
"deactivated_by": "<string>"
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"fields": {}
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}Customers
Update a customer
Changes only the fields sent. Names and date of birth are fixed once the identity is verified.
Required permission: feature:CUSTOMERS, customers:write
PATCH
/
v1
/
customers
/
{customerId}
Update a customer
curl --request PATCH \
--url https://{host}/v1/customers/{customerId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"first_name": "Adaeze",
"last_name": "Okafor",
"middle_name": "Chioma",
"email": "adaeze.okafor@example.com",
"phone_number": "+2348012345678",
"date_of_birth": "1994-03-21",
"alias": "Mama Ada"
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'Adaeze',
last_name: 'Okafor',
middle_name: 'Chioma',
email: 'adaeze.okafor@example.com',
phone_number: '+2348012345678',
date_of_birth: '1994-03-21',
alias: 'Mama Ada'
})
};
fetch('https://{host}/v1/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/customers/{customerId}"
payload = {
"first_name": "Adaeze",
"last_name": "Okafor",
"middle_name": "Chioma",
"email": "adaeze.okafor@example.com",
"phone_number": "+2348012345678",
"date_of_birth": "1994-03-21",
"alias": "Mama Ada"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_type": "individual",
"first_name": "Adaeze",
"last_name": "Okafor",
"phone_number": "+2348012345678",
"date_of_birth": "1994-03-21",
"mode": "<string>",
"status": "<string>",
"kyc_tier": 123,
"kyc_status": "<string>",
"date_created": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"middle_name": "Chioma",
"email": "adaeze.okafor@example.com",
"address": {
"line1": "12 Allen Avenue",
"city": "Ikeja",
"state": "Lagos",
"country": "NG",
"landmark": "Opposite the filling station"
},
"alias": "Mama Ada",
"deactivated_at": "2023-11-07T05:31:56Z",
"deactivation_reason": "<string>",
"deactivated_by": "<string>"
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"fields": {}
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}Authorizations
Body
application/json