CustomersGet Customer Details

Get Customer

Use this endpoint to fetch detailed information about a specific customer by providing their unique customer email or code.

Endpoint

GET https://backendapi.sayswitchgroup.com/api/v1/customer/{email_or_code}

Sample cURL Request

curl -X GET https://backendapi.sayswitchgroup.com/api/v1/customer/johndoe@gmail.com 
  -H "Authorization: Bearer YOUR_SECRET_KEY"

Sample Response

{
    "success": true,
    "message": "Customer retrieved",
    "data": {
        "id": 330,
        "first_name": "John",
        "last_name": "Doe",
        "email": "test@email.com",
        "phone": "08159994269",
        "bvn": null,
        "domain": "test",
        "customer_code": "CUS_8n9f689gok7obwg",
        "metadata": "{}",
        "status": "active"
    }
}

Response Fields

FieldTypeDescription
successbooleanIndicates if the request was successful
messagestringMessage describing the result
idnumberUnique identifier for the customer
first_namestringThe customer’s first name
last_namestringThe customer’s last name
emailstringThe customer’s email address
phonestringThe customer’s phone number
bvnstringThe customer’s BVN (may be null)
domainstringThe domain associated with the customer
customer_codestringUnique code assigned to the customer
metadatastringAdditional data in JSON string format
statusstringCurrent status of the customer (active, etc.)