Manage Business Customers

Manage Business Officer

Add A Business Officer

You can add a new business officer (OWNER or DIRECTOR) to an existing business customer, make a POST request to the endpoint {{baseUrl}}/api/v1/businesses/:businessId/officers with the payload below:

VerbURL
POST{{baseUrl}}/api/v1/businesses/:businessId/officers

📘

This field identificationType for a business officer is an enum and take any of the following: DRIVERS_LICENSE, VOTERS_CARD, PASSPORT, NATIONAL_ID, NIN_SLIP

Sample payload to add a business officer:

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

VerbURL
PATCH{{baseUrl}}/api/v1/businesses/:businessid/officers/:officerid

Sample Payload:

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 Only

To update the name of a business officer's name, make a PATCH request to the endpoint {{baseUrl}}/api/v1/businesses/:businessId/officers/:officerId

VerbURL
PATCH{{baseUrl}}/api/v1/businesses/:businessId/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 a Business Officer

To update the percentageOwned of a business officer, make a PATCH request to the endpoint {{baseUrl}}/api/v1/businesses/:businessId/officers/:officerId

VerbURL
PATCH{{baseUrl}}/api/v1/businesses/:businessId/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 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

VerbURL
PATCH{{baseUrl}}/api/v1/businesses/:businessId/officers/:officerId

Sample Payload

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).

VerbURL
DELETE{{baseUrl}}/api/v1/businesses/:businessId/officers/:officerId

Delete Business Customer

curl --request DELETE \
     --url https://api.sandbox.getanchor.co/api/v1/businesses/:businessId/officers/:officerId \
     --header 'accept: application/json' \
     --header 'x-anchor-key: <API Key>'
{
  "data": {
    "id": "0",
    "attributes": {
      "message": "Customer resource deleted"
    }
  }
}