Slotify

Update Specific Customer

This endpoint will be used to update specific customer for given app.

Authentication

This endpoint needs app token for authentication.

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

Example Request:

Following code shows how to send request to update specific customer in Slotify api.

  • PHP
  • BASH
$endpoint = 'https://api.slotify.ca/v1/customers/bc7b15f9-2573-4aaa-be09-44d6c6f9c62c';
$owner_token = base64_encode('app_token'); 

$new_data = array(
    'first_name' => 'Updated First Name',
    'last_name' => 'Updated Last Name'
);


$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 => 'PUT',
    CURLOPT_POSTFIELDS => $new_data_json,
    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 PUT \
  https://api.slotify.ca/v1/customers/:uuid \
  -H 'Authorization: Bearer ' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "first_name": "Updated First Name",
    "last_name": "Updated Last Name"
}'

Example Response:

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

  • 204 Not Content