List Customers

 This endpoint allows you to retrieve information about all customers created within Slotify.

Authentication

This endpoint needs app token for authentication.

MethodGET
Endpointv1/customers
HeadersAccept: application/json 
Authorization: Bearer <base64_encoded_token> 
Token TypeApp

Query Parameters

This endpoint supports query parameters:

FieldValueDescription
includemeta,app,addresscan include meta, app and address for customer
searchemail, first_name, last_nameyou can search customer with their email, first or last name

Example Request:

Following code shows how to send request to retrieve customers in Slotify api.

  • PHP
  • BASH
$endpoint = 'https://api.slotify.ca/v1/customers';
$owner_token = base64_encode('app_token'); 

$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => $endpoint,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => array(
        'Authorization: Bearer ' . $owner_token,
        'Accept: application/json',
        'Content-Type: application/json'
    ),
));

$response = curl_exec($curl);
if(curl_errno($curl)) {
    echo 'Error: ' . curl_error($curl);
} else {
    echo $response;
}

curl_close($curl);
curl -X GET \
  https://api.slotify.ca/v1/customers \
  -H 'Authorization: Bearer ' \
  -H 'Accept: application/json'

Example Response:

Following response will be provided by Slotify server when this endpoint is called:

  • 200 Ok
{
    "data": [
        {
            "name": "John Doe",
            "dob": "1985-04-15",
            "uuid": "8d6b241b-bd03-408e-825c-51f35e06a1da",
            "phone": "699-868-4715",
            "email": "[email protected]",
            "notes": null,
            "gender": "unknown",
            "avatar": "https://cdn.fakercloud.com/avatars/djsherman_128.jpg",
            "timezone": "America/New_York",
            "last_name": "Doe",
            "first_name": "John",
            "created_at": "2024-04-29T23:15:14+00:00",
            "updated_at": "2024-04-29T23:15:14+00:00"
        }
    ],
    "perPage": 25,
    "currentPage": 1,
    "total": 1,
    "totalPages": 1
}