Manage Business Customers
Manage Business Customer
Update Registration Type
You can update the registration type of a business. e.g update from business name to private incorporated.
| Verb | URL |
|---|---|
PATCH | {baseURL}/api/v1/businesses/:businessCustomerID |
curl --location --request PATCH 'https://api.sandbox.getanchor.co/api/v1/businesses/17634011093493-anc_bus_cst' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-anchor-key: <API Key>' \
--data '{
"data": {
"type": "BusinessCustomerV2",
"attributes": {
"registrationType": "Private_Incorporated"
}
}
}'Update Date Of Registration
You can update the date of registration of a business.
| Verb | URL |
|---|---|
PATCH | {baseURL}/api/v1/businesses/:businessCustomerID |
curl --location --request PATCH 'https://api.sandbox.getanchor.co/api/v1/businesses/17189232901089-anc_bus_cst' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-anchor-key: <API Key>' \
--data '{
"data": {
"type": "BusinessCustomerV2",
"attributes": {
"dateOfRegistration": "1990-06-25"
}
}
}'Update Business Addresses
| Verb | URL |
|---|---|
PATCH | {baseURL}/api/v1/businesses/:businessCustomerId |
curl --location --request PATCH 'https://api.sandbox.getanchor.co/api/v1/businesses/17634011093493-anc_bus_cst' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-anchor-key: <API Key>' \
--data '{
"data": {
"type": "BusinessCustomerV2",
"attributes": {
"address": {
"main": {
"addressLine_1": "12 James strt",
"addressLine_2": "12 James strt",
"country": "NG",
"city": "Ikeja",
"postalCode": "100035",
"state": "Lagos"
},
"registered": {
"addressLine_1": "109 Pepple strt, Computer Vilage",
"addressLine_2": "109 Pepple strt, Computer Vilage",
"country": "NG",
"city": "Ikeja",
"postalCode": "100035",
"state": "Lagos"
}
}
}
}
}'Manage Business Officer
Add Business Officer
You can add a new business officer (OWNER or DIRECTOR) to an existing business customer by making a POST request to the endpoint {{baseUrl}}/api/v1/businesses/:businessId/officers with the payload below:
| Verb | URL |
|---|---|
POST | {{baseUrl}}/api/v1/businesses/:businessCustomerId/officers |
This fieldidentificationTypefor a business officer is an enum and take any of the following: DRIVERS_LICENSE, VOTERS_CARD, PASSPORT, NATIONAL_ID, NIN_SLIP
curl --location 'https://api.sandbox.getanchor.co/api/v1/businesses/17085065886691-anc_bus_cst/officers' \
--header 'Content-Type: application/json' \
--header 'x-anchor-key: <API Key>' \
--data-raw '{
"data": {
"type": "BusinessOfficer",
"attributes": {
"fullName": {
"firstName": "Otega",
"lastName": "Doe",
"middleName": "Smith"
},
"role": "OWNER",
"dateOfBirth": "1990-06-26",
"email": "[email protected]",
"phoneNumber": "08123456136",
"title": "CFO",
"nationality": "NG",
"identificationType": "DRIVERS_LICENSE",
"idDocumentNumber": "3234343433",
"address": {
"addressLine_1": "1 Araromi street",
"addressLine_2": "Lagos Mainland",
"postalCode": "123456",
"city": "Mainland",
"state": "Lagos",
"country": "NG"
},
"bvn": "12345678909",
"percentageOwned": 50.0
}
}
}'{
"data": {
"id": "17168269677320-anc_bus_off",
"type": "BusinessOfficer",
"attributes": {
"role": "OWNER",
"address": {
"addressLine_1": "1 Araromi street",
"addressLine_2": "Lagos Mainland",
"country": "NG",
"city": "Mainland",
"postalCode": "123456",
"state": "Lagos"
},
"percentOwned": 50.0,
"fullName": {
"firstName": "Otega",
"lastName": "Doe",
"middleName": "Smith",
"maidenName": null
},
"dateOfBirth": "1990-06-26",
"identificationType": "DRIVERS_LICENSE",
"idDocumentNumber": "3234343433",
"phoneNumber": "08123456136",
"nationality": "NG",
"bvn": "12345678909",
"email": "[email protected]",
"verification": {
"status": "unverified"
},
"status": "Active"
},
"relationships": {
"customer": {
"data": {
"id": "17085065886691-anc_bus_cst",
"type": "BusinessCustomer"
}
}
}
}
}Update Single Business Officer
You can update the details of a specific business officer. Updating a business officer is a PATCH request to the endpoint {{baseUrl}}/api/v1/businesses/:businessid/officers/:officerid
| Verb | URL |
|---|---|
PATCH | {{baseUrl}}/api/v1/businesses/:businessCustomerId/officers/:officerid |
curl --location --request PATCH 'https://api.sandbox.getanchor.co/api/v1/businesses/171524112768371-anc_bus_cst/officers/171524112834268-anc_bus_off' \
--header 'Content-Type: application/json' \
--header 'x-anchor-key: <API Key>' \
--data-raw '{
"data": {
"type": "BusinessOfficer",
"attributes": {
"fullName": {
"firstName": "John",
"lastName": "Doe",
"middleName": "Smith"
},
"role": "OWNER",
"dateOfBirth": "1920-06-26",
"email": "[email protected]",
"phoneNumber": "08167599586",
"title": "CFO",
"nationality": "NG",
"identificationType": "DRIVERS_LICENSE",
"idDocumentNumber": "3234343433",
"address": {
"addressLine_1": "1 Araromi street",
"addressLine_2": "Lagos Mainland",
"postalCode": "123456",
"city": "Mainland",
"state": "Lagos",
"country": "NG"
},
"bvn": "12345678909",
"percentageOwned": 80.0
}
}
}'Update Business Officer's Name
To update the name of a business officer's name, make a PATCH request to the endpoint {{baseUrl}}/api/v1/businesses/:businessId/officers/:officerId
| Verb | URL |
|---|---|
| PATCH | {{baseUrl}}/api/v1/businesses/:businessCustomerId/officers/:officerId |
curl --location --request PATCH 'https://api.sandbox.getanchor.co/api/v1/businesses/171524112768371-anc_bus_cst/officers/171524112834268-anc_bus_off' \
--header 'Content-Type: application/json' \
--header 'x-anchor-key: <API Key>' \
--data '{
"data": {
"type": "BusinessOfficer",
"attributes": {
"fullName": {
"firstName": "Abiola",
"lastName": "Ahmed",
"middleName": "Smith",
"maidenName": "Ojoh"
}
}
}
}'Update PercentageOwned of Business Officer
To update the percentageOwned of a business officer, make a PATCH request to the endpoint {{baseUrl}}/api/v1/businesses/:businessId/officers/:officerId
| Verb | URL |
|---|---|
| PATCH | {{baseUrl}}/api/v1/businesses/:businessCustomerId/officers/:officerId |
curl --location --request PATCH 'https://api.sandbox.getanchor.co/api/v1/businesses/171524112768371-anc_bus_cst/officers/171524112834268-anc_bus_off' \
--header 'Content-Type: application/json' \
--header 'x-anchor-key: <API Key>' \
--data '{
"data": {
"type": "BusinessOfficer",
"attributes": {
"role": "OWNER",
"percentageOwned": 75.0
}
}
}'Update Role of Business Officer
To update the role of a business officer, make a PATCH request to the endpoint {{baseUrl}}/api/v1/businesses/:businessId/officers/:officerId. The role can either take DIRECTOR or OWNER.
curl --location --request PATCH 'https://api.getanchor.co/api/v1/businesses/:businessCustomerId/officers/:BusinessOfficerId' \
--header 'Content-Type: application/json' \
--header 'x-anchor-key: <API Key>' \
--data '{
"data": {
"type": "BusinessOfficer",
"attributes": {
"role": "DIRECTOR",
}
}
}'Update Business Officer's Date of Birth
The request to update date of birth of a specific business officer is a PATCH request to the endpoint {baseUrl}}/api/v1/businesses/:businessid/officers/:officerid
| Verb | URL |
|---|---|
| PATCH | {{baseUrl}}/api/v1/businesses/:businessCustomerId/officers/:officerId |
curl --location --request PATCH 'https://api.sandbox.getanchor.co/api/v1/businesses/171524112768371-anc_bus_cst/officers/171524112834268-anc_bus_off' \
--header 'Content-Type: application/json' \
--header 'x-anchor-key: <API Key>' \
--data '{
"data": {
"type": "BusinessOfficer",
"attributes": {
"dateOfBirth": "1997-06-26"
}
}
}'Delete Business Officer
To a delete a business officer, make a DELETE request to the endpoint {{baseUrl}}/api/v1/businesses/:businessId/officers/:officerId and provide the business customer Id (businessId) and business officer Id (officerId).
| Verb | URL |
|---|---|
| DELETE | {{baseUrl}}/api/v1/businesses/:businessCustomerId/officers/:officerId |
curl --request DELETE \
--url https://api.sandbox.getanchor.co/api/v1/businesses/171524112768371-anc_bus_cst/officers/171524112834268-anc_bus_off \
--header 'accept: application/json' \
--header 'x-anchor-key: <API Key>'{
"data": {
"id": "0",
"attributes": {
"message": "Customer resource deleted"
}
}
}Delete Business Customer
You can delete the business customer by making a DELETE request to the endpoint {baseURL}//api/v1/customers/:businessCustomerId
| Verb | UR: |
|---|---|
DELETE | {baseURL}//api/v1/customers/:businessCustomerId |
curl --request DELETE \
--url https://api.sandbox.getanchor.co/api/v1/customers/171524112768371-anc_bus_cst \
--header 'accept: application/json' \
--header 'x-anchor-key: <API Key>'Updated 20 days ago