Slotify

Introduction

Slotify is an online scheduling application designed to manage and streamline booking processes for various services. The system aims to provide users with an intuitive and efficient way to schedule appointments, manage bookings, and handle cancellations.

  • PHP
  • CURL
$endpoint = 'https://api.slotify.ca/v1/apps';
$owner_token = base64_encode('email:token'); 

$data = array(    
    'slug' => 'my-app',
    'name' => 'My Scheduling App',    
    'description' => 'My awesome booking app',    
    'meta' => [
       'store_id' => 12345
    ]  
);

$post_data = json_encode($data);
$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 => 'POST',
    CURLOPT_POSTFIELDS => $post_data,
    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);
$endpoint = 'https://api.slotify.ca/v1/apps';
$owner_token = base64_encode('email:token'); 

$data = array(    
    'slug' => 'my-app',
    'name' => 'My Scheduling App',    
    'description' => 'My awesome booking app',    
    'meta' => [
       'store_id' => 12345
    ]  
);

$post_data = json_encode($data);
$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 => 'POST',
    CURLOPT_POSTFIELDS => $post_data,
    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);