Slotify

Update Specific Slotify App

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

Authentication

Use owner token for this endpoint.

MethodPUT
Endpointv1/apps/:uuid
HeadersAccept: application/json 
Authorization: Bearer <base64_encoded_token> 
Token TypeOwner

Example Request:

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

  • PHP
  • CURL
$endpoint = 'https://api.slotify.ca/v1/apps/bc7b15f9-2573-4aaa-be09-44d6c6f9c62c?include=meta';
$owner_token = base64_encode('email:token'); 

$new_data = array(
    'name' => 'Updated App Name', // Updated app name
    'description' => 'Updated description' // Updated description
);


$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/apps/:uuid \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Updated App Name",
    "description": "Updated description"
}'

Example Response:

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

  • 204 No Content