MENU navbar-image

Introduction

API REST pour la gestion d'horaires, enseignants, locaux et groupes.

Bienvenue sur la documentation de l'API Planifize. Cette API REST permet d'integrer et d'automatiser la gestion des emplois du temps, des ressources (enseignants, locaux) et des groupes.

L'authentification se fait via Laravel Sanctum avec un token Bearer a fournir dans l'en-tete Authorization. Les requetes et reponses sont au format JSON, avec des codes HTTP standards et des messages d'erreur structures.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {VOTRE_TOKEN_BEARER}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Obtenez un token via l'endpoint d'authentification. Utilisez ensuite ce token dans l'en-tete : Authorization: Bearer {VOTRE_TOKEN_BEARER}.

Authentification

API pour l'authentification des utilisateurs. Utilise un système de code de connexion à usage unique (OTP) envoyé par email.

Demander un code de connexion

Envoie un code de connexion à 6 chiffres par email. Le code expire après quelques minutes.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/auth/request-code" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/auth/request-code"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/auth/request-code';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => '[email protected]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "message": "Si ce courriel existe, un code de connexion a été envoyé.",
    "expires_in": 600
}
 

Example response (200, Email inexistant):


{
    "message": "Si ce courriel existe, un code de connexion a été envoyé.",
    "expires_in": 600
}
 

Request   

POST api/v1/auth/request-code

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

L'adresse email de l'utilisateur. Example: [email protected]

Vérifier le code et se connecter

Vérifie le code de connexion et retourne un token d'accès Bearer.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/auth/verify-code" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"code\": \"123456\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/auth/verify-code"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]",
    "code": "123456"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/auth/verify-code';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => '[email protected]',
            'code' => '123456',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "message": "Connexion réussie.",
    "user": {
        "id": 1,
        "name": "Jean Dupont",
        "email": "[email protected]"
    },
    "token": "1|abc123def456..."
}
 

Example response (403, Compte désactivé):


{
    "message": "Votre compte est désactivé."
}
 

Example response (404, Utilisateur non trouvé):


{
    "message": "Utilisateur non trouvé."
}
 

Example response (422, Code invalide):


{
    "message": "Code invalide ou expiré."
}
 

Request   

POST api/v1/auth/verify-code

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

L'adresse email. Example: [email protected]

code   string     

Le code de connexion à 6 chiffres. Example: 123456

Déconnexion

requires authentication

Révoque le token d'accès actuel.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/auth/logout" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/auth/logout"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/auth/logout';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "message": "Déconnexion réussie."
}
 

Request   

POST api/v1/auth/logout

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Utilisateur actuel

requires authentication

Récupère les informations de l'utilisateur authentifié.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/auth/me" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/auth/me"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/auth/me';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "user": {
        "id": 1,
        "name": "Jean Dupont",
        "email": "[email protected]",
        "organization_id": 1
    }
}
 

Request   

GET api/v1/auth/me

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Contraintes

API pour gérer les contraintes d'horaires.

Types de contraintes disponibles

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/constraints/types" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/types"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: ea786229-097d-41d0-8e06-f9450e77b55a
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/constraints/types

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Statistiques des contraintes

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/constraints/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: f544914a-aac7-4082-b0bb-79394aeed0c4
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/constraints/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Violations des contraintes

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/constraints/violations?status=active&severity=error&constraint_id=1&session_id=session-123" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/violations"
);

const params = {
    "status": "active",
    "severity": "error",
    "constraint_id": "1",
    "session_id": "session-123",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/violations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'status' => 'active',
            'severity' => 'error',
            'constraint_id' => '1',
            'session_id' => 'session-123',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 34b24f7f-c7d7-4602-8537-11192cd7d94c
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/constraints/violations

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

status   string  optional    

Filtrer par statut (active, resolved, ignored). Example: active

severity   string  optional    

Filtrer par sévérité (error, warning). Example: error

constraint_id   integer  optional    

Filtrer par contrainte. Example: 1

session_id   string  optional    

Filtrer par session. Example: session-123

Actions en masse - Activer

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/constraints/bulk/activate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/bulk/activate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/bulk/activate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
                2,
                3,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/constraints/bulk/activate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

ids   string[]     

Liste des IDs.

Actions en masse - Désactiver

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/constraints/bulk/deactivate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/bulk/deactivate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/bulk/deactivate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
                2,
                3,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/constraints/bulk/deactivate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

ids   string[]     

Liste des IDs.

Actions en masse - Supprimer

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/constraints/bulk/destroy" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/bulk/destroy"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/bulk/destroy';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
                2,
                3,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/constraints/bulk/destroy

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

ids   string[]     

Liste des IDs.

Lister les contraintes

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/constraints?is_active=1&type=availability&category=hard&entity_type=teacher&per_page=15" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints"
);

const params = {
    "is_active": "1",
    "type": "availability",
    "category": "hard",
    "entity_type": "teacher",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'is_active' => '1',
            'type' => 'availability',
            'category' => 'hard',
            'entity_type' => 'teacher',
            'per_page' => '15',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 26d81242-4ba1-483b-96fc-29c5f1f4ff29
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/constraints

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

is_active   boolean  optional    

Filtrer par statut actif. Example: true

type   string  optional    

Filtrer par type. Example: availability

category   string  optional    

Filtrer par catégorie (hard, soft). Example: hard

entity_type   string  optional    

Filtrer par type d'entité. Example: teacher

per_page   integer  optional    

Nombre de résultats par page. Example: 15

Créer une contrainte

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/constraints" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Indisponibilité lundi\",
    \"description\": \"Et animi quos velit et fugiat.\",
    \"type\": \"availability\",
    \"category\": \"hard\",
    \"constrainable_type\": \"Plugins\\\\Teachers\\\\Models\\\\Teacher\",
    \"constrainable_id\": 1,
    \"rules\": {
        \"days\": [
            \"monday\"
        ],
        \"available\": false
    },
    \"priority\": 80,
    \"weight\": 7,
    \"academic_year\": \"architecto\",
    \"semester\": \"architecto\",
    \"valid_from\": \"2026-04-05T18:47:38\",
    \"valid_until\": \"2052-04-28\",
    \"is_active\": false,
    \"color\": \"ngzmiyv\",
    \"notes\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Indisponibilité lundi",
    "description": "Et animi quos velit et fugiat.",
    "type": "availability",
    "category": "hard",
    "constrainable_type": "Plugins\\Teachers\\Models\\Teacher",
    "constrainable_id": 1,
    "rules": {
        "days": [
            "monday"
        ],
        "available": false
    },
    "priority": 80,
    "weight": 7,
    "academic_year": "architecto",
    "semester": "architecto",
    "valid_from": "2026-04-05T18:47:38",
    "valid_until": "2052-04-28",
    "is_active": false,
    "color": "ngzmiyv",
    "notes": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Indisponibilité lundi',
            'description' => 'Et animi quos velit et fugiat.',
            'type' => 'availability',
            'category' => 'hard',
            'constrainable_type' => 'Plugins\\Teachers\\Models\\Teacher',
            'constrainable_id' => 1,
            'rules' => [
                'days' => [
                    'monday',
                ],
                'available' => false,
            ],
            'priority' => 80,
            'weight' => 7,
            'academic_year' => 'architecto',
            'semester' => 'architecto',
            'valid_from' => '2026-04-05T18:47:38',
            'valid_until' => '2052-04-28',
            'is_active' => false,
            'color' => 'ngzmiyv',
            'notes' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/constraints

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nom de la contrainte. Example: Indisponibilité lundi

description   string  optional    

Must not be greater than 1000 characters. Example: Et animi quos velit et fugiat.

type   string     

Type de contrainte. Example: availability

category   string     

Catégorie (hard, soft). Example: hard

constrainable_type   string  optional    

Type d'entité liée. Example: Plugins\Teachers\Models\Teacher

constrainable_id   integer  optional    

ID de l'entité liée. Example: 1

rules   string[]  optional    

Règles de la contrainte.

priority   integer  optional    

Priorité (0-100). Example: 80

weight   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 7

academic_year   string  optional    

Example: architecto

semester   string  optional    

Example: architecto

valid_from   string  optional    

Must be a valid date. Example: 2026-04-05T18:47:38

valid_until   string  optional    

Must be a valid date. Must be a date after or equal to valid_from. Example: 2052-04-28

is_active   boolean  optional    

Example: false

color   string  optional    

Must not be greater than 7 characters. Example: ngzmiyv

notes   string  optional    

Example: architecto

Afficher une contrainte

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/constraints/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 2c581254-1a5a-4047-962b-94e1a18e5c51
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/constraints/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la contrainte. Example: 1

Mettre à jour une contrainte

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/constraints/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Et animi quos velit et fugiat.\",
    \"type\": \"time_restriction\",
    \"category\": \"soft\",
    \"priority\": 1,
    \"weight\": 5,
    \"academic_year\": \"architecto\",
    \"semester\": \"architecto\",
    \"valid_from\": \"2026-04-05T18:47:38\",
    \"valid_until\": \"2052-04-28\",
    \"is_active\": true,
    \"color\": \"ngzmiyv\",
    \"notes\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "description": "Et animi quos velit et fugiat.",
    "type": "time_restriction",
    "category": "soft",
    "priority": 1,
    "weight": 5,
    "academic_year": "architecto",
    "semester": "architecto",
    "valid_from": "2026-04-05T18:47:38",
    "valid_until": "2052-04-28",
    "is_active": true,
    "color": "ngzmiyv",
    "notes": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'description' => 'Et animi quos velit et fugiat.',
            'type' => 'time_restriction',
            'category' => 'soft',
            'priority' => 1,
            'weight' => 5,
            'academic_year' => 'architecto',
            'semester' => 'architecto',
            'valid_from' => '2026-04-05T18:47:38',
            'valid_until' => '2052-04-28',
            'is_active' => true,
            'color' => 'ngzmiyv',
            'notes' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/constraints/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la contrainte. Example: 1

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Must not be greater than 1000 characters. Example: Et animi quos velit et fugiat.

type   string  optional    

Example: time_restriction

Must be one of:
  • availability
  • preference
  • exclusion
  • grouping
  • load
  • room_requirement
  • time_restriction
  • consecutive
category   string  optional    

Example: soft

Must be one of:
  • hard
  • soft
rules   object  optional    
priority   integer  optional    

Must be at least 0. Must not be greater than 100. Example: 1

weight   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 5

academic_year   string  optional    

Example: architecto

semester   string  optional    

Example: architecto

valid_from   string  optional    

Must be a valid date. Example: 2026-04-05T18:47:38

valid_until   string  optional    

Must be a valid date. Must be a date after or equal to valid_from. Example: 2052-04-28

is_active   boolean  optional    

Example: true

color   string  optional    

Must not be greater than 7 characters. Example: ngzmiyv

notes   string  optional    

Example: architecto

Supprimer une contrainte

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/constraints/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/constraints/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la contrainte. Example: 1

Activer une contrainte

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/constraints/1/activate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/1/activate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/1/activate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/constraints/{id}/activate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la contrainte. Example: 1

Désactiver une contrainte

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/constraints/1/deactivate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/1/deactivate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/1/deactivate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/constraints/{id}/deactivate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la contrainte. Example: 1

Dupliquer une contrainte

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/constraints/1/duplicate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraints/1/duplicate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraints/1/duplicate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/constraints/{id}/duplicate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la contrainte. Example: 1

Cours

API pour gérer les cours. Les cours sont les matières enseignées qui sont programmées dans les horaires.

Lister les cours

requires authentication

Récupère la liste des cours de l'organisation avec options de filtrage.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/courses?active_only=1&department_id=1&search=Programmation&per_page=15&page=1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/courses"
);

const params = {
    "active_only": "1",
    "department_id": "1",
    "search": "Programmation",
    "per_page": "15",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/courses';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'active_only' => '1',
            'department_id' => '1',
            'search' => 'Programmation',
            'per_page' => '15',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": [
        {
            "id": 1,
            "name": "Programmation orientée objet",
            "code": "INF201",
            "department": {
                "id": 1,
                "name": "Informatique"
            },
            "hours_per_week": 4,
            "color": "#3498db",
            "is_active": true
        }
    ],
    "links": {
        "first": "...",
        "last": "...",
        "prev": null,
        "next": "..."
    },
    "meta": {
        "current_page": 1,
        "last_page": 4,
        "per_page": 15,
        "total": 58
    }
}
 

Request   

GET api/v1/courses

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

active_only   boolean  optional    

Filtrer uniquement les cours actifs. Example: true

department_id   integer  optional    

Filtrer par département. Example: 1

search   string  optional    

Rechercher par nom ou code. Example: Programmation

per_page   integer  optional    

Nombre de résultats par page. Example: 15

page   integer  optional    

Numéro de page. Example: 1

Options de sélection

requires authentication

Récupère une liste simplifiée des cours actifs pour alimenter des listes déroulantes.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/courses/options" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/courses/options"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/courses/options';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": [
        {
            "value": 1,
            "label": "INF201 - Programmation orientée objet",
            "code": "INF201",
            "color": "#3498db",
            "hours": 4
        },
        {
            "value": 2,
            "label": "INF301 - Base de données",
            "code": "INF301",
            "color": "#e74c3c",
            "hours": 3
        }
    ]
}
 

Request   

GET api/v1/courses/options

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Afficher un cours

requires authentication

Récupère les détails d'un cours spécifique.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/courses/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/courses/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/courses/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": {
        "id": 1,
        "name": "Programmation orientée objet",
        "code": "INF201",
        "description": "Introduction aux concepts de la POO",
        "department": {
            "id": 1,
            "name": "Informatique"
        },
        "hours_per_week": 4,
        "credits": 3,
        "color": "#3498db",
        "is_active": true,
        "prerequisites": [
            "INF101"
        ]
    }
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Cours non trouvé"
}
 

Request   

GET api/v1/courses/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du cours. Example: 1

Créer un cours

requires authentication

Crée un nouveau cours dans l'organisation courante.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/courses" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Programmation orientée objet\",
    \"code\": \"INF201\",
    \"description\": \"Eius et animi quos velit et.\",
    \"department_id\": 1,
    \"credits\": 3,
    \"academic_year\": \"qwrsitcpscqldzsn\",
    \"semester\": \"any\",
    \"is_elective\": true,
    \"hours_per_week\": 4,
    \"hours_theory\": 25,
    \"hours_practice\": 19,
    \"session_type\": \"flexible\",
    \"min_session_duration\": 16,
    \"max_session_duration\": 3,
    \"preferred_session_duration\": 17,
    \"max_sessions_per_day\": 10,
    \"requires_consecutive_slots\": false,
    \"room_type_required\": \"l\",
    \"min_capacity\": 9,
    \"required_equipment\": [
        \"architecto\"
    ],
    \"color\": \"#3498db\",
    \"sort_order\": 37,
    \"is_active\": true,
    \"notes\": \"architecto\",
    \"preferred_room_types\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/courses"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Programmation orientée objet",
    "code": "INF201",
    "description": "Eius et animi quos velit et.",
    "department_id": 1,
    "credits": 3,
    "academic_year": "qwrsitcpscqldzsn",
    "semester": "any",
    "is_elective": true,
    "hours_per_week": 4,
    "hours_theory": 25,
    "hours_practice": 19,
    "session_type": "flexible",
    "min_session_duration": 16,
    "max_session_duration": 3,
    "preferred_session_duration": 17,
    "max_sessions_per_day": 10,
    "requires_consecutive_slots": false,
    "room_type_required": "l",
    "min_capacity": 9,
    "required_equipment": [
        "architecto"
    ],
    "color": "#3498db",
    "sort_order": 37,
    "is_active": true,
    "notes": "architecto",
    "preferred_room_types": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/courses';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Programmation orientée objet',
            'code' => 'INF201',
            'description' => 'Eius et animi quos velit et.',
            'department_id' => 1,
            'credits' => 3.0,
            'academic_year' => 'qwrsitcpscqldzsn',
            'semester' => 'any',
            'is_elective' => true,
            'hours_per_week' => 4.0,
            'hours_theory' => 25,
            'hours_practice' => 19,
            'session_type' => 'flexible',
            'min_session_duration' => 16,
            'max_session_duration' => 3,
            'preferred_session_duration' => 17,
            'max_sessions_per_day' => 10,
            'requires_consecutive_slots' => false,
            'room_type_required' => 'l',
            'min_capacity' => 9,
            'required_equipment' => [
                'architecto',
            ],
            'color' => '#3498db',
            'sort_order' => 37,
            'is_active' => true,
            'notes' => 'architecto',
            'preferred_room_types' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Créé):


{
  "success": true,
  "message": "Création effectuée",
  "data": {"id": 1, "name": "Programmation orientée objet", ...}
}
 

Example response (422, Validation échouée):


{"success": false, "message": "Erreurs de validation", "errors": {...}}
 

Request   

POST api/v1/courses

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Le nom du cours. Example: Programmation orientée objet

code   string     

Le code unique du cours. Example: INF201

description   string  optional    

Description du cours. Example: Eius et animi quos velit et.

department_id   integer  optional    

ID du département. Example: 1

credits   number  optional    

Nombre de crédits. Example: 3

academic_year   string  optional    

Le champ value ne peut pas avoir plus de 20 caractères. Example: qwrsitcpscqldzsn

semester   string  optional    

Example: any

Must be one of:
  • fall
  • winter
  • summer
  • full_year
  • any
is_elective   boolean  optional    

Example: true

hours_per_week   number  optional    

Heures par semaine. Example: 4

hours_theory   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 100. Example: 25

hours_practice   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 100. Example: 19

session_type   string  optional    

Example: flexible

Must be one of:
  • single
  • split
  • flexible
min_session_duration   integer  optional    

Le champ value doit être d'au moins 15. Le champ value ne peut pas être supérieur à 480. Example: 16

max_session_duration   integer  optional    

Le champ value doit être d'au moins 15. Le champ value ne peut pas être supérieur à 480. Example: 3

preferred_session_duration   integer  optional    

Le champ value doit être d'au moins 15. Le champ value ne peut pas être supérieur à 480. Example: 17

max_sessions_per_day   integer  optional    

Le champ value doit être d'au moins 1. Le champ value ne peut pas être supérieur à 10. Example: 10

requires_consecutive_slots   boolean  optional    

Example: false

room_type_required   string  optional    

Le champ value ne peut pas avoir plus de 50 caractères. Example: l

min_capacity   integer  optional    

Le champ value doit être d'au moins 1. Le champ value ne peut pas être supérieur à 1000. Example: 9

required_equipment   string[]  optional    

Équipements requis.

color   string  optional    

Couleur (format hex). Example: #3498db

sort_order   integer  optional    

Le champ value doit être d'au moins 0. Example: 37

is_active   boolean  optional    

Cours actif. Example: true

notes   string  optional    

Notes additionnelles. Example: architecto

custom_attributes   object  optional    
settings   object  optional    
preferred_room_types   string[]  optional    

Types de salles préférées.

Modifier un cours

requires authentication

Met à jour les informations d'un cours existant.

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/courses/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Programmation orientée objet\",
    \"code\": \"INF201\",
    \"description\": \"Eius et animi quos velit et.\",
    \"department_id\": 1,
    \"credits\": 3,
    \"academic_year\": \"qwrsitcpscqldzsn\",
    \"semester\": \"full_year\",
    \"is_elective\": true,
    \"hours_per_week\": 4,
    \"hours_theory\": 25,
    \"hours_practice\": 19,
    \"session_type\": \"split\",
    \"min_session_duration\": 16,
    \"max_session_duration\": 3,
    \"preferred_session_duration\": 17,
    \"max_sessions_per_day\": 10,
    \"requires_consecutive_slots\": true,
    \"room_type_required\": \"l\",
    \"min_capacity\": 9,
    \"required_equipment\": [
        \"architecto\"
    ],
    \"color\": \"#3498db\",
    \"sort_order\": 37,
    \"is_active\": true,
    \"notes\": \"architecto\",
    \"preferred_room_types\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/courses/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Programmation orientée objet",
    "code": "INF201",
    "description": "Eius et animi quos velit et.",
    "department_id": 1,
    "credits": 3,
    "academic_year": "qwrsitcpscqldzsn",
    "semester": "full_year",
    "is_elective": true,
    "hours_per_week": 4,
    "hours_theory": 25,
    "hours_practice": 19,
    "session_type": "split",
    "min_session_duration": 16,
    "max_session_duration": 3,
    "preferred_session_duration": 17,
    "max_sessions_per_day": 10,
    "requires_consecutive_slots": true,
    "room_type_required": "l",
    "min_capacity": 9,
    "required_equipment": [
        "architecto"
    ],
    "color": "#3498db",
    "sort_order": 37,
    "is_active": true,
    "notes": "architecto",
    "preferred_room_types": [
        "architecto"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/courses/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Programmation orientée objet',
            'code' => 'INF201',
            'description' => 'Eius et animi quos velit et.',
            'department_id' => 1,
            'credits' => 3.0,
            'academic_year' => 'qwrsitcpscqldzsn',
            'semester' => 'full_year',
            'is_elective' => true,
            'hours_per_week' => 4.0,
            'hours_theory' => 25,
            'hours_practice' => 19,
            'session_type' => 'split',
            'min_session_duration' => 16,
            'max_session_duration' => 3,
            'preferred_session_duration' => 17,
            'max_sessions_per_day' => 10,
            'requires_consecutive_slots' => true,
            'room_type_required' => 'l',
            'min_capacity' => 9,
            'required_equipment' => [
                'architecto',
            ],
            'color' => '#3498db',
            'sort_order' => 37,
            'is_active' => true,
            'notes' => 'architecto',
            'preferred_room_types' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "message": "Cours mis à jour",
  "data": {"id": 1, "name": "Programmation orientée objet", ...}
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Cours non trouvé"
}
 

Example response (422, Validation échouée):


{"success": false, "message": "Erreurs de validation", "errors": {...}}
 

Request   

PUT api/v1/courses/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du cours. Example: 1

Body Parameters

name   string  optional    

Le nom du cours. Example: Programmation orientée objet

code   string  optional    

Le code unique du cours. Example: INF201

description   string  optional    

Description du cours. Example: Eius et animi quos velit et.

department_id   integer  optional    

ID du département. Example: 1

credits   number  optional    

Nombre de crédits. Example: 3

academic_year   string  optional    

Le champ value ne peut pas avoir plus de 20 caractères. Example: qwrsitcpscqldzsn

semester   string  optional    

Example: full_year

Must be one of:
  • fall
  • winter
  • summer
  • full_year
  • any
is_elective   boolean  optional    

Example: true

hours_per_week   number  optional    

Heures par semaine. Example: 4

hours_theory   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 100. Example: 25

hours_practice   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 100. Example: 19

session_type   string  optional    

Example: split

Must be one of:
  • single
  • split
  • flexible
min_session_duration   integer  optional    

Le champ value doit être d'au moins 15. Le champ value ne peut pas être supérieur à 480. Example: 16

max_session_duration   integer  optional    

Le champ value doit être d'au moins 15. Le champ value ne peut pas être supérieur à 480. Example: 3

preferred_session_duration   integer  optional    

Le champ value doit être d'au moins 15. Le champ value ne peut pas être supérieur à 480. Example: 17

max_sessions_per_day   integer  optional    

Le champ value doit être d'au moins 1. Le champ value ne peut pas être supérieur à 10. Example: 10

requires_consecutive_slots   boolean  optional    

Example: true

room_type_required   string  optional    

Le champ value ne peut pas avoir plus de 50 caractères. Example: l

min_capacity   integer  optional    

Le champ value doit être d'au moins 1. Le champ value ne peut pas être supérieur à 1000. Example: 9

required_equipment   string[]  optional    

Équipements requis.

color   string  optional    

Couleur (format hex). Example: #3498db

sort_order   integer  optional    

Le champ value doit être d'au moins 0. Example: 37

is_active   boolean  optional    

Cours actif. Example: true

notes   string  optional    

Notes additionnelles. Example: architecto

custom_attributes   object  optional    
settings   object  optional    
preferred_room_types   string[]  optional    

Types de salles préférées.

Supprimer un cours

requires authentication

Supprime un cours (soft delete). Le cours ne sera plus visible mais ses données historiques sont conservées.

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/courses/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/courses/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/courses/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "message": "Suppression effectuée"
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Cours non trouvé"
}
 

Example response (409, Conflit):


{
    "success": false,
    "message": "Impossible de supprimer: le cours a des séances programmées"
}
 

Request   

DELETE api/v1/courses/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du cours. Example: 1

Créneaux horaires

API pour gérer les créneaux de la grille temporelle.

Types de créneaux disponibles

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/time-slots/types" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/time-slots/types"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/time-slots/types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 64609ee8-f6f6-44bb-b079-ba47ee0262eb
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/time-slots/types

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Statistiques des créneaux

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/time-slots/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/time-slots/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/time-slots/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: e312c389-90a3-4857-906f-e89e43b17910
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/time-slots/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Activer des créneaux en masse

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/time-slots/bulk/activate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/time-slots/bulk/activate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/time-slots/bulk/activate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
                2,
                3,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/time-slots/bulk/activate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

ids   string[]     

Liste des IDs.

Désactiver des créneaux en masse

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/time-slots/bulk/deactivate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/time-slots/bulk/deactivate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/time-slots/bulk/deactivate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
                2,
                3,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/time-slots/bulk/deactivate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

ids   string[]     

Liste des IDs.

Lister les créneaux

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/time-slots?is_active=1&slot_type=class&is_schedulable=1&search=P%C3%A9riode+1&per_page=15" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/time-slots"
);

const params = {
    "is_active": "1",
    "slot_type": "class",
    "is_schedulable": "1",
    "search": "Période 1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/time-slots';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'is_active' => '1',
            'slot_type' => 'class',
            'is_schedulable' => '1',
            'search' => 'Période 1',
            'per_page' => '15',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 397c3c44-fe07-42b3-b750-52bdf8e12931
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/time-slots

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

is_active   boolean  optional    

Filtrer par statut actif. Example: true

slot_type   string  optional    

Filtrer par type. Example: class

is_schedulable   boolean  optional    

Filtrer par planifiable. Example: true

search   string  optional    

Recherche par nom ou code. Example: Période 1

per_page   integer  optional    

Nombre de résultats par page. Example: 15

Créer un créneau

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/time-slots" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Période 1\",
    \"code\": \"ngzmiyvdljnikhwa\",
    \"start_time\": \"08:00\",
    \"end_time\": \"08:50\",
    \"slot_type\": \"class\",
    \"monday\": true,
    \"tuesday\": true,
    \"wednesday\": true,
    \"thursday\": false,
    \"friday\": true,
    \"saturday\": false,
    \"sunday\": false,
    \"is_schedulable\": true,
    \"is_active\": false,
    \"max_consecutive\": 22,
    \"color\": \"gzmiyvd\",
    \"description\": \"Accusantium harum mollitia modi deserunt aut ab.\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/time-slots"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Période 1",
    "code": "ngzmiyvdljnikhwa",
    "start_time": "08:00",
    "end_time": "08:50",
    "slot_type": "class",
    "monday": true,
    "tuesday": true,
    "wednesday": true,
    "thursday": false,
    "friday": true,
    "saturday": false,
    "sunday": false,
    "is_schedulable": true,
    "is_active": false,
    "max_consecutive": 22,
    "color": "gzmiyvd",
    "description": "Accusantium harum mollitia modi deserunt aut ab."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/time-slots';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Période 1',
            'code' => 'ngzmiyvdljnikhwa',
            'start_time' => '08:00',
            'end_time' => '08:50',
            'slot_type' => 'class',
            'monday' => true,
            'tuesday' => true,
            'wednesday' => true,
            'thursday' => false,
            'friday' => true,
            'saturday' => false,
            'sunday' => false,
            'is_schedulable' => true,
            'is_active' => false,
            'max_consecutive' => 22,
            'color' => 'gzmiyvd',
            'description' => 'Accusantium harum mollitia modi deserunt aut ab.',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/time-slots

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nom du créneau. Example: Période 1

code   string  optional    

Must not be greater than 20 characters. Example: ngzmiyvdljnikhwa

start_time   string     

Heure de début (HH:MM). Example: 08:00

end_time   string     

Heure de fin (HH:MM). Example: 08:50

slot_type   string  optional    

Type de créneau. Example: class

monday   boolean  optional    

Example: true

tuesday   boolean  optional    

Example: true

wednesday   boolean  optional    

Example: true

thursday   boolean  optional    

Example: false

friday   boolean  optional    

Example: true

saturday   boolean  optional    

Example: false

sunday   boolean  optional    

Example: false

is_schedulable   boolean  optional    

Example: true

is_active   boolean  optional    

Example: false

max_consecutive   integer  optional    

Must be at least 1. Example: 22

color   string  optional    

Must not be greater than 7 characters. Example: gzmiyvd

description   string  optional    

Must not be greater than 1000 characters. Example: Accusantium harum mollitia modi deserunt aut ab.

Afficher un créneau

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/time-slots/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/time-slots/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/time-slots/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: dde66b0d-a033-40ab-88f4-bcc955c68cf5
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/time-slots/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du créneau. Example: 1

Mettre à jour un créneau

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/time-slots/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"code\": \"ngzmiyvdljnikhwa\",
    \"start_time\": \"18:47\",
    \"end_time\": \"18:47\",
    \"slot_type\": \"lab\",
    \"monday\": true,
    \"tuesday\": false,
    \"wednesday\": true,
    \"thursday\": false,
    \"friday\": false,
    \"saturday\": false,
    \"sunday\": false,
    \"is_schedulable\": true,
    \"is_active\": false,
    \"max_consecutive\": 79,
    \"color\": \"kcmyuwp\",
    \"description\": \"Qui commodi incidunt iure odit.\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/time-slots/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "code": "ngzmiyvdljnikhwa",
    "start_time": "18:47",
    "end_time": "18:47",
    "slot_type": "lab",
    "monday": true,
    "tuesday": false,
    "wednesday": true,
    "thursday": false,
    "friday": false,
    "saturday": false,
    "sunday": false,
    "is_schedulable": true,
    "is_active": false,
    "max_consecutive": 79,
    "color": "kcmyuwp",
    "description": "Qui commodi incidunt iure odit."
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/time-slots/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'code' => 'ngzmiyvdljnikhwa',
            'start_time' => '18:47',
            'end_time' => '18:47',
            'slot_type' => 'lab',
            'monday' => true,
            'tuesday' => false,
            'wednesday' => true,
            'thursday' => false,
            'friday' => false,
            'saturday' => false,
            'sunday' => false,
            'is_schedulable' => true,
            'is_active' => false,
            'max_consecutive' => 79,
            'color' => 'kcmyuwp',
            'description' => 'Qui commodi incidunt iure odit.',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/time-slots/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du créneau. Example: 1

Body Parameters

name   string  optional    

Must not be greater than 50 characters. Example: b

code   string  optional    

Must not be greater than 20 characters. Example: ngzmiyvdljnikhwa

start_time   string  optional    

Must be a valid date in the format H:i. Example: 18:47

end_time   string  optional    

Must be a valid date in the format H:i. Example: 18:47

slot_type   string  optional    

Example: lab

Must be one of:
  • class
  • break
  • lunch
  • activity
  • lab
  • tutorial
  • other
monday   boolean  optional    

Example: true

tuesday   boolean  optional    

Example: false

wednesday   boolean  optional    

Example: true

thursday   boolean  optional    

Example: false

friday   boolean  optional    

Example: false

saturday   boolean  optional    

Example: false

sunday   boolean  optional    

Example: false

is_schedulable   boolean  optional    

Example: true

is_active   boolean  optional    

Example: false

max_consecutive   integer  optional    

Must be at least 1. Example: 79

color   string  optional    

Must not be greater than 7 characters. Example: kcmyuwp

description   string  optional    

Must not be greater than 1000 characters. Example: Qui commodi incidunt iure odit.

Supprimer un créneau

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/time-slots/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/time-slots/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/time-slots/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/time-slots/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du créneau. Example: 1

Départements

API pour gérer les départements. Les départements regroupent les enseignants et cours par domaine.

Lister les départements

requires authentication

Récupère la liste des départements de l'organisation avec options de filtrage.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/departments?active_only=1&search=Informatique&per_page=15&page=1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/departments"
);

const params = {
    "active_only": "1",
    "search": "Informatique",
    "per_page": "15",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/departments';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'active_only' => '1',
            'search' => 'Informatique',
            'per_page' => '15',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": [
        {
            "id": 1,
            "name": "Informatique",
            "code": "INFO",
            "head": {
                "id": 2,
                "name": "Jean Dupont"
            },
            "teachers_count": 15,
            "courses_count": 25,
            "is_active": true
        }
    ],
    "links": {
        "first": "...",
        "last": "...",
        "prev": null,
        "next": "..."
    },
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 15,
        "total": 8
    }
}
 

Request   

GET api/v1/departments

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

active_only   boolean  optional    

Filtrer uniquement les départements actifs. Example: true

search   string  optional    

Rechercher par nom ou code. Example: Informatique

per_page   integer  optional    

Nombre de résultats par page. Example: 15

page   integer  optional    

Numéro de page. Example: 1

Options de sélection

requires authentication

Récupère une liste simplifiée des départements actifs pour alimenter des listes déroulantes.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/departments/options" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/departments/options"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/departments/options';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": [
        {
            "value": 1,
            "label": "Informatique",
            "code": "INFO",
            "color": "#3498db"
        },
        {
            "value": 2,
            "label": "Mathématiques",
            "code": "MATH",
            "color": "#e74c3c"
        }
    ]
}
 

Request   

GET api/v1/departments/options

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Afficher un département

requires authentication

Récupère les détails d'un département spécifique.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/departments/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/departments/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/departments/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": {
        "id": 1,
        "name": "Informatique",
        "code": "INFO",
        "description": "Département des sciences informatiques",
        "head": {
            "id": 2,
            "name": "Jean Dupont"
        },
        "teachers_count": 15,
        "courses_count": 25,
        "color": "#3498db",
        "is_active": true
    }
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Département non trouvé"
}
 

Request   

GET api/v1/departments/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du département. Example: 1

Créer un département

requires authentication

Crée un nouveau département dans l'organisation courante.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/departments" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Informatique\",
    \"code\": \"INFO\",
    \"description\": \"Eius et animi quos velit et.\",
    \"head_id\": 2,
    \"color\": \"#3498db\",
    \"is_active\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/departments"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Informatique",
    "code": "INFO",
    "description": "Eius et animi quos velit et.",
    "head_id": 2,
    "color": "#3498db",
    "is_active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/departments';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Informatique',
            'code' => 'INFO',
            'description' => 'Eius et animi quos velit et.',
            'head_id' => 2,
            'color' => '#3498db',
            'is_active' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Créé):


{
  "success": true,
  "message": "Département créé",
  "data": {"id": 1, "name": "Informatique", ...}
}
 

Example response (422, Validation échouée):


{"success": false, "message": "Erreurs de validation", "errors": {...}}
 

Request   

POST api/v1/departments

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Le nom du département. Example: Informatique

code   string  optional    

Code unique du département. Example: INFO

description   string  optional    

Description du département. Example: Eius et animi quos velit et.

head_id   integer  optional    

ID de l'enseignant responsable. Example: 2

color   string  optional    

Couleur (format hex). Example: #3498db

is_active   boolean  optional    

Département actif. Example: true

Modifier un département

requires authentication

Met à jour les informations d'un département existant.

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/departments/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Informatique\",
    \"code\": \"INFO\",
    \"description\": \"Eius et animi quos velit et.\",
    \"head_id\": 2,
    \"color\": \"#3498db\",
    \"is_active\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/departments/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Informatique",
    "code": "INFO",
    "description": "Eius et animi quos velit et.",
    "head_id": 2,
    "color": "#3498db",
    "is_active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/departments/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Informatique',
            'code' => 'INFO',
            'description' => 'Eius et animi quos velit et.',
            'head_id' => 2,
            'color' => '#3498db',
            'is_active' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "message": "Département mis à jour",
  "data": {"id": 1, "name": "Informatique", ...}
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Département non trouvé"
}
 

Example response (422, Validation échouée):


{"success": false, "message": "Erreurs de validation", "errors": {...}}
 

Request   

PUT api/v1/departments/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du département. Example: 1

Body Parameters

name   string  optional    

Le nom du département. Example: Informatique

code   string  optional    

Code unique du département. Example: INFO

description   string  optional    

Description du département. Example: Eius et animi quos velit et.

head_id   integer  optional    

ID de l'enseignant responsable. Example: 2

color   string  optional    

Couleur (format hex). Example: #3498db

is_active   boolean  optional    

Département actif. Example: true

Supprimer un département

requires authentication

Supprime un département (soft delete). Le département ne sera plus visible mais ses données historiques sont conservées.

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/departments/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/departments/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/departments/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "message": "Département supprimé"
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Département non trouvé"
}
 

Example response (409, Conflit):


{
    "success": false,
    "message": "Impossible de supprimer: le département a des enseignants ou cours associés"
}
 

Request   

DELETE api/v1/departments/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du département. Example: 1

Endpoints

GET api/v1/absences

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/absences" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/absences"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/absences';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 8607a259-aa03-4ffe-b647-f4f768bde13d
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/absences

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/absences

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/absences" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"resource_type\": \"architecto\",
    \"resource_id\": 16,
    \"start_date\": \"2026-04-05T18:47:37\",
    \"end_date\": \"2052-04-28\",
    \"is_full_day\": false,
    \"recurrence_pattern\": \"weekdays\",
    \"reason\": \"n\",
    \"notes\": \"g\",
    \"requires_substitution\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/absences"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "resource_type": "architecto",
    "resource_id": 16,
    "start_date": "2026-04-05T18:47:37",
    "end_date": "2052-04-28",
    "is_full_day": false,
    "recurrence_pattern": "weekdays",
    "reason": "n",
    "notes": "g",
    "requires_substitution": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/absences';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'resource_type' => 'architecto',
            'resource_id' => 16,
            'start_date' => '2026-04-05T18:47:37',
            'end_date' => '2052-04-28',
            'is_full_day' => false,
            'recurrence_pattern' => 'weekdays',
            'reason' => 'n',
            'notes' => 'g',
            'requires_substitution' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/absences

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

schedule_session_id   string  optional    

The id of an existing record in the schedule_sessions table.

resource_type   string     

Example: architecto

resource_id   integer     

Example: 16

type   string  optional    
start_date   string     

Le champ value doit être une date valide. Example: 2026-04-05T18:47:37

end_date   string     

Le champ value doit être une date valide. Le champ value doit être une date postérieure ou égale au start_date. Example: 2052-04-28

is_full_day   boolean  optional    

Example: false

start_time   string  optional    

This field is required when is_full_day is false.

end_time   string  optional    

This field is required when is_full_day is false.

recurrence_pattern   string  optional    

Example: weekdays

Must be one of:
  • daily
  • weekdays
  • specific_days
recurrence_days   object  optional    

This field is required when recurrence_pattern is specific_days.

reason   string  optional    

Le champ value ne peut pas avoir plus de 1000 caractères. Example: n

notes   string  optional    

Le champ value ne peut pas avoir plus de 2000 caractères. Example: g

requires_substitution   boolean  optional    

Example: true

GET api/v1/absences/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/absences/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/absences/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/absences/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 17838ff2-fafa-4d01-bc6f-f2182e576d88
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/absences/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the absence. Example: 16

PUT api/v1/absences/{id}

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/absences/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2026-04-05T18:47:37\",
    \"end_date\": \"2052-04-28\",
    \"is_full_day\": false,
    \"recurrence_pattern\": \"weekdays\",
    \"reason\": \"n\",
    \"notes\": \"g\",
    \"requires_substitution\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/absences/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start_date": "2026-04-05T18:47:37",
    "end_date": "2052-04-28",
    "is_full_day": false,
    "recurrence_pattern": "weekdays",
    "reason": "n",
    "notes": "g",
    "requires_substitution": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/absences/16';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'start_date' => '2026-04-05T18:47:37',
            'end_date' => '2052-04-28',
            'is_full_day' => false,
            'recurrence_pattern' => 'weekdays',
            'reason' => 'n',
            'notes' => 'g',
            'requires_substitution' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/absences/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the absence. Example: 16

Body Parameters

type   string  optional    
start_date   string  optional    

Le champ value doit être une date valide. Example: 2026-04-05T18:47:37

end_date   string  optional    

Le champ value doit être une date valide. Le champ value doit être une date postérieure ou égale au start_date. Example: 2052-04-28

is_full_day   boolean  optional    

Example: false

start_time   string  optional    

This field is required when is_full_day is false.

end_time   string  optional    

This field is required when is_full_day is false.

recurrence_pattern   string  optional    

Example: weekdays

Must be one of:
  • daily
  • weekdays
  • specific_days
recurrence_days   object  optional    
reason   string  optional    

Le champ value ne peut pas avoir plus de 1000 caractères. Example: n

notes   string  optional    

Le champ value ne peut pas avoir plus de 2000 caractères. Example: g

requires_substitution   boolean  optional    

Example: true

DELETE api/v1/absences/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/absences/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/absences/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/absences/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/absences/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the absence. Example: 16

POST api/v1/absences/{absence_id}/approve

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/absences/16/approve" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/absences/16/approve"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/absences/16/approve';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/absences/{absence_id}/approve

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

absence_id   integer     

The ID of the absence. Example: 16

POST api/v1/absences/{absence_id}/reject

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/absences/16/reject" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/absences/16/reject"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/absences/16/reject';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'reason' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/absences/{absence_id}/reject

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

absence_id   integer     

The ID of the absence. Example: 16

Body Parameters

reason   string     

Le champ value ne peut pas avoir plus de 1000 caractères. Example: b

POST api/v1/absences/{absence_id}/cancel

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/absences/16/cancel" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/absences/16/cancel"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/absences/16/cancel';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/absences/{absence_id}/cancel

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

absence_id   integer     

The ID of the absence. Example: 16

GET api/v1/absences/{absence_id}/affected-entries

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/absences/16/affected-entries" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/absences/16/affected-entries"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/absences/16/affected-entries';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: d80fc2be-42f6-4b78-809a-75dffa7cba23
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/absences/{absence_id}/affected-entries

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

absence_id   integer     

The ID of the absence. Example: 16

GET api/v1/absences/{absence_id}/substitutions

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/absences/16/substitutions" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/absences/16/substitutions"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/absences/16/substitutions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 4aa3c2b4-fb62-4aa2-b9cd-f177607d30d9
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/absences/{absence_id}/substitutions

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

absence_id   integer     

The ID of the absence. Example: 16

GET api/v1/substitutions

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/substitutions" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/substitutions"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/substitutions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: ddf5d4d9-df63-4763-8c6b-e8eff7921796
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/substitutions

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/substitutions/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/substitutions/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/substitutions/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/substitutions/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 98fe927d-8b40-460c-8140-4552ba659c79
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/substitutions/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the substitution. Example: 16

GET api/v1/substitutions/absence/{absence_id}/suggestions

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/substitutions/absence/16/suggestions" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/substitutions/absence/16/suggestions"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/substitutions/absence/16/suggestions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: f9d2f55d-76f7-4441-ba71-eebd1f3a9eca
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/substitutions/absence/{absence_id}/suggestions

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

absence_id   integer     

The ID of the absence. Example: 16

POST api/v1/substitutions/absence/{absence_id}/auto-assign

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/substitutions/absence/16/auto-assign" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/substitutions/absence/16/auto-assign"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/substitutions/absence/16/auto-assign';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/substitutions/absence/{absence_id}/auto-assign

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

absence_id   integer     

The ID of the absence. Example: 16

POST api/v1/substitutions/{substitution_id}/propose

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/substitutions/16/propose" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/substitutions/16/propose"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/substitutions/16/propose';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/substitutions/{substitution_id}/propose

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

substitution_id   integer     

The ID of the substitution. Example: 16

POST api/v1/substitutions/{substitution_id}/accept

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/substitutions/16/accept" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/substitutions/16/accept"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/substitutions/16/accept';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/substitutions/{substitution_id}/accept

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

substitution_id   integer     

The ID of the substitution. Example: 16

POST api/v1/substitutions/{substitution_id}/decline

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/substitutions/16/decline" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/substitutions/16/decline"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/substitutions/16/decline';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'reason' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/substitutions/{substitution_id}/decline

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

substitution_id   integer     

The ID of the substitution. Example: 16

Body Parameters

reason   string     

Le champ value ne peut pas avoir plus de 500 caractères. Example: b

POST api/v1/substitutions/{substitution_id}/confirm

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/substitutions/16/confirm" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/substitutions/16/confirm"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/substitutions/16/confirm';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/substitutions/{substitution_id}/confirm

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

substitution_id   integer     

The ID of the substitution. Example: 16

POST api/v1/substitutions/{substitution_id}/cancel

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/substitutions/16/cancel" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/substitutions/16/cancel"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/substitutions/16/cancel';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/substitutions/{substitution_id}/cancel

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

substitution_id   integer     

The ID of the substitution. Example: 16

Display a listing of accessibility profiles.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/accessibility/profiles?search=architecto&type=architecto&active=&has_mobility_needs=&per_page=16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/accessibility/profiles"
);

const params = {
    "search": "architecto",
    "type": "architecto",
    "active": "0",
    "has_mobility_needs": "0",
    "per_page": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/accessibility/profiles';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'search' => 'architecto',
            'type' => 'architecto',
            'active' => '0',
            'has_mobility_needs' => '0',
            'per_page' => '16',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 98407aff-5841-4508-9722-492b5ddd911e
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/accessibility/profiles

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

search   string  optional    

Filter by name or code. Example: architecto

type   string  optional    

Filter by profileable_type (teacher, group). Example: architecto

active   boolean  optional    

Filter by is_active status. Example: false

has_mobility_needs   boolean  optional    

Filter profiles with mobility needs. Example: false

per_page   integer  optional    

Number of results per page (default: 15). Example: 16

Display the specified accessibility profile.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/accessibility/profiles/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/accessibility/profiles/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/accessibility/profiles/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 95ffabfd-c02c-4c0e-8feb-6a0437702cfa
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/accessibility/profiles/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the profile. Example: 16

Store a newly created accessibility profile.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/accessibility/profiles" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"code\": \"n\",
    \"profileable_type\": \"Plugins\\\\Groups\\\\Models\\\\Group\",
    \"profileable_id\": 16,
    \"mobility_needs\": [
        \"cane\"
    ],
    \"mobility_time_buffer\": 22,
    \"sensory_needs\": [
        \"none\"
    ],
    \"accessible_room_required\": false,
    \"floor_preference\": \"low_floors\",
    \"accessible_entrance_required\": false,
    \"accessible_restroom_required\": false,
    \"special_seating\": \"g\",
    \"assistive_technology\": [
        \"z\"
    ],
    \"emergency_evacuation_plan\": \"m\",
    \"dietary_restrictions\": [
        \"i\"
    ],
    \"communication_preferences\": [
        \"y\"
    ],
    \"is_active\": true,
    \"valid_from\": \"2026-04-05T18:47:37\",
    \"valid_until\": \"2052-04-28\",
    \"notes\": \"n\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/accessibility/profiles"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "code": "n",
    "profileable_type": "Plugins\\Groups\\Models\\Group",
    "profileable_id": 16,
    "mobility_needs": [
        "cane"
    ],
    "mobility_time_buffer": 22,
    "sensory_needs": [
        "none"
    ],
    "accessible_room_required": false,
    "floor_preference": "low_floors",
    "accessible_entrance_required": false,
    "accessible_restroom_required": false,
    "special_seating": "g",
    "assistive_technology": [
        "z"
    ],
    "emergency_evacuation_plan": "m",
    "dietary_restrictions": [
        "i"
    ],
    "communication_preferences": [
        "y"
    ],
    "is_active": true,
    "valid_from": "2026-04-05T18:47:37",
    "valid_until": "2052-04-28",
    "notes": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/accessibility/profiles';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'code' => 'n',
            'profileable_type' => 'Plugins\\Groups\\Models\\Group',
            'profileable_id' => 16,
            'mobility_needs' => [
                'cane',
            ],
            'mobility_time_buffer' => 22,
            'sensory_needs' => [
                'none',
            ],
            'accessible_room_required' => false,
            'floor_preference' => 'low_floors',
            'accessible_entrance_required' => false,
            'accessible_restroom_required' => false,
            'special_seating' => 'g',
            'assistive_technology' => [
                'z',
            ],
            'emergency_evacuation_plan' => 'm',
            'dietary_restrictions' => [
                'i',
            ],
            'communication_preferences' => [
                'y',
            ],
            'is_active' => true,
            'valid_from' => '2026-04-05T18:47:37',
            'valid_until' => '2052-04-28',
            'notes' => 'n',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/accessibility/profiles

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Le champ value ne peut pas avoir plus de 255 caractères. Example: b

code   string  optional    

Le champ value ne peut pas avoir plus de 50 caractères. Example: n

profileable_type   string     

Example: Plugins\Groups\Models\Group

Must be one of:
  • Plugins\Teachers\Models\Teacher
  • Plugins\Groups\Models\Group
profileable_id   integer     

Example: 16

mobility_needs   string[]  optional    
Must be one of:
  • wheelchair
  • motorized_wheelchair
  • walker
  • crutches
  • cane
  • service_animal
  • none
mobility_time_buffer   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 60. Example: 22

sensory_needs   string[]  optional    
Must be one of:
  • visual_impairment
  • blind
  • hearing_impairment
  • deaf
  • cognitive
  • autism_spectrum
  • none
accessible_room_required   boolean  optional    

Example: false

floor_preference   string  optional    

Example: low_floors

Must be one of:
  • ground_only
  • elevator_required
  • low_floors
  • any
accessible_entrance_required   boolean  optional    

Example: false

accessible_restroom_required   boolean  optional    

Example: false

special_seating   string  optional    

Le champ value ne peut pas avoir plus de 500 caractères. Example: g

assistive_technology   string[]  optional    

Le champ value ne peut pas avoir plus de 255 caractères.

emergency_evacuation_plan   string  optional    

Le champ value ne peut pas avoir plus de 2000 caractères. Example: m

dietary_restrictions   string[]  optional    

Le champ value ne peut pas avoir plus de 255 caractères.

communication_preferences   string[]  optional    

Le champ value ne peut pas avoir plus de 255 caractères.

is_active   boolean  optional    

Example: true

valid_from   string  optional    

Le champ value doit être une date valide. Example: 2026-04-05T18:47:37

valid_until   string  optional    

Le champ value doit être une date valide. Le champ value doit être une date postérieure ou égale au valid_from. Example: 2052-04-28

notes   string  optional    

Le champ value ne peut pas avoir plus de 2000 caractères. Example: n

Update the specified accessibility profile.

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/accessibility/profiles/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"code\": \"n\",
    \"mobility_needs\": [
        \"crutches\"
    ],
    \"mobility_time_buffer\": 7,
    \"sensory_needs\": [
        \"none\"
    ],
    \"accessible_room_required\": false,
    \"floor_preference\": \"ground_only\",
    \"accessible_entrance_required\": false,
    \"accessible_restroom_required\": true,
    \"special_seating\": \"z\",
    \"assistive_technology\": [
        \"m\"
    ],
    \"emergency_evacuation_plan\": \"i\",
    \"dietary_restrictions\": [
        \"y\"
    ],
    \"communication_preferences\": [
        \"v\"
    ],
    \"is_active\": false,
    \"valid_from\": \"2026-04-05T18:47:37\",
    \"valid_until\": \"2052-04-28\",
    \"notes\": \"n\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/accessibility/profiles/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "code": "n",
    "mobility_needs": [
        "crutches"
    ],
    "mobility_time_buffer": 7,
    "sensory_needs": [
        "none"
    ],
    "accessible_room_required": false,
    "floor_preference": "ground_only",
    "accessible_entrance_required": false,
    "accessible_restroom_required": true,
    "special_seating": "z",
    "assistive_technology": [
        "m"
    ],
    "emergency_evacuation_plan": "i",
    "dietary_restrictions": [
        "y"
    ],
    "communication_preferences": [
        "v"
    ],
    "is_active": false,
    "valid_from": "2026-04-05T18:47:37",
    "valid_until": "2052-04-28",
    "notes": "n"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/accessibility/profiles/16';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'code' => 'n',
            'mobility_needs' => [
                'crutches',
            ],
            'mobility_time_buffer' => 7,
            'sensory_needs' => [
                'none',
            ],
            'accessible_room_required' => false,
            'floor_preference' => 'ground_only',
            'accessible_entrance_required' => false,
            'accessible_restroom_required' => true,
            'special_seating' => 'z',
            'assistive_technology' => [
                'm',
            ],
            'emergency_evacuation_plan' => 'i',
            'dietary_restrictions' => [
                'y',
            ],
            'communication_preferences' => [
                'v',
            ],
            'is_active' => false,
            'valid_from' => '2026-04-05T18:47:37',
            'valid_until' => '2052-04-28',
            'notes' => 'n',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/accessibility/profiles/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the profile. Example: 16

Body Parameters

name   string  optional    

Le champ value ne peut pas avoir plus de 255 caractères. Example: b

code   string  optional    

Le champ value ne peut pas avoir plus de 50 caractères. Example: n

profileable_type   string  optional    
profileable_id   string  optional    
mobility_needs   string[]  optional    
Must be one of:
  • wheelchair
  • motorized_wheelchair
  • walker
  • crutches
  • cane
  • service_animal
  • none
mobility_time_buffer   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 60. Example: 7

sensory_needs   string[]  optional    
Must be one of:
  • visual_impairment
  • blind
  • hearing_impairment
  • deaf
  • cognitive
  • autism_spectrum
  • none
accessible_room_required   boolean  optional    

Example: false

floor_preference   string  optional    

Example: ground_only

Must be one of:
  • ground_only
  • elevator_required
  • low_floors
  • any
accessible_entrance_required   boolean  optional    

Example: false

accessible_restroom_required   boolean  optional    

Example: true

special_seating   string  optional    

Le champ value ne peut pas avoir plus de 500 caractères. Example: z

assistive_technology   string[]  optional    

Le champ value ne peut pas avoir plus de 255 caractères.

emergency_evacuation_plan   string  optional    

Le champ value ne peut pas avoir plus de 2000 caractères. Example: i

dietary_restrictions   string[]  optional    

Le champ value ne peut pas avoir plus de 255 caractères.

communication_preferences   string[]  optional    

Le champ value ne peut pas avoir plus de 255 caractères.

is_active   boolean  optional    

Example: false

valid_from   string  optional    

Le champ value doit être une date valide. Example: 2026-04-05T18:47:37

valid_until   string  optional    

Le champ value doit être une date valide. Le champ value doit être une date postérieure ou égale au valid_from. Example: 2052-04-28

notes   string  optional    

Le champ value ne peut pas avoir plus de 2000 caractères. Example: n

Remove the specified accessibility profile.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/accessibility/profiles/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/accessibility/profiles/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/accessibility/profiles/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/accessibility/profiles/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the profile. Example: 16

Get all accessible rooms for the organization.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/accessibility/rooms/accessible?profile_id=16&floor_preference=architecto&ranked=" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/accessibility/rooms/accessible"
);

const params = {
    "profile_id": "16",
    "floor_preference": "architecto",
    "ranked": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/accessibility/rooms/accessible';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'profile_id' => '16',
            'floor_preference' => 'architecto',
            'ranked' => '0',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 79de6dbb-caec-435d-8cff-8ddc963bdfcf
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/accessibility/rooms/accessible

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

profile_id   integer  optional    

Optional profile ID to filter rooms compatible with specific profile. Example: 16

floor_preference   string  optional    

Filter by floor preference compatibility. Example: architecto

ranked   boolean  optional    

Return rooms ranked by accessibility score. Example: false

Check if a specific room is accessible for a profile.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/accessibility/rooms/1/check?profile_id=16&teacher_id=16&group_id=16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/accessibility/rooms/1/check"
);

const params = {
    "profile_id": "16",
    "teacher_id": "16",
    "group_id": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/accessibility/rooms/1/check';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'profile_id' => '16',
            'teacher_id' => '16',
            'group_id' => '16',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 598f7f33-76e5-4f0e-9bd1-357d61ace82b
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/accessibility/rooms/{room_id}/check

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   integer     

The ID of the room. Example: 1

Query Parameters

profile_id   integer  optional    

Profile ID to check compatibility. Example: 16

teacher_id   integer  optional    

Teacher ID to check compatibility. Example: 16

group_id   integer  optional    

Group ID to check compatibility. Example: 16

Validate accessibility compliance for a schedule session.

requires authentication

Returns a detailed report of violations and warnings.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/accessibility/validate-schedule/1?include_warnings=&detailed=" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/accessibility/validate-schedule/1"
);

const params = {
    "include_warnings": "0",
    "detailed": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/accessibility/validate-schedule/1';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'include_warnings' => '0',
            'detailed' => '0',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/accessibility/validate-schedule/{session_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

Query Parameters

include_warnings   boolean  optional    

Include warnings in response (default: true). Example: false

detailed   boolean  optional    

Include detailed violation information (default: true). Example: false

Get comprehensive accessibility compliance report for the organization.

requires authentication

Includes room accessibility, profile coverage, and compliance metrics.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/accessibility/compliance-report" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/accessibility/compliance-report"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/accessibility/compliance-report';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 387aea13-3910-49c0-bbcf-4371f2ccafe6
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/accessibility/compliance-report

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get accessibility statistics for the organization.

requires authentication

Lighter endpoint for dashboard widgets.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/accessibility/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/accessibility/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/accessibility/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: d493a52a-b470-43d3-bc81-7ed0c882989f
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/accessibility/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/ai/chat

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/ai/chat" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"message\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/ai/chat"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "message": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/chat';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'message' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/ai/chat

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

message   string     

Le champ value ne peut pas avoir plus de 2000 caractères. Example: b

conversation_id   string  optional    

The id of an existing record in the ai_conversations table.

POST api/ai/ask

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/ai/ask" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"question\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/ai/ask"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "question": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/ask';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'question' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/ai/ask

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

question   string     

Le champ value ne peut pas avoir plus de 2000 caractères. Example: b

context   object  optional    

GET api/ai/conversations

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/ai/conversations" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/conversations"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/conversations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 54f98964-25e3-4ec7-aa06-1d5c37ba419e
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/ai/conversations

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/ai/conversations

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/ai/conversations" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
const url = new URL(
    "https://creation_horaire.test/api/ai/conversations"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/conversations';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/ai/conversations

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

schedule_session_id   string  optional    

The id of an existing record in the schedule_sessions table.

GET api/ai/conversations/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/ai/conversations/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/conversations/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/conversations/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: c14208fb-64fa-4989-994a-40dc8f3591fc
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/ai/conversations/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the conversation. Example: 16

POST api/ai/conversations/{conversation_id}/message

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/ai/conversations/16/message" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"message\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/ai/conversations/16/message"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "message": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/conversations/16/message';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'message' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/ai/conversations/{conversation_id}/message

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

conversation_id   integer     

The ID of the conversation. Example: 16

Body Parameters

message   string     

Le champ value ne peut pas avoir plus de 2000 caractères. Example: b

DELETE api/ai/conversations/{conversation_id}

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/ai/conversations/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/conversations/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/conversations/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/ai/conversations/{conversation_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

conversation_id   integer     

The ID of the conversation. Example: 16

POST api/ai/analyze/{session_id}

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/ai/analyze/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/analyze/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/analyze/1';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/ai/analyze/{session_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

GET api/ai/analyze/{session_id}/quality

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/ai/analyze/1/quality" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/analyze/1/quality"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/analyze/1/quality';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: e7cddc33-2fe9-445d-8860-9bbda2cb62ad
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/ai/analyze/{session_id}/quality

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

GET api/ai/analyze/{session_id}/workload

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/ai/analyze/1/workload" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/analyze/1/workload"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/analyze/1/workload';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 26251fe2-bbec-43dd-9a2f-350157733089
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/ai/analyze/{session_id}/workload

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

GET api/ai/analyze/{session_id}/conflicts

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/ai/analyze/1/conflicts" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/analyze/1/conflicts"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/analyze/1/conflicts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 4341feb2-1fca-412b-8462-ab540e41f5c8
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/ai/analyze/{session_id}/conflicts

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

GET api/ai/suggestions/{session_id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/ai/suggestions/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/suggestions/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/suggestions/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 67936819-8807-4353-9bf9-576bfde60ad9
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/ai/suggestions/{session_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

POST api/ai/suggestions/{suggestion_id}/accept

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/ai/suggestions/16/accept" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/suggestions/16/accept"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/suggestions/16/accept';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/ai/suggestions/{suggestion_id}/accept

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

suggestion_id   integer     

The ID of the suggestion. Example: 16

POST api/ai/suggestions/{suggestion_id}/reject

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/ai/suggestions/16/reject" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/ai/suggestions/16/reject"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/suggestions/16/reject';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'reason' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/ai/suggestions/{suggestion_id}/reject

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

suggestion_id   integer     

The ID of the suggestion. Example: 16

Body Parameters

reason   string  optional    

Le champ value ne peut pas avoir plus de 500 caractères. Example: b

POST api/ai/suggestions/{suggestion_id}/apply

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/ai/suggestions/16/apply" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/suggestions/16/apply"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/suggestions/16/apply';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/ai/suggestions/{suggestion_id}/apply

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

suggestion_id   integer     

The ID of the suggestion. Example: 16

POST api/ai/resolve-conflict

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/ai/resolve-conflict" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"conflict\": []
}"
const url = new URL(
    "https://creation_horaire.test/api/ai/resolve-conflict"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "conflict": []
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/resolve-conflict';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'conflict' => [],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/ai/resolve-conflict

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

conflict   object     

GET api/ai/insights

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/ai/insights" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/insights"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/insights';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: e058c232-f3b1-4419-a63e-c57043ad9cef
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/ai/insights

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/ai/usage

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/ai/usage" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/usage"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/usage';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: fb9a74f4-97fc-40be-a61e-f6f5a994f098
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/ai/usage

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/ai/status

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/ai/status" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/ai/status"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/ai/status';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: ddfd06bf-bb60-4599-891e-2fa0e9bce24c
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/ai/status

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get paginated audit logs.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/audit-logs" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/audit-logs"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/audit-logs';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 1a694e49-4ef0-451c-b83a-adafed7db349
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/audit-logs

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get audit statistics.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/audit-logs/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/audit-logs/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/audit-logs/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 868263c5-38ae-4fcc-b2be-9f0a7264124a
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/audit-logs/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get recent activity.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/audit-logs/recent" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/audit-logs/recent"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/audit-logs/recent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 33c4493b-2d3c-4bc6-9772-234714830ba5
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/audit-logs/recent

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/audit-logs/search" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"term\": \"bngz\"
}"
const url = new URL(
    "https://creation_horaire.test/api/audit-logs/search"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "term": "bngz"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/audit-logs/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'term' => 'bngz',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: f854f23d-5ada-4892-b359-cd071c71506d
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Export audit logs.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/audit-logs/export" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/audit-logs/export"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/audit-logs/export';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: bab59e00-b7dd-430b-bf79-7e1627fa9199
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/audit-logs/export

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get audit logs for a specific entity.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/audit-logs/entity" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"model_type\": \"architecto\",
    \"model_id\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/audit-logs/entity"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "model_type": "architecto",
    "model_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/audit-logs/entity';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'model_type' => 'architecto',
            'model_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 6a33633f-059d-4060-a532-29d1b7c3df24
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/audit-logs/entity

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

model_type   string     

Example: architecto

model_id   integer     

Example: 16

Get a single audit log entry.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/audit-logs/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/audit-logs/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/audit-logs/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 7f7f6e8f-c6cf-4917-841d-2bc727ea4fd8
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/audit-logs/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the audit log. Example: architecto

List all automation rules for the organization

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/automation-rules" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 7ce4e2d2-0f10-4f3e-9c22-e96709cc376b
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/automation-rules

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Create a new automation rule

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/automation-rules" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Et animi quos velit et fugiat.\",
    \"trigger_type\": \"shift_unfilled\",
    \"condition_logic\": \"or\",
    \"actions\": [
        {
            \"type\": \"log_event\"
        }
    ],
    \"priority\": 1,
    \"stop_on_first_match\": true,
    \"schedule\": {
        \"cron_expression\": \"architecto\",
        \"timezone\": \"Asia\\/Ulaanbaatar\"
    },
    \"conditions\": [
        {
            \"field\": \"architecto\",
            \"operator\": \"greater_than\"
        }
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "description": "Et animi quos velit et fugiat.",
    "trigger_type": "shift_unfilled",
    "condition_logic": "or",
    "actions": [
        {
            "type": "log_event"
        }
    ],
    "priority": 1,
    "stop_on_first_match": true,
    "schedule": {
        "cron_expression": "architecto",
        "timezone": "Asia\/Ulaanbaatar"
    },
    "conditions": [
        {
            "field": "architecto",
            "operator": "greater_than"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'description' => 'Et animi quos velit et fugiat.',
            'trigger_type' => 'shift_unfilled',
            'condition_logic' => 'or',
            'actions' => [
                [
                    'type' => 'log_event',
                ],
            ],
            'priority' => 1,
            'stop_on_first_match' => true,
            'schedule' => [
                'cron_expression' => 'architecto',
                'timezone' => 'Asia/Ulaanbaatar',
            ],
            'conditions' => [
                [
                    'field' => 'architecto',
                    'operator' => 'greater_than',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/automation-rules

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Le champ value ne peut pas avoir plus de 255 caractères. Example: b

description   string  optional    

Le champ value ne peut pas avoir plus de 1000 caractères. Example: Et animi quos velit et fugiat.

trigger_type   string     

Example: shift_unfilled

Must be one of:
  • schedule_created
  • schedule_updated
  • schedule_deleted
  • schedule_published
  • absence_created
  • absence_approved
  • request_submitted
  • request_approved
  • request_rejected
  • shift_unfilled
  • time_based
  • manual
trigger_config   object  optional    
conditions   object[]  optional    

Le champ value ne peut pas avoir plus de 20 éléments.

field   string  optional    

This field is required when conditions is present. Example: architecto

operator   string  optional    

This field is required when conditions is present. Example: greater_than

Must be one of:
  • equals
  • not_equals
  • greater_than
  • less_than
  • greater_or_equal
  • less_or_equal
  • contains
  • not_contains
  • starts_with
  • ends_with
  • in
  • not_in
  • is_null
  • is_not_null
  • between
value   string  optional    
condition_logic   string  optional    

Example: or

Must be one of:
  • and
  • or
actions   object[]     

Le champ value doit avoir au moins 1 éléments. Le champ value ne peut pas avoir plus de 10 éléments.

type   string     

Example: log_event

Must be one of:
  • send_notification
  • send_email
  • create_open_shift
  • assign_teacher
  • update_status
  • create_request
  • approve_request
  • credit_hour_bank
  • debit_hour_bank
  • webhook
  • log_event
config   object  optional    
priority   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 1000. Example: 1

stop_on_first_match   boolean  optional    

Example: true

schedule   object  optional    

This field is required when trigger_type is time_based.

cron_expression   string  optional    

This field is required when schedule is present. Example: architecto

timezone   string  optional    

Must be a valid time zone, such as Africa/Accra. Example: Asia/Ulaanbaatar

Get statistics

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/automation-rules/stats" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules/stats"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules/stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 041ea56f-676c-4b24-89cd-ec08e45b2c85
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/automation-rules/stats

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get available triggers

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/automation-rules/triggers" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules/triggers"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules/triggers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 5a5a615c-41cd-4c99-ada4-b00a44cfcb17
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/automation-rules/triggers

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Show a specific automation rule

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/automation-rules/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 0ff4b06b-4d0f-4c35-8b7c-aa7519fe937c
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/automation-rules/{automationRule_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

automationRule_id   integer     

The ID of the automationRule. Example: 16

Update an automation rule

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/automation-rules/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Et animi quos velit et fugiat.\",
    \"condition_logic\": \"or\",
    \"priority\": 1,
    \"stop_on_first_match\": false,
    \"schedule\": {
        \"cron_expression\": \"architecto\",
        \"timezone\": \"Asia\\/Ulaanbaatar\"
    },
    \"conditions\": [
        {
            \"field\": \"architecto\",
            \"operator\": \"not_in\"
        }
    ],
    \"actions\": [
        {
            \"type\": \"create_request\"
        }
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "description": "Et animi quos velit et fugiat.",
    "condition_logic": "or",
    "priority": 1,
    "stop_on_first_match": false,
    "schedule": {
        "cron_expression": "architecto",
        "timezone": "Asia\/Ulaanbaatar"
    },
    "conditions": [
        {
            "field": "architecto",
            "operator": "not_in"
        }
    ],
    "actions": [
        {
            "type": "create_request"
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules/16';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'description' => 'Et animi quos velit et fugiat.',
            'condition_logic' => 'or',
            'priority' => 1,
            'stop_on_first_match' => false,
            'schedule' => [
                'cron_expression' => 'architecto',
                'timezone' => 'Asia/Ulaanbaatar',
            ],
            'conditions' => [
                [
                    'field' => 'architecto',
                    'operator' => 'not_in',
                ],
            ],
            'actions' => [
                [
                    'type' => 'create_request',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/automation-rules/{automationRule_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

automationRule_id   integer     

The ID of the automationRule. Example: 16

Body Parameters

name   string  optional    

Le champ value ne peut pas avoir plus de 255 caractères. Example: b

description   string  optional    

Le champ value ne peut pas avoir plus de 1000 caractères. Example: Et animi quos velit et fugiat.

trigger_config   object  optional    
conditions   object[]  optional    

Le champ value ne peut pas avoir plus de 20 éléments.

field   string  optional    

This field is required when conditions is present. Example: architecto

operator   string  optional    

This field is required when conditions is present. Example: not_in

Must be one of:
  • equals
  • not_equals
  • greater_than
  • less_than
  • greater_or_equal
  • less_or_equal
  • contains
  • not_contains
  • starts_with
  • ends_with
  • in
  • not_in
  • is_null
  • is_not_null
  • between
value   string  optional    
condition_logic   string  optional    

Example: or

Must be one of:
  • and
  • or
actions   object[]  optional    

Le champ value doit avoir au moins 1 éléments. Le champ value ne peut pas avoir plus de 10 éléments.

type   string  optional    

This field is required when actions is present. Example: create_request

Must be one of:
  • send_notification
  • send_email
  • create_open_shift
  • assign_teacher
  • update_status
  • create_request
  • approve_request
  • credit_hour_bank
  • debit_hour_bank
  • webhook
  • log_event
config   object  optional    
priority   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 1000. Example: 1

stop_on_first_match   boolean  optional    

Example: false

schedule   object  optional    
cron_expression   string  optional    

This field is required when schedule is present. Example: architecto

timezone   string  optional    

Must be a valid time zone, such as Africa/Accra. Example: Asia/Ulaanbaatar

Delete an automation rule

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/automation-rules/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/automation-rules/{automationRule_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

automationRule_id   integer     

The ID of the automationRule. Example: 16

Activate an automation rule

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/automation-rules/16/activate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules/16/activate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules/16/activate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/automation-rules/{automationRule_id}/activate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

automationRule_id   integer     

The ID of the automationRule. Example: 16

Pause an automation rule

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/automation-rules/16/pause" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules/16/pause"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules/16/pause';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/automation-rules/{automationRule_id}/pause

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

automationRule_id   integer     

The ID of the automationRule. Example: 16

Execute an automation rule manually

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/automation-rules/16/execute" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules/16/execute"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules/16/execute';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/automation-rules/{automationRule_id}/execute

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

automationRule_id   integer     

The ID of the automationRule. Example: 16

Get executions for a rule

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/automation-rules/16/executions" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules/16/executions"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules/16/executions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: c0752b1d-a42a-4ef7-b99e-ec9d7fc35a84
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/automation-rules/{automationRule_id}/executions

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

automationRule_id   integer     

The ID of the automationRule. Example: 16

Duplicate an automation rule

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/automation-rules/16/duplicate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-rules/16/duplicate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-rules/16/duplicate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/automation-rules/{automationRule_id}/duplicate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

automationRule_id   integer     

The ID of the automationRule. Example: 16

List all executions for the organization

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/automation-executions" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-executions"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-executions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 5ae40842-7c44-4254-aa4b-3783d92e4dbd
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/automation-executions

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get pending executions

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/automation-executions/pending" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-executions/pending"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-executions/pending';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 4d1070f8-18c6-463a-a03b-b879d30d31fb
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/automation-executions/pending

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get failed executions that can be retried

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/automation-executions/retryable" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-executions/retryable"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-executions/retryable';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 2f9ccc7d-bc9b-4dce-8859-4b01c18174b0
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/automation-executions/retryable

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Show a specific execution

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/automation-executions/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-executions/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-executions/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 327c50ea-c229-4272-9711-d20abaae0ea6
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/automation-executions/{automationExecution_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

automationExecution_id   integer     

The ID of the automationExecution. Example: 16

Retry a failed execution

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/automation-executions/16/retry" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/automation-executions/16/retry"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/automation-executions/16/retry';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/automation-executions/{automationExecution_id}/retry

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

automationExecution_id   integer     

The ID of the automationExecution. Example: 16

Get current subscription.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/billing/subscription" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/subscription"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/subscription';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: b54ccb8e-607a-4343-8802-9a3d52b9cfa3
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/billing/subscription

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Subscribe to a plan.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/billing/subscribe" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"price_id\": \"architecto\",
    \"payment_method_id\": \"architecto\",
    \"trial_days\": 22
}"
const url = new URL(
    "https://creation_horaire.test/api/billing/subscribe"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "price_id": "architecto",
    "payment_method_id": "architecto",
    "trial_days": 22
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/subscribe';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'price_id' => 'architecto',
            'payment_method_id' => 'architecto',
            'trial_days' => 22,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/billing/subscribe

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

price_id   string     

Example: architecto

payment_method_id   string  optional    

Example: architecto

trial_days   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 365. Example: 22

Change subscription plan.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/billing/change-plan" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"price_id\": \"architecto\",
    \"immediately\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/billing/change-plan"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "price_id": "architecto",
    "immediately": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/change-plan';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'price_id' => 'architecto',
            'immediately' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/billing/change-plan

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

price_id   string     

Example: architecto

immediately   boolean  optional    

Example: true

Cancel subscription.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/billing/cancel" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"immediately\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/billing/cancel"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "immediately": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/cancel';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'immediately' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/billing/cancel

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

immediately   boolean  optional    

Example: true

Resume cancelled subscription.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/billing/resume" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/resume"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/resume';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/billing/resume

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get payment methods.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/billing/payment-methods" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/payment-methods"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/payment-methods';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 9a72b45a-99cc-48ec-b9dd-99552288193d
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/billing/payment-methods

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Add payment method.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/billing/payment-methods" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"payment_method_id\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/billing/payment-methods"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "payment_method_id": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/payment-methods';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'payment_method_id' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/billing/payment-methods

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

payment_method_id   string     

Example: architecto

Delete payment method.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/billing/payment-methods/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/payment-methods/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/payment-methods/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/billing/payment-methods/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the payment method. Example: architecto

Set default payment method.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/billing/payment-methods/architecto/default" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/payment-methods/architecto/default"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/payment-methods/architecto/default';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/billing/payment-methods/{id}/default

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the payment method. Example: architecto

Create setup intent.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/billing/setup-intent" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/setup-intent"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/setup-intent';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: cc5e65db-2f02-4d11-891d-6c8440dc948e
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/billing/setup-intent

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get invoices.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/billing/invoices" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/invoices"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/invoices';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a3b11e57-36a3-47b7-b2e0-b2facf445037
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/billing/invoices

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get single invoice.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/billing/invoices/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/invoices/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/invoices/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 92485331-89a7-4e39-bf8a-dc7a6e874329
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/billing/invoices/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

Download invoice.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/billing/invoices/architecto/download" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/invoices/architecto/download"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/invoices/architecto/download';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: afd71df0-6def-4075-96b9-a5d3156d1c35
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/billing/invoices/{id}/download

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

Get upcoming invoice.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/billing/upcoming-invoice" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/upcoming-invoice"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/upcoming-invoice';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 6830d32e-d3dc-44ca-bb82-23856fb3d6ac
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/billing/upcoming-invoice

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get available plans.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/billing/plans" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/plans"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/plans';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: fffd77a7-e6ed-4262-9a09-5d14a821d003
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/billing/plans

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Validate promo code.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/billing/promo-code/validate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/billing/promo-code/validate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/promo-code/validate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'code' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/billing/promo-code/validate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Example: architecto

Apply promo code.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/billing/promo-code/apply" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/billing/promo-code/apply"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/promo-code/apply';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'code' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/billing/promo-code/apply

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Example: architecto

Get billing portal URL.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/billing/portal-url" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/portal-url"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/portal-url';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 6fdf8bba-ce9e-4cb7-864f-28117c994d44
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/billing/portal-url

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get usage for a metric.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/billing/usage/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/billing/usage/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/billing/usage/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a69f4275-0639-48f9-95ab-e208ceca0126
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/billing/usage/{metric}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

metric   string     

Example: architecto

GET api/v1/calendar/day-types

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/day-types" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/day-types"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/day-types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 744a6278-59b2-4322-a43c-05a8cbbc8d18
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/day-types

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/calendar/day-types/all

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/day-types/all" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/day-types/all"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/day-types/all';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 7ec16574-05a1-485b-b4f2-e48646e40e86
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/day-types/all

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/calendar/day-types/initialize

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/calendar/day-types/initialize" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/day-types/initialize"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/day-types/initialize';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/calendar/day-types/initialize

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/calendar/day-types/{dayType_id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/day-types/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/day-types/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/day-types/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 91c46cdb-174c-422b-8b5d-4a0b3abf3c0d
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/day-types/{dayType_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dayType_id   integer     

The ID of the dayType. Example: 1

DELETE api/v1/calendar/day-types/{dayType_id}

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/calendar/day-types/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/day-types/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/day-types/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/calendar/day-types/{dayType_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dayType_id   integer     

The ID of the dayType. Example: 1

GET api/v1/calendar/entries

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/entries" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/entries"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/entries';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: fd08e412-cca8-465d-bae2-7b2de770e806
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/entries

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/calendar/entries/bulk

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/calendar/entries/bulk" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"day_type_id\": \"architecto\",
    \"dates\": [
        \"2026-04-05T18:47:38\"
    ],
    \"title\": \"n\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/entries/bulk"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "day_type_id": "architecto",
    "dates": [
        "2026-04-05T18:47:38"
    ],
    "title": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/entries/bulk';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'day_type_id' => 'architecto',
            'dates' => [
                '2026-04-05T18:47:38',
            ],
            'title' => 'n',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/calendar/entries/bulk

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

day_type_id   string     

The id of an existing record in the calendar_day_types table. Example: architecto

dates   string[]     

Le champ value doit être une date valide.

title   string  optional    

Le champ value ne peut pas avoir plus de 255 caractères. Example: n

DELETE api/v1/calendar/entries/bulk

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/calendar/entries/bulk" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"dates\": [
        \"2026-04-05T18:47:38\"
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/entries/bulk"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "dates": [
        "2026-04-05T18:47:38"
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/entries/bulk';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'dates' => [
                '2026-04-05T18:47:38',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/calendar/entries/bulk

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

dates   string[]     

Le champ value doit être une date valide.

GET api/v1/calendar/entries/{entry_id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/entries/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/entries/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/entries/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 4c1bf889-07f2-4de0-bf69-79216eabebef
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/entries/{entry_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry_id   integer     

The ID of the entry. Example: 1

DELETE api/v1/calendar/entries/{entry_id}

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/calendar/entries/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/entries/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/entries/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/calendar/entries/{entry_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry_id   integer     

The ID of the entry. Example: 1

GET api/v1/calendar/month

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/month" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/month"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/month';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 1d8b2cc1-1597-422c-a61e-856075d9d379
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/month

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/calendar/year

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/year" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/year"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/year';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 40f48e13-02cb-4c40-a3b7-7b9a989902c1
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/year

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/calendar/check-date

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/check-date" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date\": \"2026-04-05T18:47:38\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/check-date"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "date": "2026-04-05T18:47:38"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/check-date';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'date' => '2026-04-05T18:47:38',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: fb65c778-45e6-4a8e-94eb-71673e366034
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/check-date

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

date   string     

Le champ value doit être une date valide. Example: 2026-04-05T18:47:38

GET api/v1/calendar/workdays-count

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/workdays-count" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2026-04-05T18:47:38\",
    \"end_date\": \"2052-04-28\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/workdays-count"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start_date": "2026-04-05T18:47:38",
    "end_date": "2052-04-28"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/workdays-count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'start_date' => '2026-04-05T18:47:38',
            'end_date' => '2052-04-28',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 45a063f1-6b1a-4117-8994-80046e79f478
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/workdays-count

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

start_date   string     

Le champ value doit être une date valide. Example: 2026-04-05T18:47:38

end_date   string     

Le champ value doit être une date valide. Le champ value doit être une date postérieure ou égale au start_date. Example: 2052-04-28

GET api/v1/calendar/recurring

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/recurring" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/recurring"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/recurring';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: b12be2e7-0ccb-40e8-887d-868cf264c657
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/recurring

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/calendar/recurring

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/calendar/recurring" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"day_type_id\": \"architecto\",
    \"title\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"frequency\": \"yearly\",
    \"interval\": 1,
    \"days_of_week\": [
        1
    ],
    \"day_of_month\": 5,
    \"month_of_year\": 4,
    \"week_of_month\": 2,
    \"starts_at\": \"2026-04-05T18:47:38\",
    \"ends_at\": \"2052-04-28\",
    \"occurrences\": 22
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/recurring"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "day_type_id": "architecto",
    "title": "n",
    "description": "Eius et animi quos velit et.",
    "frequency": "yearly",
    "interval": 1,
    "days_of_week": [
        1
    ],
    "day_of_month": 5,
    "month_of_year": 4,
    "week_of_month": 2,
    "starts_at": "2026-04-05T18:47:38",
    "ends_at": "2052-04-28",
    "occurrences": 22
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/recurring';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'day_type_id' => 'architecto',
            'title' => 'n',
            'description' => 'Eius et animi quos velit et.',
            'frequency' => 'yearly',
            'interval' => 1,
            'days_of_week' => [
                1,
            ],
            'day_of_month' => 5,
            'month_of_year' => 4,
            'week_of_month' => 2,
            'starts_at' => '2026-04-05T18:47:38',
            'ends_at' => '2052-04-28',
            'occurrences' => 22,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/calendar/recurring

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

day_type_id   string     

The id of an existing record in the calendar_day_types table. Example: architecto

title   string     

Le champ value ne peut pas avoir plus de 255 caractères. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

frequency   string     

Example: yearly

Must be one of:
  • daily
  • weekly
  • monthly
  • yearly
interval   integer  optional    

Le champ value doit être d'au moins 1. Le champ value ne peut pas être supérieur à 365. Example: 1

days_of_week   integer[]  optional    

Le champ value doit être d'au moins 1. Le champ value ne peut pas être supérieur à 7.

day_of_month   integer  optional    

Le champ value doit être d'au moins 1. Le champ value ne peut pas être supérieur à 31. Example: 5

month_of_year   integer  optional    

Le champ value doit être d'au moins 1. Le champ value ne peut pas être supérieur à 12. Example: 4

week_of_month   integer  optional    

Le champ value doit être d'au moins 1. Le champ value ne peut pas être supérieur à 5. Example: 2

starts_at   string     

Le champ value doit être une date valide. Example: 2026-04-05T18:47:38

ends_at   string  optional    

Le champ value doit être une date valide. Le champ value doit être une date postérieure au starts_at. Example: 2052-04-28

occurrences   integer  optional    

Le champ value doit être d'au moins 1. Example: 22

POST api/v1/calendar/recurring/generate

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/calendar/recurring/generate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2026-04-05T18:47:38\",
    \"end_date\": \"2052-04-28\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/recurring/generate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start_date": "2026-04-05T18:47:38",
    "end_date": "2052-04-28"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/recurring/generate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'start_date' => '2026-04-05T18:47:38',
            'end_date' => '2052-04-28',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/calendar/recurring/generate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

start_date   string     

Le champ value doit être une date valide. Example: 2026-04-05T18:47:38

end_date   string     

Le champ value doit être une date valide. Le champ value doit être une date postérieure au start_date. Example: 2052-04-28

GET api/v1/calendar/statistics

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 0bfbf90c-f7ec-4b21-8a18-3a8052e08d55
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/calendar/export

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/calendar/export" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2026-04-05T18:47:38\",
    \"end_date\": \"2052-04-28\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/calendar/export"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start_date": "2026-04-05T18:47:38",
    "end_date": "2052-04-28"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/calendar/export';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'start_date' => '2026-04-05T18:47:38',
            'end_date' => '2052-04-28',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 5e6cb915-55ee-4e75-ae10-c3a4644ba383
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/calendar/export

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

start_date   string     

Le champ value doit être une date valide. Example: 2026-04-05T18:47:38

end_date   string     

Le champ value doit être une date valide. Le champ value doit être une date postérieure ou égale au start_date. Example: 2052-04-28

GET api/calendar/callback/{provider}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/calendar/callback/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/callback/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/callback/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6IjE4ZTJQcU9OTTB5VXRpOFJ4MG5JMGc9PSIsInZhbHVlIjoiSVl2WjJPRlpkNjc1d25BMjR6NTBRYmdPNmpjclZ4VVZ1bktBdFE4SEpQL09SaExROGtnNURrckdqUkxaTC9ZNXZ6WjJYRDJQSzJ6cU9NUzVkMzRnVUhaaWRUM01oN2RuOFdoOTE5QS9TcGhCRkJMYWdsYlIzUG9iVGdGVytNRnIiLCJtYWMiOiI0NDFiMzYyM2EyMzRlYTUwNzhlNzAwNjQxMDNmYjM2NTVmYTNkZTdiMDAwOTIwMGQyMjE1OTY3YTA4MGIzODk1IiwidGFnIjoiIn0%3D; expires=Sun, 05 Apr 2026 20:47:38 GMT; Max-Age=7200; path=/; secure; samesite=lax; planifize-session=eyJpdiI6Inp4NFVEYUt1bnFxeEF1YTNoK3diZUE9PSIsInZhbHVlIjoiYTZQbnRidVRRcWZKS2FZQkU1V2FTYnU3dFRialdZTlpwWk45TkxxdXlwb090NkYyUnlkbXZkdWpidkIzakhJekJvRk5NdGtRY2ZuN3d3Z3JaRjd4MktNTDZUenVqUGN1Njl5KzVUWU9lV2gvZWpTdjYyaWoxVEpjSWlzY0FLSFIiLCJtYWMiOiJkMjNlNzE3NjAzNjFiOTg0MGZjMmQ5MjkwYzk3NjJlYjcyNGMzYTMxYWU5N2E3NGUyOWE1NjgyNjk0MzA2YzFkIiwidGFnIjoiIn0%3D; expires=Sun, 05 Apr 2026 20:47:38 GMT; Max-Age=7200; path=/; secure; httponly; samesite=lax
 

{
    "message": "Server Error"
}
 

Request   

GET api/calendar/callback/{provider}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

provider   string     

Example: architecto

GET api/calendar/ical/{token}.ics

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/calendar/ical/architecto.ics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/ical/architecto.ics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/ical/architecto.ics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6InQvRkxFZFVyZGFZVERPcmcycERSNkE9PSIsInZhbHVlIjoiSXFEeWdUUG56d2pZcE50bDMxeStqMFd1R3IzMm1VaWkvN0FzRG5sOFlab2REbUpsclpYcmYwb0MxV3pBbmowQUhFYzg5TEluanJFakcvZWR3TTY4aTh4dk5GQ2J4dXNRTUQ1Uzl3OHExazY3RFZ0QmthUXVNNFd4WTdsV3k2Nk0iLCJtYWMiOiI0NmJiYjk1NjBjMGJiMjlhYzU4ZjVkZWFhMWMxZjg5NDlkNzZlMzhkNGRjYTliZGRjZmQ5YjZmMDZhNTE3NGIwIiwidGFnIjoiIn0%3D; expires=Sun, 05 Apr 2026 20:47:38 GMT; Max-Age=7200; path=/; secure; samesite=lax; planifize-session=eyJpdiI6Ii9MQ0ZBY053WEEvb0RYMDdUYS9GS3c9PSIsInZhbHVlIjoiNGxJM0lNL2NFNlljbXNRMVdBYVdWU3lzYm5sUlFmVW5yaTNEUE1HOTJLelhDMWw2Y3RUMnUyRGVpVmFhYVlCbVUwWVM0bHRzQ3kwbkdmcndFbHV2akRNS1orVlRock9KRXVtVmUvSEhaOWZMVzJlVXRYekdLekg3ZldYekFIVXEiLCJtYWMiOiI3ZDA0NTdlYWQwYmZhYmIzMTIxMjhkZTFhZTlhODVhMDRmZTM4MzM3YjU3MDFkZjBhNTU1NjMwZDhjZjE0NWZhIiwidGFnIjoiIn0%3D; expires=Sun, 05 Apr 2026 20:47:38 GMT; Max-Age=7200; path=/; secure; httponly; samesite=lax
 

{
    "error": {
        "code": "NOT_FOUND",
        "message": "Route introuvable"
    }
}
 

Request   

GET api/calendar/ical/{token}.ics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

token   string     

Example: architecto

POST api/calendar/webhook/{provider}

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/calendar/webhook/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/webhook/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/webhook/architecto';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/calendar/webhook/{provider}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

provider   string     

Example: architecto

GET api/calendar/status

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/calendar/status" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/status"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/status';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6IndZNnZ3dEpNbHp1YjZSYVpqV21VcWc9PSIsInZhbHVlIjoiWU1FblhJeVZEclRJL0N5ODJaT0VXbmVjL2JFRU81a2ZxZXpXRmtwMVVvNFovVlRzMy8yT1l4SVdNWVBEcXFmb3NwZEhjRlJOeUt3WE5kdlN1MGJNdWZwUUpQZjF1Yi82LzMweVRldHljUXlUbFBWMlNqVjNJd2JvTnpHVFJ0R0giLCJtYWMiOiJhMWI1ZGU1MDU1MjcyYTUwZmRkMmE5ZjM2YTgwNmFlYzUyZGQ3OTg3OTRhMTAxYjNlYWNkMzgyYjRlMjIzN2U2IiwidGFnIjoiIn0%3D; expires=Sun, 05 Apr 2026 20:47:38 GMT; Max-Age=7200; path=/; secure; samesite=lax; planifize-session=eyJpdiI6IitlTk1UeU9Makpkc0RRdWZpa3d2NEE9PSIsInZhbHVlIjoiYmQ0Y1dXTEV4b3JDcVk2NlhVcjhCVVd6cGR2WHRzSEVjUC9wdVBuVVhJNitYSnV2K2lxZjJtYVdmVGM5ejB6dEI1TFdYRlI4ajhJZlB2WXdLTFBWbTZBbUowTnNFTFF5emJjcDZjM2hsd01yeGt5ZkJsT013aWZ0SUE0bjk5YzkiLCJtYWMiOiIyY2JkZmM0YzdhOGI5NjYwNjc1ZDJlNWMyMjU3YTkzNDliNWFhZTc4NmU0MTk1Y2ZlNDMyNjFmMDUyYWNjMjkzIiwidGFnIjoiIn0%3D; expires=Sun, 05 Apr 2026 20:47:38 GMT; Max-Age=7200; path=/; secure; httponly; samesite=lax
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/calendar/status

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/calendar/sync/{provider}

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/calendar/sync/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/sync/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/sync/architecto';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/calendar/sync/{provider}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

provider   string     

Example: architecto

GET api/calendar/history/{provider?}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/calendar/history/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/history/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/history/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6IjNnSU1tZ0RoTGZyZkI2cTdRZDlTN0E9PSIsInZhbHVlIjoiVDdROEwvZEdlOGx4R2FLd3BtekFMdHZwdndadG1ZSXh0c1Bvb3BJdmJYRkVaMmJaQ1UyekJxYjFjeGpQZWNXZEl3dlg4VUE4dGZjQW9jVGZlVCs4ZXZGVVJ1RHJOYU9JV0haWUJQU01DRnZOaHNrTytpM0pUdlUyalA5UFMzYXQiLCJtYWMiOiJjYjJlZGY0NjgyMjg4ZTYwOWM0MDE3YThjYWY5ODNkYWE3YTBiNDc0NGYzNDQyMzU3Yjk2Y2JlNGI1MTgzNTg1IiwidGFnIjoiIn0%3D; expires=Sun, 05 Apr 2026 20:47:38 GMT; Max-Age=7200; path=/; secure; samesite=lax; planifize-session=eyJpdiI6ImViY21HTWJWRlZabGlpMWxpYVgyOVE9PSIsInZhbHVlIjoiazNkelNxanFtekVPNUVIWUMzajc4a3pQZDdDU3NMdXBicnFFekczUmVHT0Q0dndoQUtodklQQ2hnK2ROSVY2RDBleGpxMjZXWEN1R2d4bzVJZnkrajlEYi90d2Z1SGUvMm1SeVQxUndBUjhlRUR2ZHEza0VkUW5LQ2dCNTJvREQiLCJtYWMiOiIzNDczNDg2NWQxZDMzMjNiMWY2MDA0Y2FiNzQ4YWM2YTdmNGUxNzJmMzg4MmM4ODEwNzNlYzVhZTYyNWUwNDc2IiwidGFnIjoiIn0%3D; expires=Sun, 05 Apr 2026 20:47:38 GMT; Max-Age=7200; path=/; secure; httponly; samesite=lax
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/calendar/history/{provider?}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

provider   string  optional    

Example: architecto

GET api/calendar/ical-url

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/calendar/ical-url" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/ical-url"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/ical-url';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6IjZYem1nNGZSNWJwaWhrVFJMQXkxd0E9PSIsInZhbHVlIjoiQWxDVW8wWXlUQVV0VEE2UjdkMEZQelVJMHZ6OFE4VVUvMGlLVnI2RWk4UXlNeERNZXFVc2dDcld3dkorTHUyNUZoVmEyTm9MRjNyalNrOWxhazR5UzdPZDlYdTRTV1JUdmduZ1hEdFhaUlFFZldjYzZhbG5kU1hybTVycHlDU2YiLCJtYWMiOiJjMDhhNGMwMjA3NTlkMzM0YTBkM2E1MTgxNmIyY2EzZjNmOTkyZmExOWVlYjE0OTc2MTQ3NjYxMzhmYzhjYjgxIiwidGFnIjoiIn0%3D; expires=Sun, 05 Apr 2026 20:47:38 GMT; Max-Age=7200; path=/; secure; samesite=lax; planifize-session=eyJpdiI6IkYzNGNzZjBTZ0ZOM0xSMUcxMk5aaXc9PSIsInZhbHVlIjoiNms1MFVnWUtWUFVRdVFOUVFHY2R1Wk9lM3JRcXFvQmkrVkhwd2xoUS9kSWJwemFDZjlBME84bEJuYlI4RlhCZHFsaEhXNm5Vang5Z2V6MFJNNGpCN1RWUDhQWXg2dGx4OTc2Zy9MTGJSMm9UNG44Zlp5c2xDRjNRV2dHY0hrQ0oiLCJtYWMiOiI3ODRiNDVmMzk4ZmRiNDYxMjExZGFmNGZhNWZiYWU3MGY1NjMwOTQzYmJhYzgwYjgxMWU2Y2I3NWVmNjFmMjY1IiwidGFnIjoiIn0%3D; expires=Sun, 05 Apr 2026 20:47:38 GMT; Max-Age=7200; path=/; secure; httponly; samesite=lax
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/calendar/ical-url

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/calendar/events

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/calendar/events" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": 16,
    \"start\": \"2026-04-05T18:47:38\",
    \"end\": \"2026-04-05T18:47:38\",
    \"teacher_id\": 16,
    \"room_id\": 16,
    \"group_id\": 16,
    \"course_id\": 16,
    \"status\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/calendar/events"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": 16,
    "start": "2026-04-05T18:47:38",
    "end": "2026-04-05T18:47:38",
    "teacher_id": 16,
    "room_id": 16,
    "group_id": 16,
    "course_id": 16,
    "status": "architecto"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/events';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'session_id' => 16,
            'start' => '2026-04-05T18:47:38',
            'end' => '2026-04-05T18:47:38',
            'teacher_id' => 16,
            'room_id' => 16,
            'group_id' => 16,
            'course_id' => 16,
            'status' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 8f479b27-a9a9-4529-934f-227ee954971a
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/calendar/events

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

session_id   integer  optional    

The id of an existing record in the schedule_sessions table. Example: 16

start   string     

Must be a valid date. Example: 2026-04-05T18:47:38

end   string     

Must be a valid date. Example: 2026-04-05T18:47:38

teacher_id   integer  optional    

Example: 16

room_id   integer  optional    

Example: 16

group_id   integer  optional    

Example: 16

course_id   integer  optional    

Example: 16

status   string  optional    

Example: architecto

GET api/calendar/events/{entry}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/calendar/events/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/events/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/events/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 51a398bd-19b4-4176-9024-2aebdb206a62
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/calendar/events/{entry}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry   string     

Example: architecto

PUT api/calendar/events/{entry}/move

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/calendar/events/architecto/move" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start\": \"2026-04-05T18:47:38\",
    \"end\": \"2052-04-28\",
    \"room_id\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/calendar/events/architecto/move"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start": "2026-04-05T18:47:38",
    "end": "2052-04-28",
    "room_id": 16
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/events/architecto/move';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'start' => '2026-04-05T18:47:38',
            'end' => '2052-04-28',
            'room_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/calendar/events/{entry}/move

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry   string     

Example: architecto

Body Parameters

start   string     

Must be a valid date. Example: 2026-04-05T18:47:38

end   string     

Must be a valid date. Must be a date after start. Example: 2052-04-28

room_id   integer  optional    

The id of an existing record in the rooms table. Example: 16

PUT api/calendar/events/{entry}/resize

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/calendar/events/architecto/resize" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"end\": \"2026-04-05T18:47:38\"
}"
const url = new URL(
    "https://creation_horaire.test/api/calendar/events/architecto/resize"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "end": "2026-04-05T18:47:38"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/events/architecto/resize';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'end' => '2026-04-05T18:47:38',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/calendar/events/{entry}/resize

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry   string     

Example: architecto

Body Parameters

end   string     

Must be a valid date. Example: 2026-04-05T18:47:38

GET api/calendar/conflicts

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/calendar/conflicts" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": 16,
    \"start\": \"2026-04-05T18:47:38\",
    \"end\": \"2026-04-05T18:47:38\",
    \"teacher_id\": 16,
    \"room_id\": 16,
    \"group_id\": 16,
    \"exclude_entry_id\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/calendar/conflicts"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": 16,
    "start": "2026-04-05T18:47:38",
    "end": "2026-04-05T18:47:38",
    "teacher_id": 16,
    "room_id": 16,
    "group_id": 16,
    "exclude_entry_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/conflicts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'session_id' => 16,
            'start' => '2026-04-05T18:47:38',
            'end' => '2026-04-05T18:47:38',
            'teacher_id' => 16,
            'room_id' => 16,
            'group_id' => 16,
            'exclude_entry_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 33428b07-617d-413b-83ac-88c33d547b0c
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/calendar/conflicts

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

session_id   integer     

Example: 16

start   string     

Must be a valid date. Example: 2026-04-05T18:47:38

end   string     

Must be a valid date. Example: 2026-04-05T18:47:38

teacher_id   integer  optional    

Example: 16

room_id   integer  optional    

Example: 16

group_id   integer  optional    

Example: 16

exclude_entry_id   integer  optional    

Example: 16

GET api/calendar/available-slots

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/calendar/available-slots" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": 16,
    \"date\": \"2026-04-05T18:47:38\",
    \"teacher_id\": 16,
    \"room_id\": 16,
    \"group_id\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/calendar/available-slots"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": 16,
    "date": "2026-04-05T18:47:38",
    "teacher_id": 16,
    "room_id": 16,
    "group_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/available-slots';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'session_id' => 16,
            'date' => '2026-04-05T18:47:38',
            'teacher_id' => 16,
            'room_id' => 16,
            'group_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 5de1429a-f1db-4efa-af06-7fb1bcf39014
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/calendar/available-slots

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

session_id   integer     

The id of an existing record in the schedule_sessions table. Example: 16

date   string     

Must be a valid date. Example: 2026-04-05T18:47:38

teacher_id   integer  optional    

Example: 16

room_id   integer  optional    

Example: 16

group_id   integer  optional    

Example: 16

GET api/calendar/sessions/{session}/stats

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/calendar/sessions/architecto/stats" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/sessions/architecto/stats"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/sessions/architecto/stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 16349b41-9994-4f12-a9a1-3c2ad9b1ac4c
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/calendar/sessions/{session}/stats

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session   string     

The session. Example: architecto

GET api/calendar/sessions/{session}/export-ical

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/calendar/sessions/architecto/export-ical" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/sessions/architecto/export-ical"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/sessions/architecto/export-ical';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 69601bca-8cba-4a68-8228-343a45af7144
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/calendar/sessions/{session}/export-ical

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session   string     

The session. Example: architecto

Generate a signed URL for a teacher's public calendar.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/calendar/share/teacher/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/share/teacher/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/share/teacher/architecto';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/calendar/share/teacher/{teacher}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher   string     

The teacher. Example: architecto

Generate a signed URL for a group's public calendar.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/calendar/share/group/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/share/group/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/share/group/architecto';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/calendar/share/group/{group}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group   string     

The group. Example: architecto

Generate a signed URL for a room's public calendar.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/calendar/share/room/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/calendar/share/room/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/calendar/share/room/architecto';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/calendar/share/room/{room}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room   string     

The room. Example: architecto

GET api/v1/constraint-types/active

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/constraint-types/active" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraint-types/active"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraint-types/active';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/constraint-types/active

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/constraint-types/entities

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/constraint-types/entities" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraint-types/entities"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraint-types/entities';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/constraint-types/entities

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/constraint-types/sort-order

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/constraint-types/sort-order" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ordered_ids\": [
        16
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraint-types/sort-order"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ordered_ids": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraint-types/sort-order';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ordered_ids' => [
                16,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/constraint-types/sort-order

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

ordered_ids   integer[]  optional    

The id of an existing record in the constraint_types table.

GET api/v1/constraint-types

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/constraint-types" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraint-types"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraint-types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/constraint-types

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/constraint-types

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/constraint-types" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"code\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"icon\": \"v\",
    \"color\": \"dljnikh\",
    \"applicable_to\": [
        \"group\"
    ],
    \"is_active\": true,
    \"sort_order\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraint-types"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "code": "n",
    "description": "Eius et animi quos velit et.",
    "icon": "v",
    "color": "dljnikh",
    "applicable_to": [
        "group"
    ],
    "is_active": true,
    "sort_order": 16
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraint-types';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'code' => 'n',
            'description' => 'Eius et animi quos velit et.',
            'icon' => 'v',
            'color' => 'dljnikh',
            'applicable_to' => [
                'group',
            ],
            'is_active' => true,
            'sort_order' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/constraint-types

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 100 characters. Example: b

code   string  optional    

Must not be greater than 50 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

icon   string  optional    

Must not be greater than 100 characters. Example: v

color   string  optional    

Must not be greater than 7 characters. Example: dljnikh

applicable_to   string[]  optional    
Must be one of:
  • teacher
  • group
  • room
  • course
rule_schema   object  optional    
default_rules   object  optional    
is_active   boolean  optional    

Example: true

sort_order   integer  optional    

Example: 16

GET api/v1/constraint-types/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/constraint-types/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraint-types/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraint-types/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/constraint-types/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the constraint type. Example: architecto

PUT api/v1/constraint-types/{id}

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/constraint-types/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"icon\": \"v\",
    \"color\": \"dljnikh\",
    \"applicable_to\": [
        \"teacher\"
    ],
    \"is_active\": false,
    \"sort_order\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraint-types/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et.",
    "icon": "v",
    "color": "dljnikh",
    "applicable_to": [
        "teacher"
    ],
    "is_active": false,
    "sort_order": 16
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraint-types/architecto';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'description' => 'Eius et animi quos velit et.',
            'icon' => 'v',
            'color' => 'dljnikh',
            'applicable_to' => [
                'teacher',
            ],
            'is_active' => false,
            'sort_order' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/constraint-types/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the constraint type. Example: architecto

Body Parameters

name   string  optional    

Must not be greater than 100 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

icon   string  optional    

Must not be greater than 100 characters. Example: v

color   string  optional    

Must not be greater than 7 characters. Example: dljnikh

applicable_to   string[]  optional    
Must be one of:
  • teacher
  • group
  • room
  • course
rule_schema   object  optional    
default_rules   object  optional    
is_active   boolean  optional    

Example: false

sort_order   integer  optional    

Example: 16

DELETE api/v1/constraint-types/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/constraint-types/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraint-types/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraint-types/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/constraint-types/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the constraint type. Example: architecto

POST api/v1/constraint-types/{id}/toggle-status

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/constraint-types/architecto/toggle-status" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/constraint-types/architecto/toggle-status"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/constraint-types/architecto/toggle-status';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/constraint-types/{id}/toggle-status

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the constraint type. Example: architecto

Display a listing of courses.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/courses" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/courses"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/courses';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: d2a51a87-10b4-4353-8f20-b59c7df55e50
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/courses

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get course statistics.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/courses/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/courses/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/courses/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: ee167440-205b-49dd-87e1-100e906a7f17
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/courses/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display the specified course.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/courses/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/courses/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/courses/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: c75cd406-a1c9-40a9-b689-02417d98ab03
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/courses/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the course. Example: 1

Remove the specified course.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/courses/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/courses/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/courses/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/courses/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the course. Example: 1

Activate a course.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/courses/1/activate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/courses/1/activate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/courses/1/activate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/courses/{course_id}/activate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_id   integer     

The ID of the course. Example: 1

Deactivate a course.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/courses/1/deactivate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/courses/1/deactivate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/courses/1/deactivate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/courses/{course_id}/deactivate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_id   integer     

The ID of the course. Example: 1

Assign a teacher to a course.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/courses/1/teachers" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"teacher_id\": \"architecto\",
    \"is_primary\": true,
    \"role\": \"n\",
    \"hours_assigned\": 84
}"
const url = new URL(
    "https://creation_horaire.test/api/courses/1/teachers"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "teacher_id": "architecto",
    "is_primary": true,
    "role": "n",
    "hours_assigned": 84
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/courses/1/teachers';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'teacher_id' => 'architecto',
            'is_primary' => true,
            'role' => 'n',
            'hours_assigned' => 84,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/courses/{course_id}/teachers

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_id   integer     

The ID of the course. Example: 1

Body Parameters

teacher_id   string     

The id of an existing record in the teachers table. Example: architecto

is_primary   boolean  optional    

Example: true

role   string  optional    

Must not be greater than 50 characters. Example: n

hours_assigned   integer  optional    

Must be at least 0. Example: 84

Remove a teacher from a course.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/courses/1/teachers/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/courses/1/teachers/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/courses/1/teachers/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/courses/{course_id}/teachers/{teacher_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_id   integer     

The ID of the course. Example: 1

teacher_id   integer     

The ID of the teacher. Example: 1

Assign a group to a course.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/courses/1/groups" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"group_id\": \"architecto\",
    \"academic_year\": \"ngzmiyvdljnikhwa\",
    \"semester\": \"ykcmyuwpwlvqwrsi\",
    \"is_required\": false
}"
const url = new URL(
    "https://creation_horaire.test/api/courses/1/groups"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "group_id": "architecto",
    "academic_year": "ngzmiyvdljnikhwa",
    "semester": "ykcmyuwpwlvqwrsi",
    "is_required": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/courses/1/groups';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'group_id' => 'architecto',
            'academic_year' => 'ngzmiyvdljnikhwa',
            'semester' => 'ykcmyuwpwlvqwrsi',
            'is_required' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/courses/{course_id}/groups

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_id   integer     

The ID of the course. Example: 1

Body Parameters

group_id   string     

The id of an existing record in the groups table. Example: architecto

academic_year   string  optional    

Must not be greater than 20 characters. Example: ngzmiyvdljnikhwa

semester   string  optional    

Must not be greater than 20 characters. Example: ykcmyuwpwlvqwrsi

is_required   boolean  optional    

Example: false

Remove a group from a course.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/courses/1/groups/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/courses/1/groups/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/courses/1/groups/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/courses/{course_id}/groups/{group_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_id   integer     

The ID of the course. Example: 1

group_id   integer     

The ID of the group. Example: 1

GET api/v1/dashboard

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/dashboard" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/dashboard"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/dashboard';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/dashboard

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/dashboard/sessions-overview

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/dashboard/sessions-overview" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/dashboard/sessions-overview"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/dashboard/sessions-overview';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/dashboard/sessions-overview

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/dashboard/upcoming-entries

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/dashboard/upcoming-entries" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/dashboard/upcoming-entries"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/dashboard/upcoming-entries';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/dashboard/upcoming-entries

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/dashboard/conflicts-summary

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/dashboard/conflicts-summary" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/dashboard/conflicts-summary"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/dashboard/conflicts-summary';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/dashboard/conflicts-summary

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/dashboard/teacher-workload

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/dashboard/teacher-workload" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/dashboard/teacher-workload"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/dashboard/teacher-workload';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/dashboard/teacher-workload

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/dashboard/room-utilization

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/dashboard/room-utilization" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/dashboard/room-utilization"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/dashboard/room-utilization';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/dashboard/room-utilization

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/dashboard/recent-activity

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/dashboard/recent-activity" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/dashboard/recent-activity"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/dashboard/recent-activity';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/dashboard/recent-activity

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/dashboard/statistics

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/dashboard/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2026-04-05T18:47:38\",
    \"end_date\": \"2052-04-28\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/dashboard/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start_date": "2026-04-05T18:47:38",
    "end_date": "2052-04-28"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/dashboard/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'start_date' => '2026-04-05T18:47:38',
            'end_date' => '2052-04-28',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/dashboard/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

start_date   string     

Must be a valid date. Example: 2026-04-05T18:47:38

end_date   string     

Must be a valid date. Must be a date after or equal to start_date. Example: 2052-04-28

Display a listing of departments.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/departments" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/departments"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/departments';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 0cd5bee3-c7de-4ae6-885c-97cd636ac361
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/departments

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get department statistics.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/departments/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/departments/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/departments/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: da46aaea-49ca-43ff-8f12-6f204131b768
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/departments/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display the specified department.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/departments/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/departments/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/departments/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: bdd49d8f-0b89-4466-91a2-d412f97bab67
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/departments/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the department. Example: 1

Remove the specified department.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/departments/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/departments/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/departments/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/departments/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the department. Example: 1

Activate a department.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/departments/1/activate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/departments/1/activate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/departments/1/activate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/departments/{department_id}/activate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

department_id   integer     

The ID of the department. Example: 1

Deactivate a department.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/departments/1/deactivate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/departments/1/deactivate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/departments/1/deactivate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/departments/{department_id}/deactivate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

department_id   integer     

The ID of the department. Example: 1

Assign a head to the department.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/departments/1/head" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"head_id\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/departments/1/head"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "head_id": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/departments/1/head';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'head_id' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/departments/{department_id}/head

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

department_id   integer     

The ID of the department. Example: 1

Body Parameters

head_id   string     

The id of an existing record in the users table. Example: architecto

Remove the head from the department.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/departments/1/head" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/departments/1/head"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/departments/1/head';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/departments/{department_id}/head

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

department_id   integer     

The ID of the department. Example: 1

Get teachers in the department.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/departments/1/teachers" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/departments/1/teachers"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/departments/1/teachers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: c818ce2c-f13c-4b9e-af39-69f66f2e2031
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/departments/{department_id}/teachers

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

department_id   integer     

The ID of the department. Example: 1

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/documentation/search" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/documentation/search"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/documentation/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 388b063d-b16d-4edd-a498-dda86a523ccd
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "success": true,
    "query": "",
    "count": 0,
    "data": []
}
 

GET api/documentation/ai-context

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/documentation/ai-context" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/documentation/ai-context"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/documentation/ai-context';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a0b41241-aa20-41c3-aebe-6cfb3cc21ef3
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "success": true,
    "context": {
        "query": "",
        "feature": null,
        "articles": [],
        "total_found": 0,
        "timestamp": "2026-04-05T18:47:38+00:00"
    }
}
 

Request   

GET api/documentation/ai-context

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/documentation/feature/{featureKey}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/documentation/feature/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/documentation/feature/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/documentation/feature/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: f8a9512f-ac32-492f-b9f1-2625b0cedeb3
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "success": true,
    "feature": "architecto",
    "count": 0,
    "data": []
}
 

Request   

GET api/documentation/feature/{featureKey}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

featureKey   string     

Example: architecto

GET api/documentation/articles/{slug}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/documentation/articles/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/documentation/articles/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/documentation/articles/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 77b0b835-8a35-4bbf-a8b0-97b116ec0c85
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "success": false,
    "error": "Article not found"
}
 

Request   

GET api/documentation/articles/{slug}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the article. Example: architecto

POST api/documentation/articles/{slug}/helpful

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/documentation/articles/architecto/helpful" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/documentation/articles/architecto/helpful"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/documentation/articles/architecto/helpful';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/documentation/articles/{slug}/helpful

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the article. Example: architecto

GET api/documentation/categories

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/documentation/categories" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/documentation/categories"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/documentation/categories';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 95641bd7-0d0c-41ea-8206-b55d69ac070e
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "success": true,
    "data": []
}
 

Request   

GET api/documentation/categories

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/documentation/categories/{slug}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/documentation/categories/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/documentation/categories/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/documentation/categories/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a00ab582-74e9-41c9-99d8-ec5be3e26cb4
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "success": false,
    "error": "Category not found"
}
 

Request   

GET api/documentation/categories/{slug}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the category. Example: architecto

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/documentation/popular" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/documentation/popular"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/documentation/popular';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 6330634c-4036-4858-9745-f7fcda8e7dd4
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "success": true,
    "data": []
}
 

GET api/documentation/stats

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/documentation/stats" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/documentation/stats"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/documentation/stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 6398a494-5c40-4d78-a430-48b62eb5214d
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
set-cookie: planifize-session=eyJpdiI6IjkxNmhVZXJQUTViSkdUWjVpZElPNnc9PSIsInZhbHVlIjoiTXNWdlQ1OXBZQWJNQTUxZXluYWlOZHlKa1hnMUlOeHg1Q0tKeW5TSVhUdS9CKzBKNkx3ZjF1Z1NLQXZTUXEweWh5ZGhLYnNlWlpqNVkwZ09hZDIvL2tMbW5DdTlXVzhvVVlSNXZjaC9xclpDczhEQkxPTmtraFdmNEJGQW5KQXUiLCJtYWMiOiJjNjliOTk4YTMyYWNlZTQ2Y2RjNzk1M2JiN2M0NmViNzM4NDJjY2M3ZGQ3Njg0M2UxNGJiYzg2NzNjZDVhZDQ1IiwidGFnIjoiIn0%3D; expires=Sun, 05 Apr 2026 20:47:38 GMT; Max-Age=7200; path=/; secure; httponly; samesite=lax
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/documentation/stats

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/equipments/categories

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/equipments/categories" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/equipments/categories"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/equipments/categories';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/equipments/categories

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/equipments/sort-order

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/equipments/sort-order" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ordered_ids\": [
        16
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/equipments/sort-order"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ordered_ids": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/equipments/sort-order';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ordered_ids' => [
                16,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/equipments/sort-order

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

ordered_ids   integer[]  optional    

The id of an existing record in the equipments table.

GET api/v1/equipments

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/equipments" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/equipments"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/equipments';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/equipments

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/equipments

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/equipments" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"code\": \"n\",
    \"description\": \"Animi quos velit et fugiat.\",
    \"category\": \"d\",
    \"icon\": \"l\",
    \"is_active\": true,
    \"sort_order\": 9
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/equipments"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "code": "n",
    "description": "Animi quos velit et fugiat.",
    "category": "d",
    "icon": "l",
    "is_active": true,
    "sort_order": 9
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/equipments';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'code' => 'n',
            'description' => 'Animi quos velit et fugiat.',
            'category' => 'd',
            'icon' => 'l',
            'is_active' => true,
            'sort_order' => 9,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/equipments

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 100 characters. Example: b

code   string  optional    

Must not be greater than 30 characters. Example: n

description   string  optional    

Must not be greater than 5000 characters. Example: Animi quos velit et fugiat.

category   string     

Must not be greater than 50 characters. Example: d

icon   string  optional    

Must not be greater than 100 characters. Example: l

is_active   boolean  optional    

Example: true

sort_order   integer  optional    

Must be at least 0. Example: 9

GET api/v1/equipments/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/equipments/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/equipments/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/equipments/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/equipments/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the equipment. Example: architecto

PUT api/v1/equipments/{id}

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/equipments/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"code\": \"n\",
    \"description\": \"Animi quos velit et fugiat.\",
    \"category\": \"d\",
    \"icon\": \"l\",
    \"is_active\": true,
    \"sort_order\": 9
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/equipments/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "code": "n",
    "description": "Animi quos velit et fugiat.",
    "category": "d",
    "icon": "l",
    "is_active": true,
    "sort_order": 9
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/equipments/architecto';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'code' => 'n',
            'description' => 'Animi quos velit et fugiat.',
            'category' => 'd',
            'icon' => 'l',
            'is_active' => true,
            'sort_order' => 9,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/equipments/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the equipment. Example: architecto

Body Parameters

name   string  optional    

Must not be greater than 100 characters. Example: b

code   string  optional    

Must not be greater than 30 characters. Example: n

description   string  optional    

Must not be greater than 5000 characters. Example: Animi quos velit et fugiat.

category   string  optional    

Must not be greater than 50 characters. Example: d

icon   string  optional    

Must not be greater than 100 characters. Example: l

is_active   boolean  optional    

Example: true

sort_order   integer  optional    

Must be at least 0. Example: 9

DELETE api/v1/equipments/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/equipments/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/equipments/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/equipments/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/equipments/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the equipment. Example: architecto

POST api/v1/equipments/{id}/toggle-status

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/equipments/architecto/toggle-status" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/equipments/architecto/toggle-status"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/equipments/architecto/toggle-status';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/equipments/{id}/toggle-status

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the equipment. Example: architecto

POST api/v1/equipments/{id}/attach-room

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/equipments/architecto/attach-room" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"room_id\": 16,
    \"quantity\": 22,
    \"notes\": \"g\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/equipments/architecto/attach-room"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "room_id": 16,
    "quantity": 22,
    "notes": "g"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/equipments/architecto/attach-room';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'room_id' => 16,
            'quantity' => 22,
            'notes' => 'g',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/equipments/{id}/attach-room

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the equipment. Example: architecto

Body Parameters

room_id   integer     

The id of an existing record in the rooms table. Example: 16

quantity   integer  optional    

Must be at least 1. Must not be greater than 1000. Example: 22

notes   string  optional    

Must not be greater than 500 characters. Example: g

POST api/v1/equipments/{id}/detach-room

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/equipments/architecto/detach-room" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"room_id\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/equipments/architecto/detach-room"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "room_id": 16
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/equipments/architecto/detach-room';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'room_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/equipments/{id}/detach-room

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the equipment. Example: architecto

Body Parameters

room_id   integer     

The id of an existing record in the rooms table. Example: 16

Get comprehensive fairness report for a session.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/fairness/session/1/report" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/fairness/session/1/report"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/fairness/session/1/report';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 82714d34-34fb-4c23-a6e5-e680ac2ae2d6
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/fairness/session/{session_id}/report

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

Get workload distribution analysis.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/fairness/session/1/workload?entity_type=architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/fairness/session/1/workload"
);

const params = {
    "entity_type": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/fairness/session/1/workload';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'entity_type' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 5fa54721-79b0-4e62-bf17-2879dced8324
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/fairness/session/{session_id}/workload

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

Query Parameters

entity_type   string  optional    

Filter by 'teacher' or 'group'. Example: architecto

Get time slot distribution analysis.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/fairness/session/1/timeslots?entity_type=architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/fairness/session/1/timeslots"
);

const params = {
    "entity_type": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/fairness/session/1/timeslots';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'entity_type' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 52568bcf-3463-445c-bd1d-24fc1c2732a2
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/fairness/session/{session_id}/timeslots

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

Query Parameters

entity_type   string  optional    

Filter by 'teacher' or 'group'. Example: architecto

Get room quality distribution analysis.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/fairness/session/1/rooms?entity_type=architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/fairness/session/1/rooms"
);

const params = {
    "entity_type": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/fairness/session/1/rooms';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'entity_type' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a61ff3a0-6d08-40f9-bac2-bd86d005240f
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/fairness/session/{session_id}/rooms

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

Query Parameters

entity_type   string  optional    

Filter by 'teacher' or 'group'. Example: architecto

Calculate and store fairness metrics for a session.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/fairness/session/1/calculate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/fairness/session/1/calculate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/fairness/session/1/calculate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/fairness/session/{session_id}/calculate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

Get historical fairness data for the organization.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/fairness/historical?months=16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/fairness/historical"
);

const params = {
    "months": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/fairness/historical';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'months' => '16',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 554a241f-e501-4cf6-ac61-9cfc79874c95
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/fairness/historical

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

months   integer  optional    

Number of months of history (default: 12). Example: 16

Compare fairness between two sessions.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/fairness/compare?session1_id=16&session2_id=16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session1_id\": 16,
    \"session2_id\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/fairness/compare"
);

const params = {
    "session1_id": "16",
    "session2_id": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session1_id": 16,
    "session2_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/fairness/compare';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'session1_id' => '16',
            'session2_id' => '16',
        ],
        'json' => [
            'session1_id' => 16,
            'session2_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a1a86a7d-baba-459b-aa72-ea5532a5831b
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/fairness/compare

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

session1_id   integer  optional    

First session ID. Example: 16

session2_id   integer  optional    

Second session ID. Example: 16

Body Parameters

session1_id   integer     

Example: 16

session2_id   integer     

Example: 16

List fairness metrics.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/fairness/metrics?session_id=16&metric_type=architecto&entity_type=architecto&per_page=16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/fairness/metrics"
);

const params = {
    "session_id": "16",
    "metric_type": "architecto",
    "entity_type": "architecto",
    "per_page": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/fairness/metrics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'session_id' => '16',
            'metric_type' => 'architecto',
            'entity_type' => 'architecto',
            'per_page' => '16',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 3067f002-7612-4c71-a273-1fda6853cb1d
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/fairness/metrics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

session_id   integer  optional    

Filter by session. Example: 16

metric_type   string  optional    

Filter by metric type. Example: architecto

entity_type   string  optional    

Filter by entity type. Example: architecto

per_page   integer  optional    

Results per page. Example: 16

Show a specific metric.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/fairness/metrics/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/fairness/metrics/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/fairness/metrics/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: d2f4c8d6-20ca-483d-9b55-41a7e53a1564
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/fairness/metrics/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the metric. Example: 16

Display a listing of groups.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/groups" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/groups"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: e732c93c-b380-4139-aa68-c46d808031a0
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/groups

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get group statistics.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/groups/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/groups/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 719386a7-0fa5-4fa8-925e-191d93d1c798
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/groups/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get available levels.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/groups/levels" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/groups/levels"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/levels';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: f4876c1d-a475-4e94-94f2-219bc020726e
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/groups/levels

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display the specified group.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/groups/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/groups/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 01da7d48-0922-4ca1-bc70-4cd9efeea773
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/groups/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the group. Example: 1

Remove the specified group.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/groups/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/groups/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/groups/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the group. Example: 1

Activate a group.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/groups/1/activate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/groups/1/activate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/1/activate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/groups/{group_id}/activate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

Deactivate a group.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/groups/1/deactivate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/groups/1/deactivate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/1/deactivate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/groups/{group_id}/deactivate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

Update student count.

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/groups/1/students" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"actual_students\": 1
}"
const url = new URL(
    "https://creation_horaire.test/api/groups/1/students"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "actual_students": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/1/students';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'actual_students' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/groups/{group_id}/students

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

Body Parameters

actual_students   integer     

Must be at least 0. Must not be greater than 1000. Example: 1

Get group availability.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/groups/1/availability" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/groups/1/availability"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/1/availability';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: e356b25d-609b-4bd7-b78c-eed12b25c410
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/groups/{group_id}/availability

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

Update group availability.

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/groups/1/availability" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"availability\": []
}"
const url = new URL(
    "https://creation_horaire.test/api/groups/1/availability"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "availability": []
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/1/availability';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'availability' => [],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/groups/{group_id}/availability

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

Body Parameters

availability   object     
monday   object  optional    
tuesday   object  optional    
wednesday   object  optional    
thursday   object  optional    
friday   object  optional    
saturday   object  optional    
sunday   object  optional    

Get courses assigned to a group.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/groups/1/courses" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/groups/1/courses"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/1/courses';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: ac93be4c-d1ac-4892-98e5-9e6535c5781a
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/groups/{group_id}/courses

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

Assign a course to a group.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/groups/1/courses" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"course_id\": \"architecto\",
    \"academic_year\": \"ngzmiyvdljnikhwa\",
    \"semester\": \"ykcmyuwpwlvqwrsi\",
    \"is_required\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/groups/1/courses"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "course_id": "architecto",
    "academic_year": "ngzmiyvdljnikhwa",
    "semester": "ykcmyuwpwlvqwrsi",
    "is_required": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/1/courses';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'course_id' => 'architecto',
            'academic_year' => 'ngzmiyvdljnikhwa',
            'semester' => 'ykcmyuwpwlvqwrsi',
            'is_required' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/groups/{group_id}/courses

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

Body Parameters

course_id   string     

The id of an existing record in the courses table. Example: architecto

academic_year   string  optional    

Must not be greater than 20 characters. Example: ngzmiyvdljnikhwa

semester   string  optional    

Must not be greater than 20 characters. Example: ykcmyuwpwlvqwrsi

is_required   boolean  optional    

Example: true

Remove a course from a group.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/groups/1/courses/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/groups/1/courses/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/1/courses/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/groups/{group_id}/courses/{course_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

course_id   integer     

The ID of the course. Example: 1

Get group schedule entries.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/groups/1/schedule" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2026-04-05T18:47:38\",
    \"end_date\": \"2052-04-28\",
    \"session_id\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/groups/1/schedule"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start_date": "2026-04-05T18:47:38",
    "end_date": "2052-04-28",
    "session_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/groups/1/schedule';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'start_date' => '2026-04-05T18:47:38',
            'end_date' => '2052-04-28',
            'session_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 6fc59bf3-f1ee-40a0-90c1-c724316de479
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/groups/{group_id}/schedule

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

Body Parameters

start_date   string  optional    

Must be a valid date. Example: 2026-04-05T18:47:38

end_date   string  optional    

Must be a valid date. Must be a date after or equal to start_date. Example: 2052-04-28

session_id   integer  optional    

The id of an existing record in the sessions table. Example: 16

GET api/hour-banks

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/hour-banks" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/hour-banks"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/hour-banks';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 97226bd9-c968-4119-bcbc-08f1823d8323
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/hour-banks

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/hour-banks/my-banks

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/hour-banks/my-banks" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/hour-banks/my-banks"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/hour-banks/my-banks';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: e2f56973-b554-4756-b940-09849149e7cd
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/hour-banks/my-banks

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/hour-banks/history

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/hour-banks/history" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/hour-banks/history"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/hour-banks/history';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 61375e8a-15ba-44d5-be5c-f76bf3c36e22
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/hour-banks/history

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/hour-banks/pending-approvals

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/hour-banks/pending-approvals" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/hour-banks/pending-approvals"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/hour-banks/pending-approvals';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: fe5c39b7-f74e-42b4-b671-212666c856ad
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/hour-banks/pending-approvals

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/hour-banks/stats

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/hour-banks/stats" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/hour-banks/stats"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/hour-banks/stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a908eb95-6fc1-4d08-9cb0-d9fc2eeee87a
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/hour-banks/stats

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/hour-banks/{hourBank_id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/hour-banks/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/hour-banks/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/hour-banks/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: d1a6039b-cf34-4a94-9955-52c271dad49b
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/hour-banks/{hourBank_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

hourBank_id   integer     

The ID of the hourBank. Example: 16

GET api/hour-banks/{hourBank_id}/transactions

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/hour-banks/16/transactions" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/hour-banks/16/transactions"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/hour-banks/16/transactions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: dd46b362-4042-473c-abd2-ac4074f35f5e
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/hour-banks/{hourBank_id}/transactions

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

hourBank_id   integer     

The ID of the hourBank. Example: 16

POST api/hour-banks/{hourBank_id}/transactions

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/hour-banks/16/transactions" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"credit\",
    \"hours\": 1,
    \"reason\": \"n\",
    \"description\": \"Animi quos velit et fugiat.\",
    \"effective_date\": \"2026-04-05T18:47:38\",
    \"requires_approval\": false
}"
const url = new URL(
    "https://creation_horaire.test/api/hour-banks/16/transactions"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "credit",
    "hours": 1,
    "reason": "n",
    "description": "Animi quos velit et fugiat.",
    "effective_date": "2026-04-05T18:47:38",
    "requires_approval": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/hour-banks/16/transactions';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'type' => 'credit',
            'hours' => 1,
            'reason' => 'n',
            'description' => 'Animi quos velit et fugiat.',
            'effective_date' => '2026-04-05T18:47:38',
            'requires_approval' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/hour-banks/{hourBank_id}/transactions

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

hourBank_id   integer     

The ID of the hourBank. Example: 16

Body Parameters

type   string     

Example: credit

Must be one of:
  • credit
  • debit
  • adjustment
hours   number     

Must be at least 0.01. Must not be greater than 1000. Example: 1

reason   string     

Must not be greater than 255 characters. Example: n

description   string  optional    

Must not be greater than 2000 characters. Example: Animi quos velit et fugiat.

effective_date   string  optional    

Must be a valid date. Example: 2026-04-05T18:47:38

requires_approval   boolean  optional    

Example: false

POST api/hour-bank-transactions/{transaction_id}/approve

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/hour-bank-transactions/16/approve" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notes\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/hour-bank-transactions/16/approve"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "notes": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/hour-bank-transactions/16/approve';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'notes' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/hour-bank-transactions/{transaction_id}/approve

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transaction_id   integer     

The ID of the transaction. Example: 16

Body Parameters

notes   string  optional    

Must not be greater than 1000 characters. Example: b

POST api/hour-bank-transactions/{transaction_id}/reject

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/hour-bank-transactions/16/reject" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notes\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/hour-bank-transactions/16/reject"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "notes": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/hour-bank-transactions/16/reject';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'notes' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/hour-bank-transactions/{transaction_id}/reject

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transaction_id   integer     

The ID of the transaction. Example: 16

Body Parameters

notes   string  optional    

Must not be greater than 1000 characters. Example: b

GET api/v1/licensing/plans

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/licensing/plans" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/plans"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/plans';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 0dd94305-3cd4-4253-a45e-d50f86f610e4
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/licensing/plans

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/licensing/plans/{plan_id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/licensing/plans/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/plans/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/plans/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 56410a8e-e7c8-475f-a284-2270a2368569
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/licensing/plans/{plan_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

plan_id   integer     

The ID of the plan. Example: 1

GET api/v1/licensing/features

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/licensing/features" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/features"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/features';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 270a0798-1e0e-4c71-a3f5-424806bcb9d2
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/licensing/features

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/licensing/my/license

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/licensing/my/license" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/my/license"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/my/license';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: e632446b-0074-41cb-9265-78cc26253c5f
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/licensing/my/license

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/licensing/my/usage

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/licensing/my/usage" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/my/usage"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/my/usage';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 40c79011-33e3-453b-b086-2713b6c398f0
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/licensing/my/usage

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/licensing/my/check-feature

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/licensing/my/check-feature" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"feature\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/my/check-feature"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "feature": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/my/check-feature';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'feature' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/licensing/my/check-feature

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

feature   string     

Example: architecto

POST api/v1/licensing/my/check-limit

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/licensing/my/check-limit" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"resource_type\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/my/check-limit"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "resource_type": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/my/check-limit';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'resource_type' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/licensing/my/check-limit

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

resource_type   string     

Example: architecto

POST api/v1/licensing/plans

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/licensing/plans" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"code\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"duration_days\": 16,
    \"price\": 42,
    \"is_trial\": true,
    \"is_active\": false,
    \"is_public\": false
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/plans"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "code": "n",
    "description": "Eius et animi quos velit et.",
    "duration_days": 16,
    "price": 42,
    "is_trial": true,
    "is_active": false,
    "is_public": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/plans';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'code' => 'n',
            'description' => 'Eius et animi quos velit et.',
            'duration_days' => 16,
            'price' => 42,
            'is_trial' => true,
            'is_active' => false,
            'is_public' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/licensing/plans

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

code   string     

Must not be greater than 50 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

duration_days   integer     

Must be at least 1. Example: 16

price   number     

Must be at least 0. Example: 42

is_trial   boolean  optional    

Example: true

is_active   boolean  optional    

Example: false

is_public   boolean  optional    

Example: false

limits   object  optional    
features   object  optional    

PUT api/v1/licensing/plans/{plan_id}

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/licensing/plans/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"duration_days\": 16,
    \"price\": 42,
    \"is_trial\": false,
    \"is_active\": false,
    \"is_public\": false
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/plans/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et.",
    "duration_days": 16,
    "price": 42,
    "is_trial": false,
    "is_active": false,
    "is_public": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/plans/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'description' => 'Eius et animi quos velit et.',
            'duration_days' => 16,
            'price' => 42,
            'is_trial' => false,
            'is_active' => false,
            'is_public' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/licensing/plans/{plan_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

plan_id   integer     

The ID of the plan. Example: 1

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

duration_days   integer  optional    

Must be at least 1. Example: 16

price   number  optional    

Must be at least 0. Example: 42

is_trial   boolean  optional    

Example: false

is_active   boolean  optional    

Example: false

is_public   boolean  optional    

Example: false

limits   object  optional    
features   object  optional    

DELETE api/v1/licensing/plans/{plan_id}

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/licensing/plans/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/plans/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/plans/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/licensing/plans/{plan_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

plan_id   integer     

The ID of the plan. Example: 1

POST api/v1/licensing/plans/initialize

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/licensing/plans/initialize" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/plans/initialize"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/plans/initialize';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/licensing/plans/initialize

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/licensing/licenses

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/licensing/licenses" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/licenses"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/licenses';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: edd265fc-d06e-410c-89e9-19bb37005782
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/licensing/licenses

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/licensing/licenses

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/licensing/licenses" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"organization_id\": \"architecto\",
    \"license_plan_id\": \"architecto\",
    \"notes\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/licenses"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "organization_id": "architecto",
    "license_plan_id": "architecto",
    "notes": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/licenses';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'organization_id' => 'architecto',
            'license_plan_id' => 'architecto',
            'notes' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/licensing/licenses

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

organization_id   string     

The id of an existing record in the organizations table. Example: architecto

license_plan_id   string     

The id of an existing record in the license_plans table. Example: architecto

notes   string  optional    

Example: architecto

GET api/v1/licensing/licenses/{license_id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/licensing/licenses/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/licenses/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/licenses/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 87fc26ea-5550-4b79-b013-f51d26b2f0a6
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/licensing/licenses/{license_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

license_id   integer     

The ID of the license. Example: 16

POST api/v1/licensing/licenses/{license_id}/renew

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/licensing/licenses/16/renew" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"duration_days\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/licenses/16/renew"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "duration_days": 16
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/licenses/16/renew';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'duration_days' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/licensing/licenses/{license_id}/renew

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

license_id   integer     

The ID of the license. Example: 16

Body Parameters

duration_days   integer  optional    

Must be at least 1. Example: 16

POST api/v1/licensing/licenses/{license_id}/upgrade

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/licensing/licenses/16/upgrade" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"license_plan_id\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/licenses/16/upgrade"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "license_plan_id": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/licenses/16/upgrade';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'license_plan_id' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/licensing/licenses/{license_id}/upgrade

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

license_id   integer     

The ID of the license. Example: 16

Body Parameters

license_plan_id   string     

The id of an existing record in the license_plans table. Example: architecto

POST api/v1/licensing/licenses/{license_id}/suspend

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/licensing/licenses/16/suspend" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/licenses/16/suspend"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/licenses/16/suspend';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'reason' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/licensing/licenses/{license_id}/suspend

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

license_id   integer     

The ID of the license. Example: 16

Body Parameters

reason   string  optional    

Must not be greater than 500 characters. Example: b

POST api/v1/licensing/licenses/{license_id}/cancel

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/licensing/licenses/16/cancel" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/licenses/16/cancel"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/licenses/16/cancel';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'reason' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/licensing/licenses/{license_id}/cancel

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

license_id   integer     

The ID of the license. Example: 16

Body Parameters

reason   string  optional    

Must not be greater than 500 characters. Example: b

POST api/v1/licensing/licenses/{license_id}/reactivate

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/licensing/licenses/16/reactivate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/licenses/16/reactivate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/licenses/16/reactivate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/licensing/licenses/{license_id}/reactivate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

license_id   integer     

The ID of the license. Example: 16

GET api/v1/licensing/statistics

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/licensing/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/licensing/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/licensing/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: e9087a99-bde6-4b68-8dd7-09612f917e68
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/licensing/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

List open shifts for the authenticated user's organization.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/open-shifts" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shifts"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shifts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 8d033205-bfe1-4148-92a7-53cb9adc774f
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/open-shifts

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get available shifts for the current teacher.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/open-shifts/available" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shifts/available"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shifts/available';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 21343b40-4b87-4def-9646-a6fdb2c32346
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/open-shifts/available

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get statistics.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/open-shifts/stats" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shifts/stats"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shifts/stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a8ccc272-6397-4bf7-be91-bd8d9f25c02b
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/open-shifts/stats

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get my applications.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/open-shifts/my-applications" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shifts/my-applications"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shifts/my-applications';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 85ff1e22-15bb-42cc-b4da-6d6171805ad9
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/open-shifts/my-applications

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get pending applications (admin).

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/open-shifts/pending-applications" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shifts/pending-applications"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shifts/pending-applications';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: f96c70c4-f679-4893-9163-19c8051d1ee8
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/open-shifts/pending-applications

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Create a new open shift.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/open-shifts" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"schedule_session_id\": 16,
    \"course_id\": 16,
    \"room_id\": 16,
    \"date\": \"2052-04-28\",
    \"start_time\": \"18:47\",
    \"end_time\": \"2052-04-28\",
    \"title\": \"n\",
    \"description\": \"Animi quos velit et fugiat.\",
    \"slots_needed\": 6,
    \"required_qualifications\": [
        \"l\"
    ],
    \"hourly_rate\": 19,
    \"special_instructions\": \"n\",
    \"applications_close_at\": \"2022-04-30\",
    \"priority\": \"low\",
    \"is_urgent\": false
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shifts"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "schedule_session_id": 16,
    "course_id": 16,
    "room_id": 16,
    "date": "2052-04-28",
    "start_time": "18:47",
    "end_time": "2052-04-28",
    "title": "n",
    "description": "Animi quos velit et fugiat.",
    "slots_needed": 6,
    "required_qualifications": [
        "l"
    ],
    "hourly_rate": 19,
    "special_instructions": "n",
    "applications_close_at": "2022-04-30",
    "priority": "low",
    "is_urgent": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shifts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'schedule_session_id' => 16,
            'course_id' => 16,
            'room_id' => 16,
            'date' => '2052-04-28',
            'start_time' => '18:47',
            'end_time' => '2052-04-28',
            'title' => 'n',
            'description' => 'Animi quos velit et fugiat.',
            'slots_needed' => 6,
            'required_qualifications' => [
                'l',
            ],
            'hourly_rate' => 19,
            'special_instructions' => 'n',
            'applications_close_at' => '2022-04-30',
            'priority' => 'low',
            'is_urgent' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/open-shifts

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

schedule_session_id   integer     

The id of an existing record in the schedule_sessions table. Example: 16

course_id   integer  optional    

The id of an existing record in the courses table. Example: 16

room_id   integer  optional    

The id of an existing record in the rooms table. Example: 16

date   string     

Must be a valid date. Must be a date after or equal to today. Example: 2052-04-28

start_time   string     

Must be a valid date in the format H:i. Example: 18:47

end_time   string     

Must be a valid date in the format H:i. Must be a date after start_time. Example: 2052-04-28

title   string     

Must not be greater than 255 characters. Example: n

description   string  optional    

Must not be greater than 2000 characters. Example: Animi quos velit et fugiat.

slots_needed   integer  optional    

Must be at least 1. Must not be greater than 10. Example: 6

required_qualifications   string[]  optional    

Must not be greater than 100 characters.

hourly_rate   number  optional    

Must be at least 0. Must not be greater than 9999.99. Example: 19

special_instructions   string  optional    

Must not be greater than 2000 characters. Example: n

applications_close_at   string  optional    

Must be a valid date. Must be a date before date. Example: 2022-04-30

priority   string  optional    

Example: low

Must be one of:
  • low
  • normal
  • high
  • urgent
is_urgent   boolean  optional    

Example: false

Get a single open shift.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/open-shifts/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shifts/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shifts/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: c44ec8e8-fca1-4853-a5e0-51734dc98035
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/open-shifts/{openShift_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

openShift_id   integer     

The ID of the openShift. Example: 16

Publish an open shift.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/open-shifts/16/publish" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shifts/16/publish"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shifts/16/publish';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/open-shifts/{openShift_id}/publish

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

openShift_id   integer     

The ID of the openShift. Example: 16

Cancel an open shift.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/open-shifts/16/cancel" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shifts/16/cancel"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shifts/16/cancel';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/open-shifts/{openShift_id}/cancel

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

openShift_id   integer     

The ID of the openShift. Example: 16

Check eligibility for a shift.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/open-shifts/16/eligibility" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shifts/16/eligibility"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shifts/16/eligibility';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 3193f79e-7b6b-43e0-80ec-fc1c345feef6
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/open-shifts/{openShift_id}/eligibility

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

openShift_id   integer     

The ID of the openShift. Example: 16

Apply to an open shift.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/open-shifts/16/apply" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"message\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shifts/16/apply"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "message": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shifts/16/apply';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'message' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/open-shifts/{openShift_id}/apply

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

openShift_id   integer     

The ID of the openShift. Example: 16

Body Parameters

message   string  optional    

Must not be greater than 1000 characters. Example: b

Withdraw an application.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/open-shift-applications/16/withdraw" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shift-applications/16/withdraw"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shift-applications/16/withdraw';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/open-shift-applications/{application_id}/withdraw

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

application_id   integer     

The ID of the application. Example: 16

Cancel an approved application.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/open-shift-applications/16/cancel" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shift-applications/16/cancel"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shift-applications/16/cancel';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/open-shift-applications/{application_id}/cancel

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

application_id   integer     

The ID of the application. Example: 16

Approve an application (admin).

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/open-shift-applications/16/approve" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\",
    \"notes\": \"n\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shift-applications/16/approve"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "b",
    "notes": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shift-applications/16/approve';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'reason' => 'b',
            'notes' => 'n',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/open-shift-applications/{application_id}/approve

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

application_id   integer     

The ID of the application. Example: 16

Body Parameters

reason   string  optional    

Must not be greater than 1000 characters. Example: b

notes   string  optional    

Must not be greater than 1000 characters. Example: n

Reject an application (admin).

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/open-shift-applications/16/reject" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\",
    \"notes\": \"n\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/open-shift-applications/16/reject"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "b",
    "notes": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/open-shift-applications/16/reject';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'reason' => 'b',
            'notes' => 'n',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/open-shift-applications/{application_id}/reject

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

application_id   integer     

The ID of the application. Example: 16

Body Parameters

reason   string  optional    

Must not be greater than 1000 characters. Example: b

notes   string  optional    

Must not be greater than 1000 characters. Example: n

GET api/v1/pdf/sessions/{sessionId}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/pdf/sessions/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/pdf/sessions/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/pdf/sessions/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/pdf/sessions/{sessionId}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sessionId   string     

Example: architecto

GET api/v1/pdf/sessions/{sessionId}/teachers/{teacherId}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/pdf/sessions/architecto/teachers/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/pdf/sessions/architecto/teachers/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/pdf/sessions/architecto/teachers/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/pdf/sessions/{sessionId}/teachers/{teacherId}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sessionId   string     

Example: architecto

teacherId   string     

Example: architecto

GET api/v1/pdf/sessions/{sessionId}/rooms/{roomId}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/pdf/sessions/architecto/rooms/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/pdf/sessions/architecto/rooms/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/pdf/sessions/architecto/rooms/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/pdf/sessions/{sessionId}/rooms/{roomId}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sessionId   string     

Example: architecto

roomId   string     

Example: architecto

GET api/v1/pdf/sessions/{sessionId}/groups/{groupId}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/pdf/sessions/architecto/groups/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/pdf/sessions/architecto/groups/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/pdf/sessions/architecto/groups/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/pdf/sessions/{sessionId}/groups/{groupId}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sessionId   string     

Example: architecto

groupId   string     

Example: architecto

GET api/v1/pdf/sessions/{sessionId}/weekly

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/pdf/sessions/architecto/weekly" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"week_start\": \"2026-04-05T18:47:38\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/pdf/sessions/architecto/weekly"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "week_start": "2026-04-05T18:47:38"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/pdf/sessions/architecto/weekly';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'week_start' => '2026-04-05T18:47:38',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/pdf/sessions/{sessionId}/weekly

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sessionId   string     

Example: architecto

Body Parameters

week_start   string     

Must be a valid date. Example: 2026-04-05T18:47:38

GET api/v1/pdf/sessions/{sessionId}/monthly

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/pdf/sessions/architecto/monthly" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"year\": 1,
    \"month\": 4
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/pdf/sessions/architecto/monthly"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "year": 1,
    "month": 4
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/pdf/sessions/architecto/monthly';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'year' => 1,
            'month' => 4,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/pdf/sessions/{sessionId}/monthly

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

sessionId   string     

Example: architecto

Body Parameters

year   integer     

Must be at least 2020. Must not be greater than 2100. Example: 1

month   integer     

Must be at least 1. Must not be greater than 12. Example: 4

Display a listing of planning profiles.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/planning-profiles" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/planning-profiles"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/planning-profiles';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: cfa28024-142e-4fef-a01c-d2bdd18171d3
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/planning-profiles

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created planning profile.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/planning-profiles" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"slug\": \"n\",
    \"description\": \"Animi quos velit et fugiat.\",
    \"profile_type\": \"role\",
    \"priority\": 1,
    \"is_default\": false,
    \"is_active\": true,
    \"applies_to_new_entities\": true,
    \"notes\": \"l\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/planning-profiles"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "slug": "n",
    "description": "Animi quos velit et fugiat.",
    "profile_type": "role",
    "priority": 1,
    "is_default": false,
    "is_active": true,
    "applies_to_new_entities": true,
    "notes": "l"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/planning-profiles';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'slug' => 'n',
            'description' => 'Animi quos velit et fugiat.',
            'profile_type' => 'role',
            'priority' => 1,
            'is_default' => false,
            'is_active' => true,
            'applies_to_new_entities' => true,
            'notes' => 'l',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/planning-profiles

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

slug   string  optional    

Must not be greater than 255 characters. Example: n

description   string  optional    

Must not be greater than 1000 characters. Example: Animi quos velit et fugiat.

profile_type   string     

Example: role

Must be one of:
  • global
  • department
  • role
  • individual
priority   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 1

scheduling_rules   object  optional    
room_preferences   object  optional    
optimization_preset_id   string  optional    

The id of an existing record in the optimization_presets table.

is_default   boolean  optional    

Example: false

is_active   boolean  optional    

Example: true

applies_to_new_entities   boolean  optional    

Example: true

notes   string  optional    

Must not be greater than 2000 characters. Example: l

Display the specified planning profile.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/planning-profiles/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/planning-profiles/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/planning-profiles/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 65bf58c7-7803-430d-81ce-2965b51dbb36
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/planning-profiles/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the planning profile. Example: 16

Update the specified planning profile.

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/planning-profiles/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Et animi quos velit et fugiat.\",
    \"profile_type\": \"global\",
    \"priority\": 1,
    \"is_default\": true,
    \"is_active\": false,
    \"applies_to_new_entities\": true,
    \"notes\": \"l\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/planning-profiles/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "description": "Et animi quos velit et fugiat.",
    "profile_type": "global",
    "priority": 1,
    "is_default": true,
    "is_active": false,
    "applies_to_new_entities": true,
    "notes": "l"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/planning-profiles/16';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'description' => 'Et animi quos velit et fugiat.',
            'profile_type' => 'global',
            'priority' => 1,
            'is_default' => true,
            'is_active' => false,
            'applies_to_new_entities' => true,
            'notes' => 'l',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/planning-profiles/{id}

PATCH api/v1/planning-profiles/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the planning profile. Example: 16

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Must not be greater than 1000 characters. Example: Et animi quos velit et fugiat.

profile_type   string  optional    

Example: global

Must be one of:
  • global
  • department
  • role
  • individual
priority   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 1

scheduling_rules   object  optional    
room_preferences   object  optional    
optimization_preset_id   string  optional    

The id of an existing record in the optimization_presets table.

is_default   boolean  optional    

Example: true

is_active   boolean  optional    

Example: false

applies_to_new_entities   boolean  optional    

Example: true

notes   string  optional    

Must not be greater than 2000 characters. Example: l

Remove the specified planning profile.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/planning-profiles/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/planning-profiles/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/planning-profiles/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/planning-profiles/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the planning profile. Example: 16

Assign a profile to an entity.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/planning-profiles/16/assign" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"entity_type\": \"architecto\",
    \"entity_id\": 16,
    \"is_primary\": true,
    \"active_from\": \"2026-04-05T18:47:38\",
    \"active_until\": \"2052-04-28\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/planning-profiles/16/assign"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "entity_type": "architecto",
    "entity_id": 16,
    "is_primary": true,
    "active_from": "2026-04-05T18:47:38",
    "active_until": "2052-04-28"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/planning-profiles/16/assign';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'entity_type' => 'architecto',
            'entity_id' => 16,
            'is_primary' => true,
            'active_from' => '2026-04-05T18:47:38',
            'active_until' => '2052-04-28',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/planning-profiles/{profile_id}/assign

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

profile_id   integer     

The ID of the profile. Example: 16

Body Parameters

entity_type   string     

Example: architecto

entity_id   integer     

Example: 16

overrides   object  optional    
is_primary   boolean  optional    

Example: true

active_from   string  optional    

Must be a valid date. Example: 2026-04-05T18:47:38

active_until   string  optional    

Must be a valid date. Must be a date after or equal to active_from. Example: 2052-04-28

Unassign a profile from an entity.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/planning-profiles/16/unassign/architecto/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/planning-profiles/16/unassign/architecto/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/planning-profiles/16/unassign/architecto/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/planning-profiles/{profile_id}/unassign/{entityType}/{entityId}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

profile_id   integer     

The ID of the profile. Example: 16

entityType   string     

Example: architecto

entityId   string     

Example: architecto

Resolve the applicable profile for an entity.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/planning-profiles/resolve/architecto/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/planning-profiles/resolve/architecto/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/planning-profiles/resolve/architecto/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 46c04ec3-600a-4f42-9438-1d7896f8ebd6
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/planning-profiles/resolve/{entityType}/{entityId}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entityType   string     

Example: architecto

entityId   string     

Example: architecto

Get effective rules for an entity.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/planning-profiles/effective-rules/architecto/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/planning-profiles/effective-rules/architecto/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/planning-profiles/effective-rules/architecto/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 266ae0c3-bec2-48a1-b200-35abb516f7b3
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/planning-profiles/effective-rules/{entityType}/{entityId}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entityType   string     

Example: architecto

entityId   string     

Example: architecto

Clone a profile.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/planning-profiles/16/clone" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"new_name\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/planning-profiles/16/clone"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "new_name": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/planning-profiles/16/clone';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'new_name' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/planning-profiles/{profile_id}/clone

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

profile_id   integer     

The ID of the profile. Example: 16

Body Parameters

new_name   string     

Must not be greater than 255 characters. Example: b

Get unread entries for the authenticated user.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/read-confirmations/unread" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/read-confirmations/unread"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/read-confirmations/unread';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: af00c11e-48f3-4acb-9ac9-45bbf7ca5d93
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/read-confirmations/unread

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get unread count for the authenticated user.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/read-confirmations/unread/count" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/read-confirmations/unread/count"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/read-confirmations/unread/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 82e8113b-0ab7-4f5f-8fc9-00c8d11ec5b3
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/read-confirmations/unread/count

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get read statistics for the authenticated user.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/read-confirmations/stats" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/read-confirmations/stats"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/read-confirmations/stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 5fee6eca-937e-4d8c-b3aa-111f426714c5
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/read-confirmations/stats

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get read history for the authenticated user.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/read-confirmations/history" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/read-confirmations/history"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/read-confirmations/history';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: dea4fc72-8ae6-4ef7-ac6c-e484ee5bd97e
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/read-confirmations/history

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get entries needing reminder for authenticated user.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/read-confirmations/needing-reminder" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/read-confirmations/needing-reminder"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/read-confirmations/needing-reminder';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 95800187-443a-42b4-98da-05c00e35c6e5
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/read-confirmations/needing-reminder

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Bulk confirm reading of multiple entries.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/read-confirmations/bulk" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"entry_ids\": [
        16
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/read-confirmations/bulk"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "entry_ids": [
        16
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/read-confirmations/bulk';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'entry_ids' => [
                16,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/read-confirmations/bulk

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

entry_ids   integer[]  optional    

The id of an existing record in the schedule_entries table.

Confirm reading of a schedule entry.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/entries/1/confirm-read" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries/1/confirm-read"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries/1/confirm-read';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/entries/{entry_id}/confirm-read

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry_id   integer     

The ID of the entry. Example: 1

Check if the authenticated user has read an entry.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/entries/1/read-status" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries/1/read-status"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries/1/read-status';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a0962132-5572-4d89-b4b0-3c690dfc9761
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/entries/{entry_id}/read-status

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry_id   integer     

The ID of the entry. Example: 1

Get read statistics for a specific entry.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/entries/1/read-stats" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries/1/read-stats"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries/1/read-stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 6e511d2e-1ab5-4d62-8438-f46ae1ae4d5b
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/entries/{entry_id}/read-stats

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry_id   integer     

The ID of the entry. Example: 1

Get users who have not read a specific entry.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/entries/1/unread-users" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries/1/unread-users"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries/1/unread-users';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a5f1640b-f290-461f-91c3-7e698cb1e12b
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/entries/{entry_id}/unread-users

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry_id   integer     

The ID of the entry. Example: 1

GET api/v1/reports/types

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/reports/types" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/reports/types"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/reports/types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/reports/types

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/reports/teacher-workload

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/reports/teacher-workload" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/reports/teacher-workload"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/reports/teacher-workload';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/reports/teacher-workload

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/reports/room-utilization

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/reports/room-utilization" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/reports/room-utilization"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/reports/room-utilization';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/reports/room-utilization

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/reports/group-schedule/{groupId}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/reports/group-schedule/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/reports/group-schedule/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/reports/group-schedule/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/reports/group-schedule/{groupId}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

groupId   string     

Example: architecto

GET api/v1/reports/conflicts

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/reports/conflicts" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/reports/conflicts"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/reports/conflicts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/reports/conflicts

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/reports/coverage

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/reports/coverage" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/reports/coverage"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/reports/coverage';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/reports/coverage

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display a listing of rooms.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/rooms" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/rooms"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: b9126092-7b5f-48c5-8db4-263881f73924
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/rooms

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get room statistics.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/rooms/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/rooms/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 1299ffb2-13f2-4148-bd9a-e96b70d6d2b7
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/rooms/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get available room types.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/rooms/types" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/rooms/types"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 8cec4101-160c-422f-b90c-95db8c1de4a6
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/rooms/types

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display the specified room.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/rooms/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/rooms/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 13ad063a-fc9f-452a-983e-e87729af2c42
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/rooms/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the room. Example: 1

Remove the specified room.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/rooms/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/rooms/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/rooms/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the room. Example: 1

Activate a room.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/rooms/1/activate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/rooms/1/activate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/1/activate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/rooms/{room_id}/activate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   integer     

The ID of the room. Example: 1

Deactivate a room.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/rooms/1/deactivate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/rooms/1/deactivate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/1/deactivate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/rooms/{room_id}/deactivate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   integer     

The ID of the room. Example: 1

Get room availability.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/rooms/1/availability" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/rooms/1/availability"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/1/availability';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: ec0e35ae-f725-402e-b85a-c6d92d7d3d21
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/rooms/{room_id}/availability

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   integer     

The ID of the room. Example: 1

Update room availability.

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/rooms/1/availability" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"availability\": []
}"
const url = new URL(
    "https://creation_horaire.test/api/rooms/1/availability"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "availability": []
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/1/availability';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'availability' => [],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/rooms/{room_id}/availability

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   integer     

The ID of the room. Example: 1

Body Parameters

availability   object     
monday   object  optional    
tuesday   object  optional    
wednesday   object  optional    
thursday   object  optional    
friday   object  optional    
saturday   object  optional    
sunday   object  optional    

Check if room is available for a specific time slot.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/rooms/1/check-availability" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_time\": \"2026-04-05T18:47:38\",
    \"end_time\": \"2052-04-28\"
}"
const url = new URL(
    "https://creation_horaire.test/api/rooms/1/check-availability"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start_time": "2026-04-05T18:47:38",
    "end_time": "2052-04-28"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/1/check-availability';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'start_time' => '2026-04-05T18:47:38',
            'end_time' => '2052-04-28',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/rooms/{room_id}/check-availability

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   integer     

The ID of the room. Example: 1

Body Parameters

start_time   string     

Must be a valid date. Example: 2026-04-05T18:47:38

end_time   string     

Must be a valid date. Must be a date after start_time. Example: 2052-04-28

Get equipment list for a room.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/rooms/1/equipment" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/rooms/1/equipment"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/1/equipment';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a6b7c218-b039-48dc-87c6-c6a44d30eeb9
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/rooms/{room_id}/equipment

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   integer     

The ID of the room. Example: 1

Add equipment to a room.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/rooms/1/equipment" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"equipment\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/rooms/1/equipment"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "equipment": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/1/equipment';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'equipment' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/rooms/{room_id}/equipment

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   integer     

The ID of the room. Example: 1

Body Parameters

equipment   string     

Must not be greater than 100 characters. Example: b

Remove equipment from a room.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/rooms/1/equipment/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/rooms/1/equipment/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/1/equipment/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/rooms/{room_id}/equipment/{equipment}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   integer     

The ID of the room. Example: 1

equipment   string     

The equipment. Example: architecto

Get room schedule entries.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/rooms/1/schedule" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2026-04-05T18:47:38\",
    \"end_date\": \"2052-04-28\",
    \"session_id\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/rooms/1/schedule"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start_date": "2026-04-05T18:47:38",
    "end_date": "2052-04-28",
    "session_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/rooms/1/schedule';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'start_date' => '2026-04-05T18:47:38',
            'end_date' => '2052-04-28',
            'session_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 622d9fd8-ca66-4ec1-9ac7-64e3d4e0302f
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/rooms/{room_id}/schedule

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   integer     

The ID of the room. Example: 1

Body Parameters

start_date   string  optional    

Must be a valid date. Example: 2026-04-05T18:47:38

end_date   string  optional    

Must be a valid date. Must be a date after or equal to start_date. Example: 2052-04-28

session_id   integer  optional    

The id of an existing record in the sessions table. Example: 16

GET api/schedule-requests

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/schedule-requests" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/schedule-requests"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/schedule-requests';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: fd005d7a-748c-4dcf-9a42-b57ca987f502
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/schedule-requests

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/schedule-requests

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/schedule-requests" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"architecto\",
    \"title\": \"n\",
    \"description\": \"Animi quos velit et fugiat.\",
    \"source_entry_id\": 16,
    \"target_entry_id\": 16,
    \"target_teacher_id\": 16,
    \"start_date\": \"2026-04-05T18:47:38\",
    \"end_date\": \"2052-04-28\",
    \"priority\": \"normal\",
    \"is_urgent\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/schedule-requests"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "architecto",
    "title": "n",
    "description": "Animi quos velit et fugiat.",
    "source_entry_id": 16,
    "target_entry_id": 16,
    "target_teacher_id": 16,
    "start_date": "2026-04-05T18:47:38",
    "end_date": "2052-04-28",
    "priority": "normal",
    "is_urgent": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/schedule-requests';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'type' => 'architecto',
            'title' => 'n',
            'description' => 'Animi quos velit et fugiat.',
            'source_entry_id' => 16,
            'target_entry_id' => 16,
            'target_teacher_id' => 16,
            'start_date' => '2026-04-05T18:47:38',
            'end_date' => '2052-04-28',
            'priority' => 'normal',
            'is_urgent' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/schedule-requests

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

type   string     

Example: architecto

Must be one of:
  • swap
  • time_off
  • coverage
  • preference_change
  • schedule_change
title   string     

Must not be greater than 255 characters. Example: n

description   string  optional    

Must not be greater than 2000 characters. Example: Animi quos velit et fugiat.

source_entry_id   integer  optional    

The id of an existing record in the schedule_entries table. Example: 16

target_entry_id   integer  optional    

The id of an existing record in the schedule_entries table. Example: 16

target_teacher_id   integer  optional    

The id of an existing record in the teachers table. Example: 16

start_date   string  optional    

Must be a valid date. Example: 2026-04-05T18:47:38

end_date   string  optional    

Must be a valid date. Must be a date after or equal to start_date. Example: 2052-04-28

priority   string  optional    

Example: normal

Must be one of:
  • low
  • normal
  • high
  • urgent
is_urgent   boolean  optional    

Example: true

GET api/schedule-requests/my-requests

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/schedule-requests/my-requests" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/schedule-requests/my-requests"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/schedule-requests/my-requests';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 4129731c-99de-45a8-a3dd-fe58c456a79d
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/schedule-requests/my-requests

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/schedule-requests/target-requests

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/schedule-requests/target-requests" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/schedule-requests/target-requests"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/schedule-requests/target-requests';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 2d50bb7a-6a42-4f1a-81f9-01650ce0e23a
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/schedule-requests/target-requests

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/schedule-requests/pending

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/schedule-requests/pending" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/schedule-requests/pending"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/schedule-requests/pending';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 563d27df-a7e0-4b3f-82a0-ebfb365f0124
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/schedule-requests/pending

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/schedule-requests/stats

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/schedule-requests/stats" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/schedule-requests/stats"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/schedule-requests/stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 74753b71-4c54-47b2-b0c2-e1836197f185
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/schedule-requests/stats

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/schedule-requests/{scheduleRequest_id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/schedule-requests/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/schedule-requests/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/schedule-requests/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: e97c7a08-d676-4743-9847-832cd9f77ae7
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/schedule-requests/{scheduleRequest_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

scheduleRequest_id   integer     

The ID of the scheduleRequest. Example: 16

POST api/schedule-requests/{scheduleRequest_id}/process

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/schedule-requests/16/process" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"approve\",
    \"reason\": \"b\",
    \"notes\": \"n\"
}"
const url = new URL(
    "https://creation_horaire.test/api/schedule-requests/16/process"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "action": "approve",
    "reason": "b",
    "notes": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/schedule-requests/16/process';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'action' => 'approve',
            'reason' => 'b',
            'notes' => 'n',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/schedule-requests/{scheduleRequest_id}/process

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

scheduleRequest_id   integer     

The ID of the scheduleRequest. Example: 16

Body Parameters

action   string     

Example: approve

Must be one of:
  • approve
  • reject
reason   string  optional    

Must not be greater than 1000 characters. Example: b

notes   string  optional    

Must not be greater than 2000 characters. Example: n

POST api/schedule-requests/{scheduleRequest_id}/withdraw

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/schedule-requests/16/withdraw" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/schedule-requests/16/withdraw"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/schedule-requests/16/withdraw';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'reason' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/schedule-requests/{scheduleRequest_id}/withdraw

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

scheduleRequest_id   integer     

The ID of the scheduleRequest. Example: 16

Body Parameters

reason   string  optional    

Must not be greater than 1000 characters. Example: b

POST api/schedule-requests/{scheduleRequest_id}/cancel

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/schedule-requests/16/cancel" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/schedule-requests/16/cancel"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/schedule-requests/16/cancel';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'reason' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/schedule-requests/{scheduleRequest_id}/cancel

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

scheduleRequest_id   integer     

The ID of the scheduleRequest. Example: 16

Body Parameters

reason   string  optional    

Must not be greater than 1000 characters. Example: b

POST api/schedule-requests/{scheduleRequest_id}/respond-swap

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/schedule-requests/16/respond-swap" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"accept\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/schedule-requests/16/respond-swap"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "accept": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/schedule-requests/16/respond-swap';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'accept' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/schedule-requests/{scheduleRequest_id}/respond-swap

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

scheduleRequest_id   integer     

The ID of the scheduleRequest. Example: 16

Body Parameters

accept   boolean     

Example: true

GET api/v1/sites

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/sites" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 63153dce-b104-4b0e-9a51-158e6cc16be4
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/sites

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/sites

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sites" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"code\": \"ngzmiyvdljnikhwa\",
    \"description\": \"Eius et animi quos velit et.\",
    \"address\": \"v\",
    \"city\": \"d\",
    \"postal_code\": \"ljnikhwaykcmyuwp\",
    \"country\": \"w\",
    \"latitude\": -89,
    \"longitude\": -179,
    \"color\": \"#fEEeDb\",
    \"is_main\": false,
    \"is_active\": true,
    \"notes\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "code": "ngzmiyvdljnikhwa",
    "description": "Eius et animi quos velit et.",
    "address": "v",
    "city": "d",
    "postal_code": "ljnikhwaykcmyuwp",
    "country": "w",
    "latitude": -89,
    "longitude": -179,
    "color": "#fEEeDb",
    "is_main": false,
    "is_active": true,
    "notes": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'code' => 'ngzmiyvdljnikhwa',
            'description' => 'Eius et animi quos velit et.',
            'address' => 'v',
            'city' => 'd',
            'postal_code' => 'ljnikhwaykcmyuwp',
            'country' => 'w',
            'latitude' => -89,
            'longitude' => -179,
            'color' => '#fEEeDb',
            'is_main' => false,
            'is_active' => true,
            'notes' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/sites

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

code   string  optional    

Must not be greater than 20 characters. Example: ngzmiyvdljnikhwa

description   string  optional    

Example: Eius et animi quos velit et.

address   string  optional    

Must not be greater than 255 characters. Example: v

city   string  optional    

Must not be greater than 255 characters. Example: d

postal_code   string  optional    

Must not be greater than 20 characters. Example: ljnikhwaykcmyuwp

country   string  optional    

Must not be greater than 255 characters. Example: w

latitude   number  optional    

Must be between -90 and 90. Example: -89

longitude   number  optional    

Must be between -180 and 180. Example: -179

color   string  optional    

Must match the regex /^#[0-9A-Fa-f]{6}$/. Example: #fEEeDb

is_main   boolean  optional    

Example: false

is_active   boolean  optional    

Example: true

custom_attributes   object  optional    
notes   string  optional    

Example: architecto

GET api/v1/sites/all

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/sites/all" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/all"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/all';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 95a83612-562d-4b18-a10e-a3e3fd08e22e
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/sites/all

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/sites/main

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/sites/main" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/main"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/main';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 6e980ce8-784a-40a2-bb1a-596f7f8b9d40
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/sites/main

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/sites/statistics

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/sites/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: b31b8286-7625-4cec-b659-22cddb1899bc
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/sites/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/sites/travel-time

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/sites/travel-time" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"from_site_id\": \"architecto\",
    \"to_site_id\": \"architecto\",
    \"transport_mode\": \"walk\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/travel-time"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "from_site_id": "architecto",
    "to_site_id": "architecto",
    "transport_mode": "walk"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/travel-time';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'from_site_id' => 'architecto',
            'to_site_id' => 'architecto',
            'transport_mode' => 'walk',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 17884bc1-a9f5-4e03-8d8f-7b6abfb3d5a1
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/sites/travel-time

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

from_site_id   string     

The id of an existing record in the sites table. Example: architecto

to_site_id   string     

The id of an existing record in the sites table. Example: architecto

transport_mode   string  optional    

Example: walk

Must be one of:
  • car
  • walk
  • transit
  • bike

POST api/v1/sites/calculate-distances

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sites/calculate-distances" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/calculate-distances"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/calculate-distances';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/sites/calculate-distances

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/sites/{site_id}

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/sites/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 1deeabe3-c2c3-40a5-9aa1-6fcfce40a14d
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/sites/{site_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

site_id   integer     

The ID of the site. Example: 1

PUT api/v1/sites/{site_id}

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/sites/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"code\": \"ngzmiyvdljnikhwa\",
    \"description\": \"Eius et animi quos velit et.\",
    \"address\": \"v\",
    \"city\": \"d\",
    \"postal_code\": \"ljnikhwaykcmyuwp\",
    \"country\": \"w\",
    \"latitude\": -89,
    \"longitude\": -179,
    \"color\": \"#fEEeDb\",
    \"is_main\": false,
    \"is_active\": true,
    \"notes\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "code": "ngzmiyvdljnikhwa",
    "description": "Eius et animi quos velit et.",
    "address": "v",
    "city": "d",
    "postal_code": "ljnikhwaykcmyuwp",
    "country": "w",
    "latitude": -89,
    "longitude": -179,
    "color": "#fEEeDb",
    "is_main": false,
    "is_active": true,
    "notes": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'code' => 'ngzmiyvdljnikhwa',
            'description' => 'Eius et animi quos velit et.',
            'address' => 'v',
            'city' => 'd',
            'postal_code' => 'ljnikhwaykcmyuwp',
            'country' => 'w',
            'latitude' => -89,
            'longitude' => -179,
            'color' => '#fEEeDb',
            'is_main' => false,
            'is_active' => true,
            'notes' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/sites/{site_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

site_id   integer     

The ID of the site. Example: 1

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

code   string  optional    

Must not be greater than 20 characters. Example: ngzmiyvdljnikhwa

description   string  optional    

Example: Eius et animi quos velit et.

address   string  optional    

Must not be greater than 255 characters. Example: v

city   string  optional    

Must not be greater than 255 characters. Example: d

postal_code   string  optional    

Must not be greater than 20 characters. Example: ljnikhwaykcmyuwp

country   string  optional    

Must not be greater than 255 characters. Example: w

latitude   number  optional    

Must be between -90 and 90. Example: -89

longitude   number  optional    

Must be between -180 and 180. Example: -179

color   string  optional    

Must match the regex /^#[0-9A-Fa-f]{6}$/. Example: #fEEeDb

is_main   boolean  optional    

Example: false

is_active   boolean  optional    

Example: true

custom_attributes   object  optional    
notes   string  optional    

Example: architecto

DELETE api/v1/sites/{site_id}

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/sites/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/sites/{site_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

site_id   integer     

The ID of the site. Example: 1

POST api/v1/sites/{site_id}/set-main

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sites/1/set-main" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/1/set-main"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/1/set-main';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/sites/{site_id}/set-main

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

site_id   integer     

The ID of the site. Example: 1

GET api/v1/sites/{site_id}/distances

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/sites/1/distances" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/1/distances"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/1/distances';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 8d1596f9-97b9-46a1-9753-22f62ae0bacc
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/sites/{site_id}/distances

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

site_id   integer     

The ID of the site. Example: 1

POST api/v1/sites/{site_id}/distances

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sites/1/distances" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"to_site_id\": \"architecto\",
    \"distance_km\": 39,
    \"travel_time_minutes\": 84,
    \"transport_mode\": \"car\",
    \"bidirectional\": false
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/1/distances"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "to_site_id": "architecto",
    "distance_km": 39,
    "travel_time_minutes": 84,
    "transport_mode": "car",
    "bidirectional": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/1/distances';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'to_site_id' => 'architecto',
            'distance_km' => 39,
            'travel_time_minutes' => 84,
            'transport_mode' => 'car',
            'bidirectional' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/sites/{site_id}/distances

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

site_id   integer     

The ID of the site. Example: 1

Body Parameters

to_site_id   string     

The id of an existing record in the sites table. Example: architecto

distance_km   number     

Must be at least 0. Example: 39

travel_time_minutes   integer     

Must be at least 0. Example: 84

transport_mode   string  optional    

Example: car

Must be one of:
  • car
  • walk
  • transit
  • bike
bidirectional   boolean  optional    

Example: false

POST api/v1/sites/{site_id}/restore

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sites/1/restore" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sites/1/restore"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sites/1/restore';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/sites/{site_id}/restore

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

site_id   integer     

The ID of the site. Example: 1

List wellbeing profiles.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/staff-wellbeing/profiles" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/staff-wellbeing/profiles"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/staff-wellbeing/profiles';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 5c085478-76e2-4b93-8687-6952d6610400
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/staff-wellbeing/profiles

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Show a specific profile.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/staff-wellbeing/profiles/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/staff-wellbeing/profiles/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/staff-wellbeing/profiles/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: b04c2509-2642-445c-94cc-d4128fefa851
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/staff-wellbeing/profiles/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the profile. Example: 16

Store a new profile.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/staff-wellbeing/profiles" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"teacher_id\": 16,
    \"max_early_starts_per_week\": 2,
    \"early_start_time\": \"18:47\",
    \"max_late_ends_per_week\": 2,
    \"late_end_time\": \"18:47\",
    \"preferred_work_pattern\": \"spread\",
    \"preferred_consecutive_days\": 1,
    \"max_different_sites_per_day\": 2,
    \"preferred_site_id\": 16,
    \"max_commute_minutes\": 22,
    \"require_mental_health_breaks\": true,
    \"min_break_between_classes\": 7,
    \"max_back_to_back_classes\": 6,
    \"lunch_break_required\": false,
    \"lunch_window_start\": \"18:47\",
    \"lunch_window_end\": \"2052-04-28\",
    \"min_lunch_duration\": 22,
    \"avoid_split_days\": true,
    \"max_gap_for_split_day\": 7,
    \"is_active\": false,
    \"notes\": \"z\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/staff-wellbeing/profiles"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "teacher_id": 16,
    "max_early_starts_per_week": 2,
    "early_start_time": "18:47",
    "max_late_ends_per_week": 2,
    "late_end_time": "18:47",
    "preferred_work_pattern": "spread",
    "preferred_consecutive_days": 1,
    "max_different_sites_per_day": 2,
    "preferred_site_id": 16,
    "max_commute_minutes": 22,
    "require_mental_health_breaks": true,
    "min_break_between_classes": 7,
    "max_back_to_back_classes": 6,
    "lunch_break_required": false,
    "lunch_window_start": "18:47",
    "lunch_window_end": "2052-04-28",
    "min_lunch_duration": 22,
    "avoid_split_days": true,
    "max_gap_for_split_day": 7,
    "is_active": false,
    "notes": "z"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/staff-wellbeing/profiles';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'teacher_id' => 16,
            'max_early_starts_per_week' => 2,
            'early_start_time' => '18:47',
            'max_late_ends_per_week' => 2,
            'late_end_time' => '18:47',
            'preferred_work_pattern' => 'spread',
            'preferred_consecutive_days' => 1,
            'max_different_sites_per_day' => 2,
            'preferred_site_id' => 16,
            'max_commute_minutes' => 22,
            'require_mental_health_breaks' => true,
            'min_break_between_classes' => 7,
            'max_back_to_back_classes' => 6,
            'lunch_break_required' => false,
            'lunch_window_start' => '18:47',
            'lunch_window_end' => '2052-04-28',
            'min_lunch_duration' => 22,
            'avoid_split_days' => true,
            'max_gap_for_split_day' => 7,
            'is_active' => false,
            'notes' => 'z',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/staff-wellbeing/profiles

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

teacher_id   integer     

The id of an existing record in the teachers table. Example: 16

max_early_starts_per_week   integer  optional    

Must be at least 0. Must not be greater than 5. Example: 2

early_start_time   string  optional    

Must be a valid date in the format H:i. Example: 18:47

max_late_ends_per_week   integer  optional    

Must be at least 0. Must not be greater than 5. Example: 2

late_end_time   string  optional    

Must be a valid date in the format H:i. Example: 18:47

preferred_work_pattern   string  optional    

Example: spread

Must be one of:
  • compact
  • spread
  • mixed
preferred_consecutive_days   integer  optional    

Must be at least 1. Must not be greater than 5. Example: 1

max_different_sites_per_day   integer  optional    

Must be at least 1. Must not be greater than 5. Example: 2

preferred_site_id   integer  optional    

The id of an existing record in the sites table. Example: 16

max_commute_minutes   integer  optional    

Must be at least 0. Must not be greater than 180. Example: 22

require_mental_health_breaks   boolean  optional    

Example: true

min_break_between_classes   integer  optional    

Must be at least 5. Must not be greater than 60. Example: 7

max_back_to_back_classes   integer  optional    

Must be at least 1. Must not be greater than 6. Example: 6

lunch_break_required   boolean  optional    

Example: false

lunch_window_start   string  optional    

Must be a valid date in the format H:i. Example: 18:47

lunch_window_end   string  optional    

Must be a valid date in the format H:i. Must be a date after lunch_window_start. Example: 2052-04-28

min_lunch_duration   integer  optional    

Must be at least 15. Must not be greater than 90. Example: 22

avoid_split_days   boolean  optional    

Example: true

max_gap_for_split_day   integer  optional    

Must be at least 30. Must not be greater than 300. Example: 7

is_active   boolean  optional    

Example: false

notes   string  optional    

Must not be greater than 1000 characters. Example: z

Update a profile.

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/staff-wellbeing/profiles/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"max_early_starts_per_week\": 1,
    \"early_start_time\": \"18:47\",
    \"max_late_ends_per_week\": 2,
    \"late_end_time\": \"18:47\",
    \"preferred_work_pattern\": \"mixed\",
    \"preferred_consecutive_days\": 2,
    \"max_different_sites_per_day\": 1,
    \"preferred_site_id\": 16,
    \"max_commute_minutes\": 22,
    \"require_mental_health_breaks\": true,
    \"min_break_between_classes\": 7,
    \"max_back_to_back_classes\": 6,
    \"lunch_break_required\": false,
    \"lunch_window_start\": \"18:47\",
    \"lunch_window_end\": \"18:47\",
    \"min_lunch_duration\": 17,
    \"avoid_split_days\": true,
    \"max_gap_for_split_day\": 15,
    \"is_active\": false,
    \"notes\": \"y\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/staff-wellbeing/profiles/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "max_early_starts_per_week": 1,
    "early_start_time": "18:47",
    "max_late_ends_per_week": 2,
    "late_end_time": "18:47",
    "preferred_work_pattern": "mixed",
    "preferred_consecutive_days": 2,
    "max_different_sites_per_day": 1,
    "preferred_site_id": 16,
    "max_commute_minutes": 22,
    "require_mental_health_breaks": true,
    "min_break_between_classes": 7,
    "max_back_to_back_classes": 6,
    "lunch_break_required": false,
    "lunch_window_start": "18:47",
    "lunch_window_end": "18:47",
    "min_lunch_duration": 17,
    "avoid_split_days": true,
    "max_gap_for_split_day": 15,
    "is_active": false,
    "notes": "y"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/staff-wellbeing/profiles/16';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'max_early_starts_per_week' => 1,
            'early_start_time' => '18:47',
            'max_late_ends_per_week' => 2,
            'late_end_time' => '18:47',
            'preferred_work_pattern' => 'mixed',
            'preferred_consecutive_days' => 2,
            'max_different_sites_per_day' => 1,
            'preferred_site_id' => 16,
            'max_commute_minutes' => 22,
            'require_mental_health_breaks' => true,
            'min_break_between_classes' => 7,
            'max_back_to_back_classes' => 6,
            'lunch_break_required' => false,
            'lunch_window_start' => '18:47',
            'lunch_window_end' => '18:47',
            'min_lunch_duration' => 17,
            'avoid_split_days' => true,
            'max_gap_for_split_day' => 15,
            'is_active' => false,
            'notes' => 'y',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/staff-wellbeing/profiles/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the profile. Example: 16

Body Parameters

max_early_starts_per_week   integer  optional    

Must be at least 0. Must not be greater than 5. Example: 1

early_start_time   string  optional    

Must be a valid date in the format H:i. Example: 18:47

max_late_ends_per_week   integer  optional    

Must be at least 0. Must not be greater than 5. Example: 2

late_end_time   string  optional    

Must be a valid date in the format H:i. Example: 18:47

preferred_work_pattern   string  optional    

Example: mixed

Must be one of:
  • compact
  • spread
  • mixed
preferred_consecutive_days   integer  optional    

Must be at least 1. Must not be greater than 5. Example: 2

max_different_sites_per_day   integer  optional    

Must be at least 1. Must not be greater than 5. Example: 1

preferred_site_id   integer  optional    

The id of an existing record in the sites table. Example: 16

max_commute_minutes   integer  optional    

Must be at least 0. Must not be greater than 180. Example: 22

require_mental_health_breaks   boolean  optional    

Example: true

min_break_between_classes   integer  optional    

Must be at least 5. Must not be greater than 60. Example: 7

max_back_to_back_classes   integer  optional    

Must be at least 1. Must not be greater than 6. Example: 6

lunch_break_required   boolean  optional    

Example: false

lunch_window_start   string  optional    

Must be a valid date in the format H:i. Example: 18:47

lunch_window_end   string  optional    

Must be a valid date in the format H:i. Example: 18:47

min_lunch_duration   integer  optional    

Must be at least 15. Must not be greater than 90. Example: 17

avoid_split_days   boolean  optional    

Example: true

max_gap_for_split_day   integer  optional    

Must be at least 30. Must not be greater than 300. Example: 15

is_active   boolean  optional    

Example: false

notes   string  optional    

Must not be greater than 1000 characters. Example: y

Delete a profile.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/staff-wellbeing/profiles/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/staff-wellbeing/profiles/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/staff-wellbeing/profiles/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/staff-wellbeing/profiles/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the profile. Example: 16

Get or create wellbeing profile for a teacher.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/staff-wellbeing/teacher/1/profile" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/staff-wellbeing/teacher/1/profile"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/staff-wellbeing/teacher/1/profile';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 90c088ba-bd02-4049-8d1c-8c58c049e5ad
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/staff-wellbeing/teacher/{teacher_id}/profile

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

Analyze a teacher's schedule for wellbeing metrics.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/staff-wellbeing/teacher/1/session/1/analysis" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/staff-wellbeing/teacher/1/session/1/analysis"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/staff-wellbeing/teacher/1/session/1/analysis';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: ebcf384f-1997-44f6-990a-423ca19a8247
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/staff-wellbeing/teacher/{teacher_id}/session/{session_id}/analysis

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

session_id   integer     

The ID of the session. Example: 1

Get recommendations for improving a teacher's wellbeing.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/staff-wellbeing/teacher/1/session/1/recommendations" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/staff-wellbeing/teacher/1/session/1/recommendations"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/staff-wellbeing/teacher/1/session/1/recommendations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 36c1ac41-c385-4397-8287-95fb56008c8d
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/staff-wellbeing/teacher/{teacher_id}/session/{session_id}/recommendations

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

session_id   integer     

The ID of the session. Example: 1

Get wellbeing report for an entire session.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/staff-wellbeing/session/1/report" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/staff-wellbeing/session/1/report"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/staff-wellbeing/session/1/report';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 767c450c-3c47-4b03-9bff-5cf1b25e2f75
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/staff-wellbeing/session/{session_id}/report

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

Get teachers ranked by wellbeing (worst first).

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/staff-wellbeing/session/1/ranking" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/staff-wellbeing/session/1/ranking"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/staff-wellbeing/session/1/ranking';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 551968cf-ba4e-4032-a407-da6f224f4307
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/staff-wellbeing/session/{session_id}/ranking

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

Get general statistics for the organization.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/staff-wellbeing/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/staff-wellbeing/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/staff-wellbeing/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 51895108-98b6-49cb-b9ff-b5b749cd7a61
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/staff-wellbeing/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

List student preferences.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/student-preferences/preferences?group_id=16&type=architecto&caregiver_friendly=" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/student-preferences/preferences"
);

const params = {
    "group_id": "16",
    "type": "architecto",
    "caregiver_friendly": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/student-preferences/preferences';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'group_id' => '16',
            'type' => 'architecto',
            'caregiver_friendly' => '0',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: a4065586-8511-4ca4-b98f-8b5eccc20386
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/student-preferences/preferences

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

group_id   integer  optional    

Filter by group. Example: 16

type   string  optional    

Filter by preference type. Example: architecto

caregiver_friendly   boolean  optional    

Filter by caregiver mode. Example: false

Show a specific preference.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/student-preferences/preferences/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/student-preferences/preferences/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/student-preferences/preferences/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 7ca61bb9-0461-4826-be56-6074f234f604
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/student-preferences/preferences/{preference_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

preference_id   integer     

The ID of the preference. Example: 16

Store a new preference.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/student-preferences/preferences" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"group_id\": 16,
    \"student_id\": 16,
    \"preference_type\": \"individual\",
    \"preference_weight\": 22,
    \"preferred_time_slots\": [
        16
    ],
    \"avoided_time_slots\": [
        16
    ],
    \"preferred_days\": [
        5
    ],
    \"avoided_days\": [
        1
    ],
    \"minimize_gaps\": true,
    \"max_gap_minutes\": 16,
    \"caregiver_friendly\": true,
    \"caregiver_start_after\": \"18:47\",
    \"caregiver_end_before\": \"2052-04-28\",
    \"max_hours_per_day\": 4,
    \"workload_balance\": \"back_loaded\",
    \"lunch_break_required\": false,
    \"lunch_window_start\": \"18:47\",
    \"lunch_window_end\": \"2052-04-28\",
    \"min_lunch_duration\": 22,
    \"is_active\": false,
    \"notes\": \"g\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/student-preferences/preferences"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "group_id": 16,
    "student_id": 16,
    "preference_type": "individual",
    "preference_weight": 22,
    "preferred_time_slots": [
        16
    ],
    "avoided_time_slots": [
        16
    ],
    "preferred_days": [
        5
    ],
    "avoided_days": [
        1
    ],
    "minimize_gaps": true,
    "max_gap_minutes": 16,
    "caregiver_friendly": true,
    "caregiver_start_after": "18:47",
    "caregiver_end_before": "2052-04-28",
    "max_hours_per_day": 4,
    "workload_balance": "back_loaded",
    "lunch_break_required": false,
    "lunch_window_start": "18:47",
    "lunch_window_end": "2052-04-28",
    "min_lunch_duration": 22,
    "is_active": false,
    "notes": "g"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/student-preferences/preferences';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'group_id' => 16,
            'student_id' => 16,
            'preference_type' => 'individual',
            'preference_weight' => 22,
            'preferred_time_slots' => [
                16,
            ],
            'avoided_time_slots' => [
                16,
            ],
            'preferred_days' => [
                5,
            ],
            'avoided_days' => [
                1,
            ],
            'minimize_gaps' => true,
            'max_gap_minutes' => 16,
            'caregiver_friendly' => true,
            'caregiver_start_after' => '18:47',
            'caregiver_end_before' => '2052-04-28',
            'max_hours_per_day' => 4,
            'workload_balance' => 'back_loaded',
            'lunch_break_required' => false,
            'lunch_window_start' => '18:47',
            'lunch_window_end' => '2052-04-28',
            'min_lunch_duration' => 22,
            'is_active' => false,
            'notes' => 'g',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/student-preferences/preferences

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

group_id   integer     

The id of an existing record in the groups table. Example: 16

student_id   integer  optional    

Example: 16

preference_type   string     

Example: individual

Must be one of:
  • group_wide
  • individual
preference_weight   integer     

Must be at least 0. Must not be greater than 100. Example: 22

preferred_time_slots   integer[]  optional    
avoided_time_slots   integer[]  optional    
preferred_days   integer[]  optional    

Must be at least 1. Must not be greater than 7.

avoided_days   integer[]  optional    

Must be at least 1. Must not be greater than 7.

minimize_gaps   boolean  optional    

Example: true

max_gap_minutes   integer  optional    

Must be at least 0. Must not be greater than 240. Example: 16

caregiver_friendly   boolean  optional    

Example: true

caregiver_start_after   string  optional    

Must be a valid date in the format H:i. Example: 18:47

caregiver_end_before   string  optional    

Must be a valid date in the format H:i. Must be a date after caregiver_start_after. Example: 2052-04-28

max_hours_per_day   integer  optional    

Must be at least 1. Must not be greater than 12. Example: 4

workload_balance   string  optional    

Example: back_loaded

Must be one of:
  • even
  • front_loaded
  • back_loaded
lunch_break_required   boolean  optional    

Example: false

lunch_window_start   string  optional    

Must be a valid date in the format H:i. Example: 18:47

lunch_window_end   string  optional    

Must be a valid date in the format H:i. Must be a date after lunch_window_start. Example: 2052-04-28

min_lunch_duration   integer  optional    

Must be at least 15. Must not be greater than 120. Example: 22

is_active   boolean  optional    

Example: false

notes   string  optional    

Must not be greater than 1000 characters. Example: g

Update a preference.

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/student-preferences/preferences/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"preference_weight\": 1,
    \"preferred_time_slots\": [
        16
    ],
    \"avoided_time_slots\": [
        16
    ],
    \"preferred_days\": [
        5
    ],
    \"avoided_days\": [
        1
    ],
    \"minimize_gaps\": true,
    \"max_gap_minutes\": 16,
    \"caregiver_friendly\": true,
    \"caregiver_start_after\": \"18:47\",
    \"caregiver_end_before\": \"18:47\",
    \"max_hours_per_day\": 9,
    \"workload_balance\": \"front_loaded\",
    \"lunch_break_required\": false,
    \"lunch_window_start\": \"18:47\",
    \"lunch_window_end\": \"18:47\",
    \"min_lunch_duration\": 15,
    \"is_active\": false,
    \"notes\": \"y\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/student-preferences/preferences/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "preference_weight": 1,
    "preferred_time_slots": [
        16
    ],
    "avoided_time_slots": [
        16
    ],
    "preferred_days": [
        5
    ],
    "avoided_days": [
        1
    ],
    "minimize_gaps": true,
    "max_gap_minutes": 16,
    "caregiver_friendly": true,
    "caregiver_start_after": "18:47",
    "caregiver_end_before": "18:47",
    "max_hours_per_day": 9,
    "workload_balance": "front_loaded",
    "lunch_break_required": false,
    "lunch_window_start": "18:47",
    "lunch_window_end": "18:47",
    "min_lunch_duration": 15,
    "is_active": false,
    "notes": "y"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/student-preferences/preferences/16';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'preference_weight' => 1,
            'preferred_time_slots' => [
                16,
            ],
            'avoided_time_slots' => [
                16,
            ],
            'preferred_days' => [
                5,
            ],
            'avoided_days' => [
                1,
            ],
            'minimize_gaps' => true,
            'max_gap_minutes' => 16,
            'caregiver_friendly' => true,
            'caregiver_start_after' => '18:47',
            'caregiver_end_before' => '18:47',
            'max_hours_per_day' => 9,
            'workload_balance' => 'front_loaded',
            'lunch_break_required' => false,
            'lunch_window_start' => '18:47',
            'lunch_window_end' => '18:47',
            'min_lunch_duration' => 15,
            'is_active' => false,
            'notes' => 'y',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/student-preferences/preferences/{preference_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

preference_id   integer     

The ID of the preference. Example: 16

Body Parameters

preference_weight   integer  optional    

Must be at least 0. Must not be greater than 100. Example: 1

preferred_time_slots   integer[]  optional    
avoided_time_slots   integer[]  optional    
preferred_days   integer[]  optional    

Must be at least 1. Must not be greater than 7.

avoided_days   integer[]  optional    

Must be at least 1. Must not be greater than 7.

minimize_gaps   boolean  optional    

Example: true

max_gap_minutes   integer  optional    

Must be at least 0. Must not be greater than 240. Example: 16

caregiver_friendly   boolean  optional    

Example: true

caregiver_start_after   string  optional    

Must be a valid date in the format H:i. Example: 18:47

caregiver_end_before   string  optional    

Must be a valid date in the format H:i. Example: 18:47

max_hours_per_day   integer  optional    

Must be at least 1. Must not be greater than 12. Example: 9

workload_balance   string  optional    

Example: front_loaded

Must be one of:
  • even
  • front_loaded
  • back_loaded
lunch_break_required   boolean  optional    

Example: false

lunch_window_start   string  optional    

Must be a valid date in the format H:i. Example: 18:47

lunch_window_end   string  optional    

Must be a valid date in the format H:i. Example: 18:47

min_lunch_duration   integer  optional    

Must be at least 15. Must not be greater than 120. Example: 15

is_active   boolean  optional    

Example: false

notes   string  optional    

Must not be greater than 1000 characters. Example: y

Delete a preference.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/student-preferences/preferences/16" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/student-preferences/preferences/16"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/student-preferences/preferences/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/student-preferences/preferences/{preference_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

preference_id   integer     

The ID of the preference. Example: 16

Bulk update preferences.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/student-preferences/bulk-update" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"preferences\": [
        {
            \"id\": 16,
            \"data\": []
        }
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/student-preferences/bulk-update"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "preferences": [
        {
            "id": 16,
            "data": []
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/student-preferences/bulk-update';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'preferences' => [
                [
                    'id' => 16,
                    'data' => [],
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/student-preferences/bulk-update

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

preferences   object[]     

Must have at least 1 items.

id   integer     

The id of an existing record in the student_preferences table. Example: 16

data   object     

Apply default preferences to groups without preferences.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/student-preferences/apply-defaults" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/student-preferences/apply-defaults"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/student-preferences/apply-defaults';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/student-preferences/apply-defaults

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get preference summary for a group.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/student-preferences/group/1/summary" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/student-preferences/group/1/summary"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/student-preferences/group/1/summary';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 1a266528-3dc9-4d2a-91b3-f1c24292d8c4
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/student-preferences/group/{group_id}/summary

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

Get slot scores for a group (all days and time slots).

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/student-preferences/group/1/slot-scores" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/student-preferences/group/1/slot-scores"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/student-preferences/group/1/slot-scores';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: cf781d6e-0dfe-4825-8be3-586cef4fb5ce
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/student-preferences/group/{group_id}/slot-scores

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

Get satisfaction statistics for an entire session.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/student-preferences/session/1/satisfaction" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/student-preferences/session/1/satisfaction"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/student-preferences/session/1/satisfaction';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 08b1d100-402e-408f-a07d-4df2da8c008b
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/student-preferences/session/{session_id}/satisfaction

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

session_id   integer     

The ID of the session. Example: 1

Get detailed satisfaction breakdown for a specific group.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/student-preferences/group/1/session/1/satisfaction" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/student-preferences/group/1/session/1/satisfaction"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/student-preferences/group/1/session/1/satisfaction';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 0cfaf1b0-3885-4311-8b23-fbb13a829f97
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/student-preferences/group/{group_id}/session/{session_id}/satisfaction

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

group_id   integer     

The ID of the group. Example: 1

session_id   integer     

The ID of the session. Example: 1

Display a listing of teachers.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/teachers" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/teachers"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 895a648c-81ed-4e7f-9422-f75ee6646fd0
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/teachers

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get teacher statistics.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/teachers/statistics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/teachers/statistics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 79f5eb92-f426-4e03-b1a5-2e4f5ca6d13f
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/teachers/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Display the specified teacher.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/teachers/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 1b14747a-5f71-498c-a1e4-6f4ee5d3ef4e
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/teachers/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the teacher. Example: 1

Remove the specified teacher.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/teachers/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/teachers/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the teacher. Example: 1

Activate a teacher.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/teachers/1/activate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1/activate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1/activate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/teachers/{teacher_id}/activate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

Deactivate a teacher.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/teachers/1/deactivate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1/deactivate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1/deactivate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/teachers/{teacher_id}/deactivate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

Get teacher's availability.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/teachers/1/availability" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1/availability"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1/availability';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: d7db6e74-0a02-45cb-b3be-f2670cc0599e
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/teachers/{teacher_id}/availability

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

Update teacher's availability.

requires authentication

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/teachers/1/availability" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"availability\": []
}"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1/availability"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "availability": []
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1/availability';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'availability' => [],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/teachers/{teacher_id}/availability

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

Body Parameters

availability   object     
monday   object  optional    
tuesday   object  optional    
wednesday   object  optional    
thursday   object  optional    
friday   object  optional    
saturday   object  optional    
sunday   object  optional    

Add a specialty to a teacher.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/teachers/1/specialties" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"specialty\": \"b\"
}"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1/specialties"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "specialty": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1/specialties';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'specialty' => 'b',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/teachers/{teacher_id}/specialties

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

Body Parameters

specialty   string     

Must not be greater than 100 characters. Example: b

Remove a specialty from a teacher.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/teachers/1/specialties/architecto" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1/specialties/architecto"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1/specialties/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/teachers/{teacher_id}/specialties/{specialty}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

specialty   string     

The specialty. Example: architecto

Get courses assigned to a teacher.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/teachers/1/courses" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1/courses"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1/courses';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 4c948195-0b97-4a79-a401-a30277dcb276
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/teachers/{teacher_id}/courses

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

Assign a course to a teacher.

requires authentication

Example request:
curl --request POST \
    "https://creation_horaire.test/api/teachers/1/courses" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"course_id\": \"architecto\",
    \"is_primary\": true,
    \"role\": \"n\",
    \"hours_assigned\": 84
}"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1/courses"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "course_id": "architecto",
    "is_primary": true,
    "role": "n",
    "hours_assigned": 84
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1/courses';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'course_id' => 'architecto',
            'is_primary' => true,
            'role' => 'n',
            'hours_assigned' => 84,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/teachers/{teacher_id}/courses

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

Body Parameters

course_id   string     

The id of an existing record in the courses table. Example: architecto

is_primary   boolean  optional    

Example: true

role   string  optional    

Must not be greater than 50 characters. Example: n

hours_assigned   integer  optional    

Must be at least 0. Example: 84

Remove a course from a teacher.

requires authentication

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/teachers/1/courses/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1/courses/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1/courses/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/teachers/{teacher_id}/courses/{course_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

course_id   integer     

The ID of the course. Example: 1

Get teacher's schedule entries.

requires authentication

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/teachers/1/schedule" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2026-04-05T18:47:39\",
    \"end_date\": \"2052-04-28\",
    \"session_id\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/teachers/1/schedule"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start_date": "2026-04-05T18:47:39",
    "end_date": "2052-04-28",
    "session_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/teachers/1/schedule';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'start_date' => '2026-04-05T18:47:39',
            'end_date' => '2052-04-28',
            'session_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-request-id: 7be0c4c8-dcb6-42a7-be6e-39f57a4444ae
x-ratelimit-limit: 60
x-ratelimit-remaining: 60
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/teachers/{teacher_id}/schedule

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

teacher_id   integer     

The ID of the teacher. Example: 1

Body Parameters

start_date   string  optional    

Must be a valid date. Example: 2026-04-05T18:47:39

end_date   string  optional    

Must be a valid date. Must be a date after or equal to start_date. Example: 2052-04-28

session_id   integer  optional    

The id of an existing record in the sessions table. Example: 16

Enseignants

API pour gérer les enseignants. Les enseignants sont les ressources humaines qui dispensent les cours.

Lister les enseignants

requires authentication

Récupère la liste des enseignants de l'organisation avec options de filtrage.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/teachers?active_only=1&department_id=1&search=Dupont&per_page=15&page=1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/teachers"
);

const params = {
    "active_only": "1",
    "department_id": "1",
    "search": "Dupont",
    "per_page": "15",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/teachers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'active_only' => '1',
            'department_id' => '1',
            'search' => 'Dupont',
            'per_page' => '15',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": [
        {
            "id": 1,
            "first_name": "Jean",
            "last_name": "Dupont",
            "email": "[email protected]",
            "employee_code": "EMP001",
            "department": {
                "id": 1,
                "name": "Informatique"
            },
            "is_active": true,
            "max_hours_per_week": 35
        }
    ],
    "links": {
        "first": "...",
        "last": "...",
        "prev": null,
        "next": "..."
    },
    "meta": {
        "current_page": 1,
        "last_page": 5,
        "per_page": 15,
        "total": 72
    }
}
 

Request   

GET api/v1/teachers

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

active_only   boolean  optional    

Filtrer uniquement les enseignants actifs. Example: true

department_id   integer  optional    

Filtrer par département. Example: 1

search   string  optional    

Rechercher par nom, prénom, email ou code employé. Example: Dupont

per_page   integer  optional    

Nombre de résultats par page. Example: 15

page   integer  optional    

Numéro de page. Example: 1

Options de sélection

requires authentication

Récupère une liste simplifiée des enseignants actifs pour alimenter des listes déroulantes.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/teachers/options" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/teachers/options"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/teachers/options';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": [
        {
            "value": 1,
            "label": "Dupont, Jean",
            "code": "EMP001"
        },
        {
            "value": 2,
            "label": "Martin, Marie",
            "code": "EMP002"
        }
    ]
}
 

Request   

GET api/v1/teachers/options

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Afficher un enseignant

requires authentication

Récupère les détails d'un enseignant spécifique.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/teachers/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/teachers/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/teachers/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": {
        "id": 1,
        "first_name": "Jean",
        "last_name": "Dupont",
        "email": "[email protected]",
        "employee_code": "EMP001",
        "phone": "514-555-1234",
        "department": {
            "id": 1,
            "name": "Informatique"
        },
        "is_active": true,
        "max_hours_per_week": 35,
        "availability": {
            "monday": [
                "08:00-12:00",
                "13:00-17:00"
            ]
        }
    }
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Enseignant non trouvé"
}
 

Request   

GET api/v1/teachers/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'enseignant. Example: 1

Disponibilités d'un enseignant

requires authentication

Récupère les disponibilités d'un enseignant pour une session donnée. Inclut ses créneaux déjà programmés et ses heures maximales par semaine.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/teachers/1/availability?session_id=1&date=2024-09-15" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": \"architecto\",
    \"date\": \"2026-04-05T18:47:37\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/teachers/1/availability"
);

const params = {
    "session_id": "1",
    "date": "2024-09-15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": "architecto",
    "date": "2026-04-05T18:47:37"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/teachers/1/availability';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'session_id' => '1',
            'date' => '2024-09-15',
        ],
        'json' => [
            'session_id' => 'architecto',
            'date' => '2026-04-05T18:47:37',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": {
        "teacher": {
            "id": 1,
            "first_name": "Jean",
            "last_name": "Dupont"
        },
        "availability": {
            "monday": [
                "08:00-12:00",
                "13:00-17:00"
            ]
        },
        "scheduled_slots": [
            {
                "id": 1,
                "date": "2024-09-15",
                "day_of_week": 1,
                "start_time": "09:00:00",
                "end_time": "11:00:00"
            }
        ],
        "max_hours_per_week": 35
    }
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Enseignant non trouvé"
}
 

Request   

GET api/v1/teachers/{id}/availability

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'enseignant. Example: 1

Query Parameters

session_id   integer     

L'ID de la session d'horaires. Example: 1

date   string  optional    

date Filtrer par date spécifique. Example: 2024-09-15

Body Parameters

session_id   string     

The id of an existing record in the schedule_sessions table. Example: architecto

date   string  optional    

Le champ value doit être une date valide. Example: 2026-04-05T18:47:37

Créer un enseignant

requires authentication

Crée un nouvel enseignant dans l'organisation courante.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/teachers" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"Jean\",
    \"last_name\": \"Dupont\",
    \"email\": \"[email protected]\",
    \"phone\": \"514-555-1234\",
    \"employee_code\": \"EMP001\",
    \"department_id\": 1,
    \"contract_type\": \"permanent\",
    \"hire_date\": \"2026-04-05T18:47:37\",
    \"max_hours_per_week\": 35,
    \"specialties\": [
        \"d\"
    ],
    \"availability\": [
        \"architecto\"
    ],
    \"is_active\": true,
    \"notes\": \"architecto\",
    \"max_hours_per_day\": 8,
    \"preferences\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/teachers"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "Jean",
    "last_name": "Dupont",
    "email": "[email protected]",
    "phone": "514-555-1234",
    "employee_code": "EMP001",
    "department_id": 1,
    "contract_type": "permanent",
    "hire_date": "2026-04-05T18:47:37",
    "max_hours_per_week": 35,
    "specialties": [
        "d"
    ],
    "availability": [
        "architecto"
    ],
    "is_active": true,
    "notes": "architecto",
    "max_hours_per_day": 8,
    "preferences": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/teachers';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'first_name' => 'Jean',
            'last_name' => 'Dupont',
            'email' => '[email protected]',
            'phone' => '514-555-1234',
            'employee_code' => 'EMP001',
            'department_id' => 1,
            'contract_type' => 'permanent',
            'hire_date' => '2026-04-05T18:47:37',
            'max_hours_per_week' => 35,
            'specialties' => [
                'd',
            ],
            'availability' => [
                'architecto',
            ],
            'is_active' => true,
            'notes' => 'architecto',
            'max_hours_per_day' => 8,
            'preferences' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Créé):


{
  "success": true,
  "message": "Création effectuée",
  "data": {"id": 1, "first_name": "Jean", "last_name": "Dupont", ...}
}
 

Example response (422, Validation échouée):


{"success": false, "message": "Erreurs de validation", "errors": {...}}
 

Request   

POST api/v1/teachers

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

first_name   string     

Le prénom de l'enseignant. Example: Jean

last_name   string     

Le nom de l'enseignant. Example: Dupont

email   string     

L'adresse courriel. Example: [email protected]

phone   string  optional    

Numéro de téléphone. Example: 514-555-1234

employee_code   string  optional    

Code employé unique. Example: EMP001

department_id   integer  optional    

ID du département. Example: 1

home_site_id   string  optional    

The id of an existing record in the sites table.

user_id   string  optional    

The id of an existing record in the users table.

contract_type   string  optional    

Example: permanent

Must be one of:
  • permanent
  • contract
  • part_time
  • hourly
  • intern
hire_date   string  optional    

Le champ value doit être une date valide. Example: 2026-04-05T18:47:37

max_hours_per_week   integer  optional    

Heures max par semaine. Example: 35

specialties   string[]  optional    

Le champ value ne peut pas avoir plus de 100 caractères.

availability   string[]  optional    

Disponibilités par jour.

monday   object  optional    
tuesday   object  optional    
wednesday   object  optional    
thursday   object  optional    
friday   object  optional    
saturday   object  optional    
sunday   object  optional    
is_active   boolean  optional    

Enseignant actif. Example: true

notes   string  optional    

Notes additionnelles. Example: architecto

custom_attributes   object  optional    
max_hours_per_day   integer  optional    

Heures max par jour. Example: 8

preferences   string[]  optional    

Préférences de l'enseignant.

Modifier un enseignant

requires authentication

Met à jour les informations d'un enseignant existant.

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/teachers/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"Jean\",
    \"last_name\": \"Dupont\",
    \"email\": \"[email protected]\",
    \"phone\": \"514-555-1234\",
    \"employee_code\": \"EMP001\",
    \"department_id\": 1,
    \"contract_type\": \"intern\",
    \"hire_date\": \"2026-04-05T18:47:37\",
    \"max_hours_per_week\": 35,
    \"specialties\": [
        \"d\"
    ],
    \"availability\": [
        \"architecto\"
    ],
    \"is_active\": true,
    \"notes\": \"architecto\",
    \"max_hours_per_day\": 8,
    \"preferences\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/teachers/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "Jean",
    "last_name": "Dupont",
    "email": "[email protected]",
    "phone": "514-555-1234",
    "employee_code": "EMP001",
    "department_id": 1,
    "contract_type": "intern",
    "hire_date": "2026-04-05T18:47:37",
    "max_hours_per_week": 35,
    "specialties": [
        "d"
    ],
    "availability": [
        "architecto"
    ],
    "is_active": true,
    "notes": "architecto",
    "max_hours_per_day": 8,
    "preferences": [
        "architecto"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/teachers/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'first_name' => 'Jean',
            'last_name' => 'Dupont',
            'email' => '[email protected]',
            'phone' => '514-555-1234',
            'employee_code' => 'EMP001',
            'department_id' => 1,
            'contract_type' => 'intern',
            'hire_date' => '2026-04-05T18:47:37',
            'max_hours_per_week' => 35,
            'specialties' => [
                'd',
            ],
            'availability' => [
                'architecto',
            ],
            'is_active' => true,
            'notes' => 'architecto',
            'max_hours_per_day' => 8,
            'preferences' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "message": "Enseignant mis à jour",
  "data": {"id": 1, "first_name": "Jean", "last_name": "Dupont", ...}
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Enseignant non trouvé"
}
 

Example response (422, Validation échouée):


{"success": false, "message": "Erreurs de validation", "errors": {...}}
 

Request   

PUT api/v1/teachers/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'enseignant. Example: 1

Body Parameters

first_name   string  optional    

Le prénom de l'enseignant. Example: Jean

last_name   string  optional    

Le nom de l'enseignant. Example: Dupont

email   string  optional    

L'adresse courriel. Example: [email protected]

phone   string  optional    

Numéro de téléphone. Example: 514-555-1234

employee_code   string  optional    

Code employé unique. Example: EMP001

department_id   integer  optional    

ID du département. Example: 1

home_site_id   string  optional    

The id of an existing record in the sites table.

user_id   string  optional    

The id of an existing record in the users table.

contract_type   string  optional    

Example: intern

Must be one of:
  • permanent
  • contract
  • part_time
  • hourly
  • intern
hire_date   string  optional    

Le champ value doit être une date valide. Example: 2026-04-05T18:47:37

max_hours_per_week   integer  optional    

Heures max par semaine. Example: 35

specialties   string[]  optional    

Le champ value ne peut pas avoir plus de 100 caractères.

availability   string[]  optional    

Disponibilités par jour.

monday   object  optional    
tuesday   object  optional    
wednesday   object  optional    
thursday   object  optional    
friday   object  optional    
saturday   object  optional    
sunday   object  optional    
is_active   boolean  optional    

Enseignant actif. Example: true

notes   string  optional    

Notes additionnelles. Example: architecto

custom_attributes   object  optional    
max_hours_per_day   integer  optional    

Heures max par jour. Example: 8

preferences   string[]  optional    

Préférences de l'enseignant.

Supprimer un enseignant

requires authentication

Supprime un enseignant (soft delete). L'enseignant ne sera plus visible mais ses données historiques sont conservées.

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/teachers/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/teachers/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/teachers/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "message": "Suppression effectuée"
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Enseignant non trouvé"
}
 

Example response (409, Conflit):


{
    "success": false,
    "message": "Impossible de supprimer: l'enseignant a des cours programmés"
}
 

Request   

DELETE api/v1/teachers/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'enseignant. Example: 1

Entrées d'horaires

API pour gérer les entrées d'horaires. Une entrée représente un créneau spécifique : un cours donné par un enseignant, dans une salle, pour un groupe.

Suppression en masse

requires authentication

Supprime plusieurs entrées d'horaires en une seule opération. Les entrées verrouillées sont ignorées.

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/entries/bulk" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries/bulk"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries/bulk';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
                2,
                3,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "message": "3 entrées supprimées",
    "data": {
        "deleted_count": 3
    }
}
 

Request   

DELETE api/v1/entries/bulk

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

ids   string[]     

Liste des IDs à supprimer.

Lister les entrées

requires authentication

Récupère la liste des entrées d'horaires avec de nombreuses options de filtrage.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/entries?session_id=1&teacher_id=1&room_id=1&group_id=1&course_id=1&status=confirmed&date=2024-09-15&day_of_week=1&has_conflict=1&per_page=15&page=1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries"
);

const params = {
    "session_id": "1",
    "teacher_id": "1",
    "room_id": "1",
    "group_id": "1",
    "course_id": "1",
    "status": "confirmed",
    "date": "2024-09-15",
    "day_of_week": "1",
    "has_conflict": "1",
    "per_page": "15",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'session_id' => '1',
            'teacher_id' => '1',
            'room_id' => '1',
            'group_id' => '1',
            'course_id' => '1',
            'status' => 'confirmed',
            'date' => '2024-09-15',
            'day_of_week' => '1',
            'has_conflict' => '1',
            'per_page' => '15',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": [
        {
            "id": 1,
            "date": "2024-09-15",
            "day_of_week": 1,
            "start_time": "09:00:00",
            "end_time": "11:00:00",
            "status": "confirmed",
            "course": {
                "id": 5,
                "name": "Programmation",
                "code": "INF101"
            },
            "teacher": {
                "id": 2,
                "first_name": "Jean",
                "last_name": "Martin"
            },
            "room": {
                "id": 3,
                "name": "Salle A101"
            },
            "group": {
                "id": 1,
                "name": "Info 1A"
            },
            "has_conflict": false,
            "is_locked": false
        }
    ],
    "links": {
        "first": "...",
        "last": "...",
        "prev": null,
        "next": "..."
    },
    "meta": {
        "current_page": 1,
        "last_page": 10,
        "per_page": 15,
        "total": 150
    }
}
 

Request   

GET api/v1/entries

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

session_id   integer  optional    

Filtrer par session d'horaires. Example: 1

teacher_id   integer  optional    

Filtrer par enseignant. Example: 1

room_id   integer  optional    

Filtrer par salle. Example: 1

group_id   integer  optional    

Filtrer par groupe. Example: 1

course_id   integer  optional    

Filtrer par cours. Example: 1

status   string  optional    

Filtrer par statut (scheduled, confirmed, cancelled, tentative). Example: confirmed

date   string  optional    

date Filtrer par date. Example: 2024-09-15

day_of_week   integer  optional    

Filtrer par jour de la semaine (1=lundi à 7=dimanche). Example: 1

has_conflict   boolean  optional    

Filtrer les entrées ayant des conflits. Example: true

per_page   integer  optional    

Nombre de résultats par page. Example: 15

page   integer  optional    

Numéro de page. Example: 1

Afficher une entrée

requires authentication

Récupère les détails d'une entrée d'horaire spécifique.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/entries/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": {
        "id": 1,
        "date": "2024-09-15",
        "day_of_week": 1,
        "start_time": "09:00:00",
        "end_time": "11:00:00",
        "status": "confirmed",
        "week_pattern": "every",
        "course": {
            "id": 5,
            "name": "Programmation",
            "code": "INF101"
        },
        "teacher": {
            "id": 2,
            "first_name": "Jean",
            "last_name": "Martin"
        },
        "room": {
            "id": 3,
            "name": "Salle A101"
        },
        "group": {
            "id": 1,
            "name": "Info 1A"
        },
        "schedule_session": {
            "id": 1,
            "name": "Automne 2024"
        },
        "has_conflict": false,
        "is_locked": false,
        "notes": "Examen partiel prévu"
    }
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Entrée non trouvée"
}
 

Request   

GET api/v1/entries/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'entrée. Example: 1

Créer une entrée

requires authentication

Crée une nouvelle entrée d'horaire.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/entries" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"schedule_session_id\": 1,
    \"course_id\": 5,
    \"teacher_id\": 2,
    \"group_id\": 1,
    \"room_id\": 3,
    \"date\": \"2024-09-15\",
    \"day_of_week\": 1,
    \"start_time\": \"09:00:00\",
    \"end_time\": \"11:00:00\",
    \"week_pattern\": \"every\",
    \"specific_weeks\": [
        1,
        3,
        5
    ],
    \"effective_from\": \"2024-09-01\",
    \"effective_until\": \"2024-12-20\",
    \"status\": \"scheduled\",
    \"notes\": \"Cours magistral\",
    \"color\": \"#3498db\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "schedule_session_id": 1,
    "course_id": 5,
    "teacher_id": 2,
    "group_id": 1,
    "room_id": 3,
    "date": "2024-09-15",
    "day_of_week": 1,
    "start_time": "09:00:00",
    "end_time": "11:00:00",
    "week_pattern": "every",
    "specific_weeks": [
        1,
        3,
        5
    ],
    "effective_from": "2024-09-01",
    "effective_until": "2024-12-20",
    "status": "scheduled",
    "notes": "Cours magistral",
    "color": "#3498db"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'schedule_session_id' => 1,
            'course_id' => 5,
            'teacher_id' => 2,
            'group_id' => 1,
            'room_id' => 3,
            'date' => '2024-09-15',
            'day_of_week' => 1,
            'start_time' => '09:00:00',
            'end_time' => '11:00:00',
            'week_pattern' => 'every',
            'specific_weeks' => [
                1,
                3,
                5,
            ],
            'effective_from' => '2024-09-01',
            'effective_until' => '2024-12-20',
            'status' => 'scheduled',
            'notes' => 'Cours magistral',
            'color' => '#3498db',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Créée):


{
    "success": true,
    "message": "Ressource créée avec succès",
    "data": {
        "id": 151,
        "date": "2024-09-15",
        "start_time": "09:00:00",
        "end_time": "11:00:00",
        "status": "scheduled"
    }
}
 

Example response (422, Validation échouée):


{
    "message": "The course_id field is required.",
    "errors": {
        "course_id": [
            "The course_id field is required."
        ]
    }
}
 

Request   

POST api/v1/entries

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

schedule_session_id   integer     

L'ID de la session d'horaires. Example: 1

course_id   integer     

L'ID du cours. Example: 5

teacher_id   integer  optional    

L'ID de l'enseignant. Example: 2

group_id   integer  optional    

L'ID du groupe. Example: 1

room_id   integer  optional    

L'ID de la salle. Example: 3

date   date  optional    

Date de l'entrée (génère day_of_week automatiquement). Example: 2024-09-15

day_of_week   integer  optional    

Jour de la semaine (1-7, 1=lundi). Example: 1

start_time   string     

Heure de début (format H:i:s). Example: 09:00:00

end_time   string     

Heure de fin (format H:i:s, après start_time). Example: 11:00:00

week_pattern   string  optional    

Récurrence (every, odd, even, specific). Example: every

specific_weeks   string[]  optional    

Semaines spécifiques si week_pattern=specific.

effective_from   date  optional    

Date de début d'effet. Example: 2024-09-01

effective_until   date  optional    

Date de fin d'effet. Example: 2024-12-20

status   string  optional    

Statut initial (scheduled, confirmed, tentative). Example: scheduled

notes   string  optional    

Notes additionnelles. Example: Cours magistral

color   string  optional    

Couleur hexadécimale. Example: #3498db

Modifier une entrée

requires authentication

Met à jour une entrée d'horaire existante.

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/entries/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"course_id\": 5,
    \"teacher_id\": 2,
    \"group_id\": 1,
    \"room_id\": 3,
    \"date\": \"2024-09-16\",
    \"day_of_week\": 2,
    \"start_time\": \"10:00:00\",
    \"end_time\": \"12:00:00\",
    \"week_pattern\": \"odd\",
    \"specific_weeks\": [
        1
    ],
    \"effective_from\": \"2026-04-05T18:47:37\",
    \"effective_until\": \"2026-04-05T18:47:37\",
    \"status\": \"confirmed\",
    \"notes\": \"Salle changée\",
    \"color\": \"#fEEeDb\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "course_id": 5,
    "teacher_id": 2,
    "group_id": 1,
    "room_id": 3,
    "date": "2024-09-16",
    "day_of_week": 2,
    "start_time": "10:00:00",
    "end_time": "12:00:00",
    "week_pattern": "odd",
    "specific_weeks": [
        1
    ],
    "effective_from": "2026-04-05T18:47:37",
    "effective_until": "2026-04-05T18:47:37",
    "status": "confirmed",
    "notes": "Salle changée",
    "color": "#fEEeDb"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'course_id' => 5,
            'teacher_id' => 2,
            'group_id' => 1,
            'room_id' => 3,
            'date' => '2024-09-16',
            'day_of_week' => 2,
            'start_time' => '10:00:00',
            'end_time' => '12:00:00',
            'week_pattern' => 'odd',
            'specific_weeks' => [
                1,
            ],
            'effective_from' => '2026-04-05T18:47:37',
            'effective_until' => '2026-04-05T18:47:37',
            'status' => 'confirmed',
            'notes' => 'Salle changée',
            'color' => '#fEEeDb',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{"success": true, "message": "Entrée mise à jour", "data": {...}}
 

Example response (400, Non modifiable):


{
    "success": false,
    "message": "Cette entrée ne peut pas être modifiée"
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Entrée non trouvée"
}
 

Request   

PUT api/v1/entries/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'entrée. Example: 1

Body Parameters

course_id   integer  optional    

L'ID du cours. Example: 5

teacher_id   integer  optional    

L'ID de l'enseignant. Example: 2

group_id   integer  optional    

L'ID du groupe. Example: 1

room_id   integer  optional    

L'ID de la salle. Example: 3

date   date  optional    

Date de l'entrée. Example: 2024-09-16

day_of_week   integer  optional    

Jour de la semaine (1-7). Example: 2

start_time   string  optional    

Heure de début. Example: 10:00:00

end_time   string  optional    

Heure de fin. Example: 12:00:00

week_pattern   string  optional    

Example: odd

Must be one of:
  • every
  • odd
  • even
  • specific
specific_weeks   integer[]  optional    

Le champ value doit être entre 1 et 52.

effective_from   string  optional    

Le champ value doit être une date valide. Example: 2026-04-05T18:47:37

effective_until   string  optional    

Le champ value doit être une date valide. Example: 2026-04-05T18:47:37

status   string  optional    

Statut (scheduled, confirmed, cancelled, tentative, completed). Example: confirmed

notes   string  optional    

Notes additionnelles. Example: Salle changée

color   string  optional    

Must match the regex /^#[0-9A-Fa-f]{6}$/. Example: #fEEeDb

Supprimer une entrée

requires authentication

Supprime une entrée d'horaire. Les entrées verrouillées ne peuvent pas être supprimées.

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/entries/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Supprimée):


{
    "success": true,
    "message": "Entrée supprimée"
}
 

Example response (400, Verrouillée):


{
    "success": false,
    "message": "Cette entrée est verrouillée"
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Entrée non trouvée"
}
 

Request   

DELETE api/v1/entries/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'entrée. Example: 1

Verrouiller une entrée

requires authentication

Verrouille une entrée pour empêcher sa modification ou suppression.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/entries/1/lock" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries/1/lock"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries/1/lock';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Verrouillée):


{"success": true, "message": "Entrée verrouillée", "data": {...}}
 

Example response (400, Déjà verrouillée):


{
    "success": false,
    "message": "Entrée déjà verrouillée"
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Entrée non trouvée"
}
 

Request   

POST api/v1/entries/{id}/lock

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'entrée. Example: 1

Déverrouiller une entrée

requires authentication

Déverrouille une entrée pour permettre sa modification.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/entries/1/unlock" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries/1/unlock"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries/1/unlock';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Déverrouillée):


{"success": true, "message": "Entrée déverrouillée", "data": {...}}
 

Example response (400, Non verrouillée):


{
    "success": false,
    "message": "Entrée non verrouillée"
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Entrée non trouvée"
}
 

Request   

POST api/v1/entries/{id}/unlock

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'entrée. Example: 1

Dupliquer une entrée

requires authentication

Crée une copie d'une entrée d'horaire existante.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/entries/1/duplicate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/entries/1/duplicate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/entries/1/duplicate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Dupliquée):


{
    "success": true,
    "message": "Entrée dupliquée",
    "data": {
        "id": 152,
        "date": "2024-09-15",
        "start_time": "09:00:00",
        "end_time": "11:00:00",
        "status": "scheduled"
    }
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Entrée non trouvée"
}
 

Request   

POST api/v1/entries/{id}/duplicate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'entrée à dupliquer. Example: 1

Exports

API pour gérer les exports de données.

Types d'entités disponibles

requires authentication

Retourne les types d'entités disponibles pour l'export.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/interoperability/entity-types" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/interoperability/entity-types"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/interoperability/entity-types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "data": {
    "entity_types": {
      "teacher": {"key": "teacher", "label": "Enseignants", "fields": [...]}
    }
  }
}
 

Request   

GET api/v1/interoperability/entity-types

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Lister les exports

requires authentication

Récupère la liste des exports pour l'organisation.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/exports?status=completed&entity_type=teacher&per_page=15" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/exports"
);

const params = {
    "status": "completed",
    "entity_type": "teacher",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/exports';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'status' => 'completed',
            'entity_type' => 'teacher',
            'per_page' => '15',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "data": {
    "exports": [...],
    "pagination": {...}
  }
}
 

Request   

GET api/v1/exports

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

status   string  optional    

Filtrer par statut. Example: completed

entity_type   string  optional    

Filtrer par type d'entité. Example: teacher

per_page   integer  optional    

Nombre de résultats par page. Example: 15

Créer un export

requires authentication

Crée un nouveau job d'export et le démarre.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/exports" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"entity_type\": \"teacher\",
    \"format\": \"xlsx\",
    \"filters\": {
        \"is_active\": true
    },
    \"columns\": [
        \"employee_code\",
        \"first_name\",
        \"last_name\"
    ],
    \"async\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/exports"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "entity_type": "teacher",
    "format": "xlsx",
    "filters": {
        "is_active": true
    },
    "columns": [
        "employee_code",
        "first_name",
        "last_name"
    ],
    "async": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/exports';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'entity_type' => 'teacher',
            'format' => 'xlsx',
            'filters' => [
                'is_active' => true,
            ],
            'columns' => [
                'employee_code',
                'first_name',
                'last_name',
            ],
            'async' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Créé):


{
    "success": true,
    "message": "Export créé",
    "data": {
        "id": 1,
        "status": "pending"
    }
}
 

Request   

POST api/v1/exports

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

entity_type   string     

Type d'entité à exporter. Example: teacher

format   string     

Format d'export (csv, xlsx, json). Example: xlsx

filters   string[]  optional    

Filtres à appliquer.

columns   string[]  optional    

Colonnes à exporter.

options   object  optional    
async   boolean  optional    

Exécuter en arrière-plan. Example: true

Afficher un export

requires authentication

Récupère les détails d'un export.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/exports/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/exports/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/exports/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": {
        "id": 1,
        "entity_type": "teacher",
        "format": "xlsx",
        "status": "completed",
        "total_records": 50,
        "exported_records": 50,
        "is_downloadable": true
    }
}
 

Request   

GET api/v1/exports/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'export. Example: 1

Télécharger un export

requires authentication

Télécharge le fichier d'export.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/exports/1/download" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/exports/1/download"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/exports/1/download';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


file
 

Request   

GET api/v1/exports/{id}/download

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'export. Example: 1

Annuler un export

requires authentication

Annule un export en cours.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/exports/1/cancel" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/exports/1/cancel"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/exports/1/cancel';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Annulé):


{
    "success": true,
    "message": "Export annulé"
}
 

Request   

POST api/v1/exports/{id}/cancel

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'export. Example: 1

Supprimer un export

requires authentication

Supprime un export.

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/exports/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/exports/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/exports/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Supprimé):


{
    "success": true,
    "message": "Export supprimé"
}
 

Request   

DELETE api/v1/exports/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'export. Example: 1

Générer un template d'import

requires authentication

Génère un fichier template pour l'import d'un type d'entité.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/templates/teacher?format=xlsx" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/templates/teacher"
);

const params = {
    "format": "xlsx",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/templates/teacher';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'format' => 'xlsx',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


file
 

Request   

GET api/v1/templates/{entity_type}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entity_type   string     

Type d'entité. Example: teacher

Query Parameters

format   string  optional    

Format du template (xlsx). Example: xlsx

Groupes

API pour gérer les groupes d'étudiants. Les groupes représentent des cohortes d'étudiants qui suivent les mêmes cours.

Lister les groupes

requires authentication

Récupère la liste des groupes de l'organisation avec options de filtrage.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/groups?active_only=1&level=L1&academic_year=2024-2025&search=Info&per_page=15&page=1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/groups"
);

const params = {
    "active_only": "1",
    "level": "L1",
    "academic_year": "2024-2025",
    "search": "Info",
    "per_page": "15",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/groups';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'active_only' => '1',
            'level' => 'L1',
            'academic_year' => '2024-2025',
            'search' => 'Info',
            'per_page' => '15',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": [
        {
            "id": 1,
            "name": "Groupe Info 1A",
            "code": "INF-1A-2024",
            "level": "L1",
            "academic_year": "2024-2025",
            "expected_students": 30,
            "is_active": true
        }
    ],
    "links": {
        "first": "...",
        "last": "...",
        "prev": null,
        "next": "..."
    },
    "meta": {
        "current_page": 1,
        "last_page": 2,
        "per_page": 15,
        "total": 25
    }
}
 

Request   

GET api/v1/groups

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

active_only   boolean  optional    

Filtrer uniquement les groupes actifs. Example: true

level   string  optional    

Filtrer par niveau (1ère année, 2e année, etc.). Example: L1

academic_year   string  optional    

Filtrer par année académique. Example: 2024-2025

search   string  optional    

Rechercher par nom ou code. Example: Info

per_page   integer  optional    

Nombre de résultats par page. Example: 15

page   integer  optional    

Numéro de page. Example: 1

Options de sélection

requires authentication

Récupère une liste simplifiée des groupes actifs pour alimenter des listes déroulantes.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/groups/options" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/groups/options"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/groups/options';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": [
        {
            "value": 1,
            "label": "Groupe Info 1A",
            "code": "INF-1A-2024",
            "size": 30
        },
        {
            "value": 2,
            "label": "Groupe Info 2A",
            "code": "INF-2A-2024",
            "size": 28
        }
    ]
}
 

Request   

GET api/v1/groups/options

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Afficher un groupe

requires authentication

Récupère les détails d'un groupe spécifique.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/groups/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/groups/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/groups/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": {
        "id": 1,
        "name": "Groupe Info 1A",
        "code": "INF-1A-2024",
        "level": "L1",
        "academic_year": "2024-2025",
        "expected_students": 30,
        "is_active": true,
        "description": "Première année informatique"
    }
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Groupe non trouvé"
}
 

Request   

GET api/v1/groups/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du groupe. Example: 1

Horaire d'un groupe

requires authentication

Récupère l'horaire complet d'un groupe pour une session donnée. Inclut tous les cours, enseignants et salles assignés.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/groups/1/schedule?session_id=1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/groups/1/schedule"
);

const params = {
    "session_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": "architecto"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/groups/1/schedule';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'session_id' => '1',
        ],
        'json' => [
            'session_id' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": {
        "group": {
            "id": 1,
            "name": "Groupe Info 1A",
            "code": "INF-1A-2024"
        },
        "entries": [
            {
                "id": 1,
                "date": "2024-09-15",
                "day_of_week": 1,
                "start_time": "09:00:00",
                "end_time": "11:00:00",
                "course": {
                    "id": 5,
                    "name": "Programmation",
                    "code": "INF101"
                },
                "teacher": {
                    "id": 2,
                    "name": "Prof. Martin"
                },
                "room": {
                    "id": 3,
                    "name": "Salle A101"
                }
            }
        ]
    }
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Groupe non trouvé"
}
 

Request   

GET api/v1/groups/{id}/schedule

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du groupe. Example: 1

Query Parameters

session_id   integer     

L'ID de la session d'horaires. Example: 1

Body Parameters

session_id   string     

The id of an existing record in the schedule_sessions table. Example: architecto

Créer un groupe

requires authentication

Crée un nouveau groupe dans l'organisation courante.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/groups" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Groupe Info 1A\",
    \"code\": \"INF-1A-2024\",
    \"description\": \"Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.\",
    \"department_id\": 1,
    \"level\": \"L1\",
    \"program\": \"q\",
    \"academic_year\": \"wrsitcpscqldzsnr\",
    \"expected_students\": 25,
    \"actual_students\": 19,
    \"max_students\": 16,
    \"preferences\": {
        \"preferred_room_type\": \"j\",
        \"home_room_id\": 16,
        \"scheduling_priority\": 22
    },
    \"color\": \"#fEEeDb\",
    \"is_active\": true,
    \"notes\": \"architecto\",
    \"parent_group_id\": null,
    \"year\": 1,
    \"size\": 30
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/groups"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Groupe Info 1A",
    "code": "INF-1A-2024",
    "description": "Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.",
    "department_id": 1,
    "level": "L1",
    "program": "q",
    "academic_year": "wrsitcpscqldzsnr",
    "expected_students": 25,
    "actual_students": 19,
    "max_students": 16,
    "preferences": {
        "preferred_room_type": "j",
        "home_room_id": 16,
        "scheduling_priority": 22
    },
    "color": "#fEEeDb",
    "is_active": true,
    "notes": "architecto",
    "parent_group_id": null,
    "year": 1,
    "size": 30
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/groups';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Groupe Info 1A',
            'code' => 'INF-1A-2024',
            'description' => 'Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.',
            'department_id' => 1,
            'level' => 'L1',
            'program' => 'q',
            'academic_year' => 'wrsitcpscqldzsnr',
            'expected_students' => 25,
            'actual_students' => 19,
            'max_students' => 16,
            'preferences' => [
                'preferred_room_type' => 'j',
                'home_room_id' => 16,
                'scheduling_priority' => 22,
            ],
            'color' => '#fEEeDb',
            'is_active' => true,
            'notes' => 'architecto',
            'parent_group_id' => null,
            'year' => 1,
            'size' => 30,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Créé):


{
  "success": true,
  "message": "Groupe créé",
  "data": {"id": 1, "name": "Groupe Info 1A", ...}
}
 

Example response (422, Validation échouée):


{"success": false, "message": "Erreurs de validation", "errors": {...}}
 

Request   

POST api/v1/groups

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Le nom du groupe. Example: Groupe Info 1A

code   string  optional    

Code unique du groupe. Example: INF-1A-2024

description   string  optional    

Le champ value ne peut pas avoir plus de 2000 caractères. Example: Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.

department_id   integer  optional    

ID du département. Example: 1

level   string  optional    

Niveau d'études. Example: L1

program   string  optional    

Le champ value ne peut pas avoir plus de 255 caractères. Example: q

academic_year   string  optional    

Le champ value ne peut pas avoir plus de 20 caractères. Example: wrsitcpscqldzsnr

expected_students   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 1000. Example: 25

actual_students   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 1000. Example: 19

max_students   integer  optional    

Le champ value doit être d'au moins 1. Le champ value ne peut pas être supérieur à 1000. Example: 16

preferences   object  optional    
preferred_room_type   string  optional    

Le champ value ne peut pas avoir plus de 50 caractères. Example: j

home_room_id   integer  optional    

The id of an existing record in the rooms table. Example: 16

scheduling_priority   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 100. Example: 22

availability   object  optional    
monday   object  optional    
tuesday   object  optional    
wednesday   object  optional    
thursday   object  optional    
friday   object  optional    
saturday   object  optional    
sunday   object  optional    
color   string  optional    

Must match the regex /^#[0-9A-Fa-f]{6}$/. Example: #fEEeDb

is_active   boolean  optional    

Groupe actif. Example: true

notes   string  optional    

Notes additionnelles. Example: architecto

custom_attributes   object  optional    
parent_group_id   integer  optional    

ID du groupe parent.

year   integer  optional    

Année d'études. Example: 1

size   integer  optional    

Nombre d'étudiants. Example: 30

Modifier un groupe

requires authentication

Met à jour les informations d'un groupe existant.

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/groups/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Groupe Info 1A\",
    \"code\": \"INF-1A-2024\",
    \"description\": \"Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.\",
    \"department_id\": 1,
    \"level\": \"L1\",
    \"program\": \"q\",
    \"academic_year\": \"wrsitcpscqldzsnr\",
    \"expected_students\": 25,
    \"actual_students\": 19,
    \"max_students\": 16,
    \"preferences\": {
        \"preferred_room_type\": \"j\",
        \"home_room_id\": 16,
        \"scheduling_priority\": 22
    },
    \"color\": \"#fEEeDb\",
    \"is_active\": true,
    \"notes\": \"architecto\",
    \"parent_group_id\": null,
    \"year\": 1,
    \"size\": 30
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/groups/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Groupe Info 1A",
    "code": "INF-1A-2024",
    "description": "Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.",
    "department_id": 1,
    "level": "L1",
    "program": "q",
    "academic_year": "wrsitcpscqldzsnr",
    "expected_students": 25,
    "actual_students": 19,
    "max_students": 16,
    "preferences": {
        "preferred_room_type": "j",
        "home_room_id": 16,
        "scheduling_priority": 22
    },
    "color": "#fEEeDb",
    "is_active": true,
    "notes": "architecto",
    "parent_group_id": null,
    "year": 1,
    "size": 30
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/groups/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Groupe Info 1A',
            'code' => 'INF-1A-2024',
            'description' => 'Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.',
            'department_id' => 1,
            'level' => 'L1',
            'program' => 'q',
            'academic_year' => 'wrsitcpscqldzsnr',
            'expected_students' => 25,
            'actual_students' => 19,
            'max_students' => 16,
            'preferences' => [
                'preferred_room_type' => 'j',
                'home_room_id' => 16,
                'scheduling_priority' => 22,
            ],
            'color' => '#fEEeDb',
            'is_active' => true,
            'notes' => 'architecto',
            'parent_group_id' => null,
            'year' => 1,
            'size' => 30,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "message": "Groupe mis à jour",
  "data": {"id": 1, "name": "Groupe Info 1A", ...}
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Groupe non trouvé"
}
 

Example response (422, Validation échouée):


{"success": false, "message": "Erreurs de validation", "errors": {...}}
 

Request   

PUT api/v1/groups/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du groupe. Example: 1

Body Parameters

name   string  optional    

Le nom du groupe. Example: Groupe Info 1A

code   string  optional    

Code unique du groupe. Example: INF-1A-2024

description   string  optional    

Le champ value ne peut pas avoir plus de 2000 caractères. Example: Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.

department_id   integer  optional    

ID du département. Example: 1

level   string  optional    

Niveau d'études. Example: L1

program   string  optional    

Le champ value ne peut pas avoir plus de 255 caractères. Example: q

academic_year   string  optional    

Le champ value ne peut pas avoir plus de 20 caractères. Example: wrsitcpscqldzsnr

expected_students   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 1000. Example: 25

actual_students   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 1000. Example: 19

max_students   integer  optional    

Le champ value doit être d'au moins 1. Le champ value ne peut pas être supérieur à 1000. Example: 16

preferences   object  optional    
preferred_room_type   string  optional    

Le champ value ne peut pas avoir plus de 50 caractères. Example: j

home_room_id   integer  optional    

The id of an existing record in the rooms table. Example: 16

scheduling_priority   integer  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 100. Example: 22

availability   object  optional    
monday   object  optional    
tuesday   object  optional    
wednesday   object  optional    
thursday   object  optional    
friday   object  optional    
saturday   object  optional    
sunday   object  optional    
color   string  optional    

Must match the regex /^#[0-9A-Fa-f]{6}$/. Example: #fEEeDb

is_active   boolean  optional    

Groupe actif. Example: true

notes   string  optional    

Notes additionnelles. Example: architecto

custom_attributes   object  optional    
parent_group_id   integer  optional    

ID du groupe parent.

year   integer  optional    

Année d'études. Example: 1

size   integer  optional    

Nombre d'étudiants. Example: 30

Supprimer un groupe

requires authentication

Supprime un groupe (soft delete). Le groupe ne sera plus visible mais ses données historiques sont conservées.

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/groups/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/groups/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/groups/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "message": "Groupe supprimé"
}
 

Example response (404, Non trouvé):


{
    "success": false,
    "message": "Groupe non trouvé"
}
 

Example response (409, Conflit):


{
    "success": false,
    "message": "Impossible de supprimer: le groupe a des cours programmés"
}
 

Request   

DELETE api/v1/groups/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID du groupe. Example: 1

Imports

API pour gérer les imports de données.

Lister les imports

requires authentication

Récupère la liste des imports pour l'organisation.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/imports?status=completed&entity_type=teacher&per_page=15" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/imports"
);

const params = {
    "status": "completed",
    "entity_type": "teacher",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/imports';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'status' => 'completed',
            'entity_type' => 'teacher',
            'per_page' => '15',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "data": {
    "imports": [...],
    "pagination": {...}
  }
}
 

Request   

GET api/v1/imports

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

status   string  optional    

Filtrer par statut. Example: completed

entity_type   string  optional    

Filtrer par type d'entité. Example: teacher

per_page   integer  optional    

Nombre de résultats par page. Example: 15

Afficher un import

requires authentication

Récupère les détails d'un import.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/imports/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/imports/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/imports/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": {
        "id": 1,
        "entity_type": "teacher",
        "status": "completed",
        "total_rows": 50,
        "successful_rows": 48,
        "failed_rows": 2
    }
}
 

Request   

GET api/v1/imports/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'import. Example: 1

Obtenir les en-têtes du fichier

requires authentication

Retourne les en-têtes du fichier uploadé pour le mapping.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/imports/1/headers" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/imports/1/headers"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/imports/1/headers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": {
        "headers": [
            "Code",
            "Prénom",
            "Nom",
            "Email"
        ],
        "entity_fields": [
            "employee_code",
            "first_name",
            "last_name",
            "email"
        ]
    }
}
 

Request   

GET api/v1/imports/{id}/headers

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'import. Example: 1

Mettre à jour le mapping

requires authentication

Met à jour le mapping des colonnes pour un import.

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/imports/1/mapping" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mapping\": {
        \"Code\": \"employee_code\"
    }
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/imports/1/mapping"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mapping": {
        "Code": "employee_code"
    }
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/imports/1/mapping';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mapping' => [
                'Code' => 'employee_code',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "message": "Mapping mis à jour"
}
 

Request   

PUT api/v1/imports/{id}/mapping

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'import. Example: 1

Body Parameters

mapping   string[]     

Le mapping colonnes → champs.

Valider un import

requires authentication

Valide le fichier sans l'importer.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/imports/1/validate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/imports/1/validate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/imports/1/validate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Valide):


{
    "success": true,
    "data": {
        "valid": true,
        "errors": [],
        "warnings": [],
        "total_rows": 50
    }
}
 

Request   

POST api/v1/imports/{id}/validate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'import. Example: 1

Exécuter un import

requires authentication

Lance l'exécution de l'import.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/imports/1/execute" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"async\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/imports/1/execute"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "async": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/imports/1/execute';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'async' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Lancé):


{
    "success": true,
    "message": "Import lancé"
}
 

Request   

POST api/v1/imports/{id}/execute

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'import. Example: 1

Body Parameters

async   boolean  optional    

Exécuter en arrière-plan. Example: true

Logs d'un import

requires authentication

Récupère les logs détaillés d'un import.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/imports/1/logs?status=failed" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/imports/1/logs"
);

const params = {
    "status": "failed",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/imports/1/logs';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'status' => 'failed',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "data": {
    "logs": [...],
    "count": 5
  }
}
 

Request   

GET api/v1/imports/{id}/logs

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'import. Example: 1

Query Parameters

status   string  optional    

Filtrer par statut (success, failed, skipped). Example: failed

Annuler un import

requires authentication

Annule un import en cours ou en attente.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/imports/1/cancel" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/imports/1/cancel"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/imports/1/cancel';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Annulé):


{
    "success": true,
    "message": "Import annulé"
}
 

Request   

POST api/v1/imports/{id}/cancel

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'import. Example: 1

Supprimer un import

requires authentication

Supprime un import et ses logs.

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/imports/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/imports/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/imports/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Supprimé):


{
    "success": true,
    "message": "Import supprimé"
}
 

Request   

DELETE api/v1/imports/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'import. Example: 1

Monitoring

Endpoints pour la surveillance et la santé du système.

Vérification de santé complète

Retourne l'état de santé de tous les composants du système.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/health" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/health"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/health';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "ok",
    "timestamp": "2024-01-15T10:30:00Z",
    "checks": [
        {
            "name": "database",
            "status": "ok",
            "message": "Database connection successful",
            "response_time_ms": 5.2
        },
        {
            "name": "cache",
            "status": "ok",
            "message": "Cache is working correctly",
            "response_time_ms": 1.1
        },
        {
            "name": "queue",
            "status": "ok",
            "message": "Database queue operational",
            "response_time_ms": 3.5
        },
        {
            "name": "storage",
            "status": "ok",
            "message": "Storage is working correctly",
            "response_time_ms": 8.7
        }
    ]
}
 

Example response (503):


{
    "status": "error",
    "timestamp": "2024-01-15T10:30:00Z",
    "checks": [
        {
            "name": "database",
            "status": "error",
            "message": "Database connection failed: Connection refused"
        }
    ]
}
 

Request   

GET api/v1/health

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Vérification rapide (ping)

Endpoint léger pour la surveillance basique.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/health/ping" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/health/ping"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/health/ping';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "ok",
    "timestamp": "2024-01-15T10:30:00Z"
}
 

Request   

GET api/v1/health/ping

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Vérification d'un composant spécifique

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/health/check/database" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/health/check/database"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/health/check/database';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "name": "database",
    "status": "ok",
    "message": "Database connection successful",
    "response_time_ms": 5.2
}
 

Example response (404):


{
    "error": "Health check not found",
    "name": "unknown"
}
 

Request   

GET api/v1/health/check/{name}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

name   string     

Le nom du composant à vérifier. Example: database

Métriques système

requires authentication

Retourne les métriques de performance et d'utilisation du système.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/metrics" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/metrics"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/metrics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "php": {
        "version": "8.3.0",
        "memory_limit": "256M",
        "memory_usage": {
            "current": "32 MB",
            "peak": "45 MB"
        }
    },
    "laravel": {
        "version": "12.0.0",
        "environment": "production",
        "debug_mode": false
    },
    "server": {
        "hostname": "app-server-1",
        "os": "Linux"
    },
    "database": {
        "driver": "mysql",
        "connection": "mysql"
    },
    "queue": {
        "driver": "redis",
        "pending_jobs": 15,
        "failed_jobs": 0
    },
    "timestamp": "2024-01-15T10:30:00Z"
}
 

Request   

GET api/v1/metrics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Organisations

API pour gérer les organisations (multi-tenant). Seuls les superadmins peuvent créer/supprimer des organisations.

Organisation courante

requires authentication

Récupère les détails de l'organisation de l'utilisateur connecté.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/organizations/current" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/organizations/current"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/organizations/current';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/organizations/current

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Statistiques de l'organisation

requires authentication

Récupère les statistiques de l'organisation courante.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/organizations/stats" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/organizations/stats"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/organizations/stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/organizations/stats

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Lister les organisations

requires authentication

Récupère la liste des organisations (superadmin uniquement).

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/organizations?active_only=1&search=planifize&per_page=15" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/organizations"
);

const params = {
    "active_only": "1",
    "search": "planifize",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/organizations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'active_only' => '1',
            'search' => 'planifize',
            'per_page' => '15',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/organizations

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

active_only   boolean  optional    

Filtrer uniquement les organisations actives. Example: true

search   string  optional    

Rechercher par nom ou slug. Example: planifize

per_page   integer  optional    

Nombre de résultats par page. Example: 15

Afficher une organisation

requires authentication

Récupère les détails d'une organisation spécifique.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/organizations/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/organizations/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/organizations/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/organizations/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'organisation. Example: 1

Créer une organisation

requires authentication

Crée une nouvelle organisation (superadmin uniquement).

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/organizations" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"École Primaire Laval\",
    \"slug\": \"ecole-laval\",
    \"email\": \"[email protected]\",
    \"phone\": \"vdljnikhwaykcmyu\",
    \"website\": \"w\",
    \"address\": \"p\",
    \"city\": \"w\",
    \"province\": \"l\",
    \"postal_code\": \"vqwrsitcpscqldzs\",
    \"country\": \"nr\",
    \"timezone\": \"Europe\\/Kyiv\",
    \"locale\": \"en\",
    \"max_users\": 84,
    \"is_active\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/organizations"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "École Primaire Laval",
    "slug": "ecole-laval",
    "email": "[email protected]",
    "phone": "vdljnikhwaykcmyu",
    "website": "w",
    "address": "p",
    "city": "w",
    "province": "l",
    "postal_code": "vqwrsitcpscqldzs",
    "country": "nr",
    "timezone": "Europe\/Kyiv",
    "locale": "en",
    "max_users": 84,
    "is_active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/organizations';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'École Primaire Laval',
            'slug' => 'ecole-laval',
            'email' => '[email protected]',
            'phone' => 'vdljnikhwaykcmyu',
            'website' => 'w',
            'address' => 'p',
            'city' => 'w',
            'province' => 'l',
            'postal_code' => 'vqwrsitcpscqldzs',
            'country' => 'nr',
            'timezone' => 'Europe/Kyiv',
            'locale' => 'en',
            'max_users' => 84,
            'is_active' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/organizations

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Le nom de l'organisation. Example: École Primaire Laval

slug   string  optional    

Le slug unique. Example: ecole-laval

email   string     

L'email de contact. Example: [email protected]

phone   string  optional    

Le champ value ne peut pas avoir plus de 20 caractères. Example: vdljnikhwaykcmyu

website   string  optional    

Must be a valid URL. Le champ value ne peut pas avoir plus de 255 caractères. Example: w

address   string  optional    

Le champ value ne peut pas avoir plus de 500 caractères. Example: p

city   string  optional    

Le champ value ne peut pas avoir plus de 100 caractères. Example: w

province   string  optional    

Le champ value ne peut pas avoir plus de 100 caractères. Example: l

postal_code   string  optional    

Le champ value ne peut pas avoir plus de 20 caractères. Example: vqwrsitcpscqldzs

country   string  optional    

Le champ value doit avoir 2 caractères. Example: nr

timezone   string  optional    

Must be a valid time zone, such as Africa/Accra. Example: Europe/Kyiv

locale   string  optional    

Example: en

Must be one of:
  • fr
  • en
max_users   integer  optional    

Le champ value doit être d'au moins 0. Example: 84

is_active   boolean  optional    

Example: true

Modifier une organisation

requires authentication

Met à jour les informations d'une organisation existante.

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/organizations/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"slug\": \"n\",
    \"email\": \"[email protected]\",
    \"phone\": \"vdljnikhwaykcmyu\",
    \"website\": \"w\",
    \"address\": \"p\",
    \"city\": \"w\",
    \"province\": \"l\",
    \"postal_code\": \"vqwrsitcpscqldzs\",
    \"country\": \"nr\",
    \"timezone\": \"Europe\\/Kyiv\",
    \"locale\": \"fr\",
    \"max_users\": 84,
    \"is_active\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/organizations/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "slug": "n",
    "email": "[email protected]",
    "phone": "vdljnikhwaykcmyu",
    "website": "w",
    "address": "p",
    "city": "w",
    "province": "l",
    "postal_code": "vqwrsitcpscqldzs",
    "country": "nr",
    "timezone": "Europe\/Kyiv",
    "locale": "fr",
    "max_users": 84,
    "is_active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/organizations/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'slug' => 'n',
            'email' => '[email protected]',
            'phone' => 'vdljnikhwaykcmyu',
            'website' => 'w',
            'address' => 'p',
            'city' => 'w',
            'province' => 'l',
            'postal_code' => 'vqwrsitcpscqldzs',
            'country' => 'nr',
            'timezone' => 'Europe/Kyiv',
            'locale' => 'fr',
            'max_users' => 84,
            'is_active' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/organizations/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'organisation. Example: 1

Body Parameters

name   string  optional    

Le champ value doit avoir au moins 2 caractères. Le champ value ne peut pas avoir plus de 255 caractères. Example: b

slug   string  optional    

Must match the regex /^[a-z0-9]+(?:-[a-z0-9]+)*$/. Le champ value ne peut pas avoir plus de 255 caractères. Example: n

email   string  optional    

Le champ value doit être une adresse courriel valide. Le champ value ne peut pas avoir plus de 255 caractères. Example: [email protected]

phone   string  optional    

Le champ value ne peut pas avoir plus de 20 caractères. Example: vdljnikhwaykcmyu

website   string  optional    

Must be a valid URL. Le champ value ne peut pas avoir plus de 255 caractères. Example: w

address   string  optional    

Le champ value ne peut pas avoir plus de 500 caractères. Example: p

city   string  optional    

Le champ value ne peut pas avoir plus de 100 caractères. Example: w

province   string  optional    

Le champ value ne peut pas avoir plus de 100 caractères. Example: l

postal_code   string  optional    

Le champ value ne peut pas avoir plus de 20 caractères. Example: vqwrsitcpscqldzs

country   string  optional    

Le champ value doit avoir 2 caractères. Example: nr

timezone   string  optional    

Must be a valid time zone, such as Africa/Accra. Example: Europe/Kyiv

locale   string  optional    

Example: fr

Must be one of:
  • fr
  • en
max_users   integer  optional    

Le champ value doit être d'au moins 0. Example: 84

is_active   boolean  optional    

Example: true

settings   object  optional    
terminology   object  optional    

Supprimer une organisation

requires authentication

Supprime une organisation (superadmin uniquement).

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/organizations/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/organizations/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/organizations/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/organizations/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'organisation. Example: 1

Salles

API pour gérer les salles et locaux. Les salles sont les espaces physiques où se déroulent les cours.

Lister les salles

requires authentication

Récupère la liste des salles de l'organisation avec options de filtrage.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/rooms?active_only=1&room_type=classroom&building=B%C3%A2timent+A&min_capacity=30&search=Labo&per_page=15&page=1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/rooms"
);

const params = {
    "active_only": "1",
    "room_type": "classroom",
    "building": "Bâtiment A",
    "min_capacity": "30",
    "search": "Labo",
    "per_page": "15",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/rooms';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'active_only' => '1',
            'room_type' => 'classroom',
            'building' => 'Bâtiment A',
            'min_capacity' => '30',
            'search' => 'Labo',
            'per_page' => '15',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": [
        {
            "id": 1,
            "name": "Salle A101",
            "code": "A101",
            "building": "Bâtiment A",
            "room_type": "classroom",
            "capacity": 35,
            "is_active": true,
            "equipment": [
                "projector",
                "whiteboard"
            ]
        }
    ],
    "links": {
        "first": "...",
        "last": "...",
        "prev": null,
        "next": "..."
    },
    "meta": {
        "current_page": 1,
        "last_page": 3,
        "per_page": 15,
        "total": 45
    }
}
 

Request   

GET api/v1/rooms

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

active_only   boolean  optional    

Filtrer uniquement les salles actives. Example: true

room_type   string  optional    

Filtrer par type de salle. Example: classroom

building   string  optional    

Filtrer par bâtiment. Example: Bâtiment A

min_capacity   integer  optional    

Filtrer par capacité minimale. Example: 30

search   string  optional    

Rechercher par nom ou code. Example: Labo

per_page   integer  optional    

Nombre de résultats par page. Example: 15

page   integer  optional    

Numéro de page. Example: 1

Options de sélection

requires authentication

Récupère une liste simplifiée des salles actives pour alimenter des listes déroulantes.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/rooms/options" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/rooms/options"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/rooms/options';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": [
        {
            "value": 1,
            "label": "Salle A101",
            "code": "A101",
            "capacity": 35,
            "type": "classroom"
        },
        {
            "value": 2,
            "label": "Laboratoire B201",
            "code": "B201",
            "capacity": 25,
            "type": "laboratory"
        }
    ]
}
 

Request   

GET api/v1/rooms/options

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Types de salles

requires authentication

Récupère la liste des types de salles disponibles dans l'organisation.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/rooms/types" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/rooms/types"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/rooms/types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": [
        "classroom",
        "laboratory",
        "amphitheater",
        "conference_room"
    ]
}
 

Request   

GET api/v1/rooms/types

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Liste des bâtiments

requires authentication

Récupère la liste des bâtiments contenant des salles dans l'organisation.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/rooms/buildings" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/rooms/buildings"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/rooms/buildings';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": [
        "Bâtiment A",
        "Bâtiment B",
        "Pavillon des sciences"
    ]
}
 

Request   

GET api/v1/rooms/buildings

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Afficher une salle

requires authentication

Récupère les détails d'une salle spécifique.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/rooms/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/rooms/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/rooms/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": {
        "id": 1,
        "name": "Salle A101",
        "code": "A101",
        "building": "Bâtiment A",
        "floor": 1,
        "room_type": "classroom",
        "capacity": 35,
        "is_active": true,
        "equipment": [
            "projector",
            "whiteboard",
            "computers"
        ],
        "availability": {
            "monday": [
                "08:00-18:00"
            ]
        }
    }
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Local non trouvé"
}
 

Request   

GET api/v1/rooms/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la salle. Example: 1

Disponibilités d'une salle

requires authentication

Récupère les disponibilités d'une salle pour une session donnée. Inclut les créneaux déjà réservés.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/rooms/1/availability?session_id=1&date=2024-09-15" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": \"architecto\",
    \"date\": \"2026-04-05T18:47:37\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/rooms/1/availability"
);

const params = {
    "session_id": "1",
    "date": "2024-09-15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": "architecto",
    "date": "2026-04-05T18:47:37"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/rooms/1/availability';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'session_id' => '1',
            'date' => '2024-09-15',
        ],
        'json' => [
            'session_id' => 'architecto',
            'date' => '2026-04-05T18:47:37',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": {
        "room": {
            "id": 1,
            "name": "Salle A101",
            "capacity": 35
        },
        "availability": {
            "monday": [
                "08:00-18:00"
            ]
        },
        "scheduled_slots": [
            {
                "id": 1,
                "date": "2024-09-15",
                "day_of_week": 1,
                "start_time": "09:00:00",
                "end_time": "11:00:00",
                "course_id": 5
            }
        ]
    }
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Local non trouvé"
}
 

Request   

GET api/v1/rooms/{id}/availability

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la salle. Example: 1

Query Parameters

session_id   integer     

L'ID de la session d'horaires. Example: 1

date   string  optional    

date Filtrer par date spécifique. Example: 2024-09-15

Body Parameters

session_id   string     

The id of an existing record in the schedule_sessions table. Example: architecto

date   string  optional    

Le champ value doit être une date valide. Example: 2026-04-05T18:47:37

Créer une salle

requires authentication

Crée une nouvelle salle dans l'organisation courante.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/rooms" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Salle A101\",
    \"code\": \"A101\",
    \"description\": \"Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.\",
    \"building\": \"Bâtiment A\",
    \"floor\": 1,
    \"room_type\": \"classroom\",
    \"capacity\": 35,
    \"equipment\": [
        \"architecto\"
    ],
    \"color\": \"#fEEeDb\",
    \"availability\": [
        \"architecto\"
    ],
    \"is_active\": true,
    \"notes\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/rooms"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Salle A101",
    "code": "A101",
    "description": "Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.",
    "building": "Bâtiment A",
    "floor": 1,
    "room_type": "classroom",
    "capacity": 35,
    "equipment": [
        "architecto"
    ],
    "color": "#fEEeDb",
    "availability": [
        "architecto"
    ],
    "is_active": true,
    "notes": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/rooms';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Salle A101',
            'code' => 'A101',
            'description' => 'Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.',
            'building' => 'Bâtiment A',
            'floor' => 1,
            'room_type' => 'classroom',
            'capacity' => 35,
            'equipment' => [
                'architecto',
            ],
            'color' => '#fEEeDb',
            'availability' => [
                'architecto',
            ],
            'is_active' => true,
            'notes' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Créé):


{
  "success": true,
  "message": "Création effectuée",
  "data": {"id": 1, "name": "Salle A101", ...}
}
 

Example response (422, Validation échouée):


{"success": false, "message": "Erreurs de validation", "errors": {...}}
 

Request   

POST api/v1/rooms

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Le nom de la salle. Example: Salle A101

code   string  optional    

Code unique de la salle. Example: A101

description   string  optional    

Le champ value ne peut pas avoir plus de 2000 caractères. Example: Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.

site_id   string  optional    

The id of an existing record in the sites table.

building   string  optional    

Nom du bâtiment. Example: Bâtiment A

floor   integer  optional    

Numéro de l'étage. Example: 1

room_type   string  optional    

Type de salle. Example: classroom

capacity   integer  optional    

Capacité maximale. Example: 35

equipment   string[]  optional    

Liste des équipements.

color   string  optional    

Must match the regex /^#[0-9A-Fa-f]{6}$/. Example: #fEEeDb

availability   string[]  optional    

Disponibilités par jour.

monday   object  optional    
tuesday   object  optional    
wednesday   object  optional    
thursday   object  optional    
friday   object  optional    
saturday   object  optional    
sunday   object  optional    
is_active   boolean  optional    

Salle active. Example: true

notes   string  optional    

Notes additionnelles. Example: architecto

custom_attributes   object  optional    

Modifier une salle

requires authentication

Met à jour les informations d'une salle existante.

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/rooms/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Salle A101\",
    \"code\": \"A101\",
    \"description\": \"Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.\",
    \"building\": \"Bâtiment A\",
    \"floor\": 1,
    \"room_type\": \"classroom\",
    \"capacity\": 35,
    \"equipment\": [
        \"architecto\"
    ],
    \"color\": \"#fEEeDb\",
    \"availability\": [
        \"architecto\"
    ],
    \"is_active\": true,
    \"notes\": \"architecto\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/rooms/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Salle A101",
    "code": "A101",
    "description": "Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.",
    "building": "Bâtiment A",
    "floor": 1,
    "room_type": "classroom",
    "capacity": 35,
    "equipment": [
        "architecto"
    ],
    "color": "#fEEeDb",
    "availability": [
        "architecto"
    ],
    "is_active": true,
    "notes": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/rooms/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Salle A101',
            'code' => 'A101',
            'description' => 'Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.',
            'building' => 'Bâtiment A',
            'floor' => 1,
            'room_type' => 'classroom',
            'capacity' => 35,
            'equipment' => [
                'architecto',
            ],
            'color' => '#fEEeDb',
            'availability' => [
                'architecto',
            ],
            'is_active' => true,
            'notes' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "message": "Salle mise à jour",
  "data": {"id": 1, "name": "Salle A101", ...}
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Local non trouvé"
}
 

Example response (422, Validation échouée):


{"success": false, "message": "Erreurs de validation", "errors": {...}}
 

Request   

PUT api/v1/rooms/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la salle. Example: 1

Body Parameters

name   string  optional    

Le nom de la salle. Example: Salle A101

code   string  optional    

Code unique de la salle. Example: A101

description   string  optional    

Le champ value ne peut pas avoir plus de 2000 caractères. Example: Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui.

site_id   string  optional    

The id of an existing record in the sites table.

building   string  optional    

Nom du bâtiment. Example: Bâtiment A

floor   integer  optional    

Numéro de l'étage. Example: 1

room_type   string  optional    

Type de salle. Example: classroom

capacity   integer  optional    

Capacité maximale. Example: 35

equipment   string[]  optional    

Liste des équipements.

color   string  optional    

Must match the regex /^#[0-9A-Fa-f]{6}$/. Example: #fEEeDb

availability   string[]  optional    

Disponibilités par jour.

monday   object  optional    
tuesday   object  optional    
wednesday   object  optional    
thursday   object  optional    
friday   object  optional    
saturday   object  optional    
sunday   object  optional    
is_active   boolean  optional    

Salle active. Example: true

notes   string  optional    

Notes additionnelles. Example: architecto

custom_attributes   object  optional    

Supprimer une salle

requires authentication

Supprime une salle (soft delete). La salle ne sera plus visible mais ses données historiques sont conservées.

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/rooms/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/rooms/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/rooms/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "message": "Suppression effectuée"
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Local non trouvé"
}
 

Example response (409, Conflit):


{
    "success": false,
    "message": "Impossible de supprimer: la salle est utilisée"
}
 

Request   

DELETE api/v1/rooms/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la salle. Example: 1

Sessions d'horaires

API pour gérer les sessions d'horaires. Une session représente une période (semestre, année) contenant des entrées d'horaires.

Lister les sessions

requires authentication

Récupère la liste des sessions d'horaires de l'organisation.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/sessions?status=published&search=Automne+2024&per_page=15&page=1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions"
);

const params = {
    "status": "published",
    "search": "Automne 2024",
    "per_page": "15",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'status' => 'published',
            'search' => 'Automne 2024',
            'per_page' => '15',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": [
        {
            "id": 1,
            "name": "Session Automne 2024",
            "description": "Horaires du semestre d'automne",
            "academic_year": "2024-2025",
            "semester": "automne",
            "start_date": "2024-09-01",
            "end_date": "2024-12-20",
            "status": "published",
            "entries_count": 150,
            "created_at": "2024-08-15T10:30:00Z"
        }
    ],
    "links": {
        "first": "...",
        "last": "...",
        "prev": null,
        "next": "..."
    },
    "meta": {
        "current_page": 1,
        "last_page": 3,
        "per_page": 15,
        "total": 42
    }
}
 

Request   

GET api/v1/sessions

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

status   string  optional    

Filtrer par statut (draft, published, archived). Example: published

search   string  optional    

Rechercher par nom. Example: Automne 2024

per_page   integer  optional    

Nombre de résultats par page. Example: 15

page   integer  optional    

Numéro de page. Example: 1

Afficher une session

requires authentication

Récupère les détails d'une session d'horaires spécifique.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/sessions/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "data": {
        "id": 1,
        "name": "Session Automne 2024",
        "description": "Horaires du semestre d'automne",
        "academic_year": "2024-2025",
        "semester": "automne",
        "start_date": "2024-09-01",
        "end_date": "2024-12-20",
        "status": "published",
        "entries_count": 150
    }
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Session non trouvée"
}
 

Request   

GET api/v1/sessions/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session. Example: 1

Créer une session

requires authentication

Crée une nouvelle session d'horaires.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sessions" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Session Automne 2024\",
    \"description\": \"Horaires du semestre d\'automne\",
    \"academic_year\": \"2024-2025\",
    \"semester\": \"automne\",
    \"start_date\": \"2024-09-01\",
    \"end_date\": \"2024-12-20\",
    \"status\": \"draft\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Session Automne 2024",
    "description": "Horaires du semestre d'automne",
    "academic_year": "2024-2025",
    "semester": "automne",
    "start_date": "2024-09-01",
    "end_date": "2024-12-20",
    "status": "draft"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Session Automne 2024',
            'description' => 'Horaires du semestre d\'automne',
            'academic_year' => '2024-2025',
            'semester' => 'automne',
            'start_date' => '2024-09-01',
            'end_date' => '2024-12-20',
            'status' => 'draft',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Créée):


{
    "success": true,
    "message": "Ressource créée avec succès",
    "data": {
        "id": 1,
        "name": "Session Automne 2024",
        "status": "draft"
    }
}
 

Example response (422, Validation échouée):


{
    "message": "The name field is required.",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}
 

Request   

POST api/v1/sessions

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Le nom de la session. Example: Session Automne 2024

description   string  optional    

Description de la session. Example: Horaires du semestre d'automne

academic_year   string  optional    

Année académique (généré automatiquement si absent). Example: 2024-2025

semester   string  optional    

Semestre (généré automatiquement si absent). Example: automne

start_date   date     

Date de début. Example: 2024-09-01

end_date   date     

Date de fin (doit être après start_date). Example: 2024-12-20

status   string  optional    

Statut initial (draft par défaut). Example: draft

Modifier une session

requires authentication

Met à jour une session d'horaires existante.

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/sessions/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Session Automne 2024 - Modifié\",
    \"description\": \"Description mise à jour\",
    \"academic_year\": \"d\",
    \"semester\": \"l\",
    \"start_date\": \"2024-09-01\",
    \"end_date\": \"2024-12-20\",
    \"status\": \"published\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Session Automne 2024 - Modifié",
    "description": "Description mise à jour",
    "academic_year": "d",
    "semester": "l",
    "start_date": "2024-09-01",
    "end_date": "2024-12-20",
    "status": "published"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Session Automne 2024 - Modifié',
            'description' => 'Description mise à jour',
            'academic_year' => 'd',
            'semester' => 'l',
            'start_date' => '2024-09-01',
            'end_date' => '2024-12-20',
            'status' => 'published',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{"success": true, "message": "Session mise à jour", "data": {...}}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Session non trouvée"
}
 

Request   

PUT api/v1/sessions/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session. Example: 1

Body Parameters

name   string  optional    

Le nom de la session. Example: Session Automne 2024 - Modifié

description   string  optional    

Description de la session. Example: Description mise à jour

academic_year   string  optional    

Must match the regex /^\d{4}-\d{4}$/. Le champ value ne peut pas avoir plus de 50 caractères. Example: d

semester   string  optional    

Le champ value ne peut pas avoir plus de 50 caractères. Example: l

Must be one of:
  • automne
  • hiver
  • ete
  • printemps
  • annuel
start_date   date  optional    

Date de début. Example: 2024-09-01

end_date   date  optional    

Date de fin. Example: 2024-12-20

status   string  optional    

Statut (draft, published, archived). Example: published

Supprimer une session

requires authentication

Supprime une session d'horaires (soft delete). Les sessions publiées ne peuvent pas être supprimées.

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/sessions/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Supprimée):


{
    "success": true,
    "message": "Session supprimée"
}
 

Example response (400, Session publiée):


{
    "success": false,
    "message": "Impossible de supprimer une session publiée"
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Session non trouvée"
}
 

Request   

DELETE api/v1/sessions/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session. Example: 1

Publier une session

requires authentication

Change le statut d'une session en "published". Une session publiée est visible par tous les utilisateurs.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sessions/1/publish" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1/publish"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1/publish';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Publiée):


{"success": true, "message": "Session publiée", "data": {...}}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Session non trouvée"
}
 

Request   

POST api/v1/sessions/{id}/publish

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session. Example: 1

Archiver une session

requires authentication

Change le statut d'une session en "archived". Une session archivée est conservée mais n'est plus modifiable.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sessions/1/archive" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1/archive"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1/archive';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Archivée):


{"success": true, "message": "Session archivée", "data": {...}}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Session non trouvée"
}
 

Request   

POST api/v1/sessions/{id}/archive

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session. Example: 1

Dupliquer une session

requires authentication

Crée une copie complète d'une session avec toutes ses entrées d'horaires. La nouvelle session est en statut "draft".

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sessions/1/duplicate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1/duplicate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1/duplicate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Dupliquée):


{
    "success": true,
    "message": "Session dupliquée",
    "data": {
        "id": 2,
        "name": "Session Automne 2024 (copie)",
        "status": "draft",
        "entries_count": 150
    }
}
 

Example response (404, Non trouvée):


{
    "success": false,
    "message": "Session non trouvée"
}
 

Request   

POST api/v1/sessions/{id}/duplicate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session à dupliquer. Example: 1

Lancer une génération d'horaires

requires authentication

Lance la génération automatique d'horaires pour une session. La génération s'exécute en arrière-plan et peut être suivie via l'endpoint de statut.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sessions/1/generate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"algorithm\": \"hybrid\",
    \"preset_id\": 1,
    \"clear_existing\": true,
    \"options\": {
        \"max_iterations\": 22,
        \"timeout\": 7,
        \"population_size\": 16,
        \"mutation_rate\": 1,
        \"crossover_rate\": 1
    }
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1/generate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "algorithm": "hybrid",
    "preset_id": 1,
    "clear_existing": true,
    "options": {
        "max_iterations": 22,
        "timeout": 7,
        "population_size": 16,
        "mutation_rate": 1,
        "crossover_rate": 1
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1/generate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'algorithm' => 'hybrid',
            'preset_id' => 1,
            'clear_existing' => true,
            'options' => [
                'max_iterations' => 22,
                'timeout' => 7,
                'population_size' => 16,
                'mutation_rate' => 1,
                'crossover_rate' => 1,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (202, Génération lancée):


{
    "success": true,
    "message": "Génération lancée",
    "data": {
        "generation_run_id": 123,
        "job_id": "schedule_gen_abc123",
        "status": "pending",
        "algorithm": "hybrid"
    }
}
 

Example response (400, Session non modifiable):


{
    "success": false,
    "message": "Impossible de générer pour une session publiée"
}
 

Example response (409, Génération en cours):


{
    "success": false,
    "message": "Une génération est déjà en cours pour cette session"
}
 

Request   

POST api/v1/sessions/{id}/generate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session. Example: 1

Body Parameters

algorithm   string  optional    

Algorithme à utiliser (greedy, backtracking, genetic, simulated_annealing, hybrid). Example: hybrid

preset_id   integer  optional    

ID d'un preset d'optimisation à utiliser. Example: 1

clear_existing   boolean  optional    

Supprimer les entrées existantes non verrouillées. Example: true

options   object  optional    

Options supplémentaires pour l'algorithme.

max_iterations   integer  optional    

Le champ value doit être d'au moins 100. Le champ value ne peut pas être supérieur à 100000. Example: 22

timeout   integer  optional    

Le champ value doit être d'au moins 30. Le champ value ne peut pas être supérieur à 3600. Example: 7

population_size   integer  optional    

Le champ value doit être d'au moins 10. Le champ value ne peut pas être supérieur à 1000. Example: 16

mutation_rate   number  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 1. Example: 1

crossover_rate   number  optional    

Le champ value doit être d'au moins 0. Le champ value ne peut pas être supérieur à 1. Example: 1

Optimiser un horaire existant

requires authentication

Lance une optimisation de l'horaire existant pour améliorer sa qualité sans supprimer les entrées existantes.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sessions/1/optimize" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"algorithm\": \"simulated_annealing\",
    \"iterations\": 5000,
    \"target_score\": 95
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1/optimize"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "algorithm": "simulated_annealing",
    "iterations": 5000,
    "target_score": 95
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1/optimize';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'algorithm' => 'simulated_annealing',
            'iterations' => 5000,
            'target_score' => 95,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (202, Optimisation lancée):


{
    "success": true,
    "message": "Optimisation lancée",
    "data": {
        "job_id": "schedule_gen_xyz789",
        "algorithm": "simulated_annealing"
    }
}
 

Request   

POST api/v1/sessions/{id}/optimize

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session. Example: 1

Body Parameters

algorithm   string  optional    

Algorithme d'optimisation (simulated_annealing, genetic). Example: simulated_annealing

iterations   integer  optional    

Nombre maximum d'itérations. Example: 5000

target_score   integer  optional    

Score cible à atteindre. Example: 95

Obtenir le statut d'une génération

requires authentication

Récupère le statut actuel d'une génération en cours ou terminée.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/sessions/1/generation-status?job_id=schedule_gen_abc123" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1/generation-status"
);

const params = {
    "job_id": "schedule_gen_abc123",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1/generation-status';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'job_id' => 'schedule_gen_abc123',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Statut récupéré):


{
    "success": true,
    "data": {
        "status": "running",
        "percentage": 45,
        "algorithm": "hybrid",
        "entries_created": 50,
        "iterations": 1500
    }
}
 

Request   

GET api/v1/sessions/{id}/generation-status

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session. Example: 1

Query Parameters

job_id   string  optional    

L'ID du job de génération. Example: schedule_gen_abc123

Obtenir le dernier rapport de validation

requires authentication

Récupère le dernier rapport de validation pour une session.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/sessions/1/validation-report" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1/validation-report"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1/validation-report';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Rapport trouvé):


{
    "success": true,
    "data": {
        "report_id": 456,
        "status": "completed",
        "is_valid": true,
        "errors_count": 0,
        "validated_at": "2024-01-15T10:30:00Z"
    }
}
 

Request   

GET api/v1/sessions/{id}/validation-report

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session. Example: 1

Valider un horaire

requires authentication

Lance une validation complète de l'horaire pour détecter les conflits. La validation peut s'exécuter de façon synchrone (petites sessions) ou asynchrone.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sessions/1/validate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"async\": false,
    \"types\": [
        \"conflicts\",
        \"availability\",
        \"constraints\"
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1/validate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "async": false,
    "types": [
        "conflicts",
        "availability",
        "constraints"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1/validate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'async' => false,
            'types' => [
                'conflicts',
                'availability',
                'constraints',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Validation synchrone):


{
    "success": true,
    "message": "Validation terminée",
    "data": {
        "report_id": 456,
        "status": "completed",
        "is_valid": false,
        "errors_count": 3,
        "warnings_count": 5,
        "conflicts_count": 2
    }
}
 

Example response (202, Validation asynchrone):


{
    "success": true,
    "message": "Validation lancée en arrière-plan",
    "data": {
        "async": true
    }
}
 

Request   

POST api/v1/sessions/{id}/validate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session. Example: 1

Body Parameters

async   boolean  optional    

Forcer l'exécution asynchrone. Example: false

types   string[]  optional    

Types de validation à effectuer.

Annuler une génération en cours

requires authentication

Annule une génération ou optimisation en cours.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/sessions/1/cancel-generation" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/sessions/1/cancel-generation"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/sessions/1/cancel-generation';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Annulée):


{
    "success": true,
    "message": "Génération annulée"
}
 

Example response (404, Aucune génération):


{
    "success": false,
    "message": "Aucune génération en cours"
}
 

Request   

POST api/v1/sessions/{id}/cancel-generation

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de la session. Example: 1

SmartSwap

API pour les échanges intelligents d'entrées d'horaires. Permet d'échanger des créneaux, des salles ou des enseignants entre entrées.

Exécuter un échange

requires authentication

Effectue un échange entre deux entrées d'horaires.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/smart-swap/swap" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"source_entry_id\": 1,
    \"target_entry_id\": 2,
    \"type\": \"time_slot\",
    \"reason\": \"Conflit de salle\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/smart-swap/swap"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "source_entry_id": 1,
    "target_entry_id": 2,
    "type": "time_slot",
    "reason": "Conflit de salle"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/smart-swap/swap';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'source_entry_id' => 1,
            'target_entry_id' => 2,
            'type' => 'time_slot',
            'reason' => 'Conflit de salle',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "message": "Échange effectué avec succès",
    "data": {
        "swap_log_id": 42,
        "changes": {
            "swapped": "time_slot"
        }
    }
}
 

Request   

POST api/v1/smart-swap/swap

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

source_entry_id   integer     

L'ID de l'entrée source. Example: 1

target_entry_id   integer     

L'ID de l'entrée cible. Example: 2

type   string  optional    

Type d'échange (time_slot, room, teacher, full). Example: time_slot

reason   string  optional    

Raison de l'échange. Example: Conflit de salle

Valider un échange

requires authentication

Vérifie si un échange est possible sans l'exécuter.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/smart-swap/validate" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"source_entry_id\": 1,
    \"target_entry_id\": 2,
    \"type\": \"room\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/smart-swap/validate"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "source_entry_id": 1,
    "target_entry_id": 2,
    "type": "room"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/smart-swap/validate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'source_entry_id' => 1,
            'target_entry_id' => 2,
            'type' => 'room',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Valide):


{
    "success": true,
    "message": "Échange validé sans conflits",
    "warnings": []
}
 

Request   

POST api/v1/smart-swap/validate

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

source_entry_id   integer     

L'ID de l'entrée source. Example: 1

target_entry_id   integer     

L'ID de l'entrée cible. Example: 2

type   string  optional    

Type d'échange. Example: room

Exécuter plusieurs échanges

requires authentication

Effectue plusieurs échanges en une seule transaction.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/smart-swap/batch" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"swaps\": [
        {
            \"source_entry_id\": 1,
            \"target_entry_id\": 2,
            \"type\": \"room\"
        }
    ]
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/smart-swap/batch"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "swaps": [
        {
            "source_entry_id": 1,
            "target_entry_id": 2,
            "type": "room"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/smart-swap/batch';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'swaps' => [
                [
                    'source_entry_id' => 1,
                    'target_entry_id' => 2,
                    'type' => 'room',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "message": "2 échanges effectués",
  "data": {"results": [...]}
}
 

Request   

POST api/v1/smart-swap/batch

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

swaps   string[]     

Liste des échanges.

source_entry_id   integer     

The id of an existing record in the schedule_entries table. Example: 16

target_entry_id   integer     

The id of an existing record in the schedule_entries table. Example: 16

type   string  optional    

Example: room

Must be one of:
  • time_slot
  • room
  • teacher
  • full

Analyser l'impact d'un échange

requires authentication

Retourne une analyse détaillée de l'impact d'un échange potentiel.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/smart-swap/analyze" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"source_entry_id\": 1,
    \"target_entry_id\": 2,
    \"type\": \"full\"
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/smart-swap/analyze"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "source_entry_id": 1,
    "target_entry_id": 2,
    "type": "full"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/smart-swap/analyze';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'source_entry_id' => 1,
            'target_entry_id' => 2,
            'type' => 'full',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": {
        "source_entry": {
            "id": 1,
            "course": "Math",
            "teacher": "Dupont"
        },
        "target_entry": {
            "id": 2,
            "course": "Physique",
            "teacher": "Martin"
        },
        "affected_entities": {
            "teachers": [
                1,
                2
            ],
            "rooms": [
                3
            ]
        },
        "potential_conflicts": []
    }
}
 

Request   

POST api/v1/smart-swap/analyze

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

source_entry_id   integer     

L'ID de l'entrée source. Example: 1

target_entry_id   integer     

L'ID de l'entrée cible. Example: 2

type   string  optional    

Type d'échange. Example: full

Obtenir des suggestions d'échange

requires authentication

Retourne des suggestions d'échanges possibles pour une entrée.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/smart-swap/entries/1/suggestions?limit=10" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/smart-swap/entries/1/suggestions"
);

const params = {
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/smart-swap/entries/1/suggestions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'limit' => '10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": {
        "suggestions": [
            {
                "target_entry_id": 5,
                "score": 0.85,
                "type": "time_slot",
                "reason": "Améliore la disponibilité"
            }
        ]
    }
}
 

Request   

GET api/v1/smart-swap/entries/{entry_id}/suggestions

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry_id   integer     

L'ID de l'entrée. Example: 1

Query Parameters

limit   integer  optional    

Nombre maximum de suggestions. Example: 10

Trouver des candidats d'échange

requires authentication

Recherche des entrées candidates pour un échange avec filtres.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/smart-swap/entries/1/candidates?teacher_id=5&room_id=3&limit=20" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/smart-swap/entries/1/candidates"
);

const params = {
    "teacher_id": "5",
    "room_id": "3",
    "limit": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/smart-swap/entries/1/candidates';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'teacher_id' => '5',
            'room_id' => '3',
            'limit' => '20',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{"success": true, "data": {"candidates": [...]}}
 

Request   

GET api/v1/smart-swap/entries/{entry_id}/candidates

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry_id   integer     

L'ID de l'entrée. Example: 1

Query Parameters

teacher_id   integer  optional    

Filtrer par enseignant. Example: 5

room_id   integer  optional    

Filtrer par salle. Example: 3

limit   integer  optional    

Nombre maximum de résultats. Example: 20

Historique d'une entrée

requires authentication

Retourne l'historique des échanges impliquant une entrée spécifique.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/smart-swap/entries/1/history" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/smart-swap/entries/1/history"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/smart-swap/entries/1/history';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "data": {
    "entry_id": 1,
    "swaps": [...],
    "count": 3
  }
}
 

Request   

GET api/v1/smart-swap/entries/{entry_id}/history

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

entry_id   integer     

L'ID de l'entrée. Example: 1

Annuler un échange

requires authentication

Annule un échange précédemment effectué (si possible).

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/smart-swap/undo/42" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/smart-swap/undo/42"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/smart-swap/undo/42';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Annulé):


{
    "success": true,
    "message": "Échange annulé avec succès"
}
 

Request   

POST api/v1/smart-swap/undo/{swap_log_id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

swap_log_id   integer     

L'ID du log d'échange. Example: 42

Historique des échanges

requires authentication

Retourne l'historique des échanges pour une session.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/smart-swap/history?session_id=1&limit=50" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": 16,
    \"limit\": 22
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/smart-swap/history"
);

const params = {
    "session_id": "1",
    "limit": "50",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": 16,
    "limit": 22
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/smart-swap/history';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'session_id' => '1',
            'limit' => '50',
        ],
        'json' => [
            'session_id' => 16,
            'limit' => 22,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
  "success": true,
  "data": {
    "swaps": [...],
    "count": 15
  }
}
 

Request   

GET api/v1/smart-swap/history

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

session_id   integer     

L'ID de la session. Example: 1

limit   integer  optional    

Nombre maximum de résultats. Example: 50

Body Parameters

session_id   integer     

The id of an existing record in the schedule_sessions table. Example: 16

limit   integer  optional    

Must be at least 1. Must not be greater than 200. Example: 22

Statistiques d'échanges

requires authentication

Retourne les statistiques d'échanges pour une session.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/smart-swap/statistics?session_id=1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": 16
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/smart-swap/statistics"
);

const params = {
    "session_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/smart-swap/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'session_id' => '1',
        ],
        'json' => [
            'session_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Succès):


{
    "success": true,
    "data": {
        "total_swaps": 45,
        "executed_swaps": 42,
        "undone_swaps": 3,
        "swaps_by_type": {
            "time_slot": 20,
            "room": 15,
            "teacher": 10
        },
        "recent_swaps": 8,
        "active_users": 4
    }
}
 

Request   

GET api/v1/smart-swap/statistics

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

session_id   integer     

L'ID de la session. Example: 1

Body Parameters

session_id   integer     

The id of an existing record in the schedule_sessions table. Example: 16

Utilisateurs

API pour gérer les utilisateurs de l'organisation.

Profil de l'utilisateur connecté

requires authentication

Récupère le profil de l'utilisateur authentifié.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/users/me" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/users/me"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/users/me';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/users/me

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Lister les utilisateurs

requires authentication

Récupère la liste des utilisateurs de l'organisation avec options de filtrage.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/users?active_only=1&role=admin&search=jean&per_page=15" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/users"
);

const params = {
    "active_only": "1",
    "role": "admin",
    "search": "jean",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/users';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'active_only' => '1',
            'role' => 'admin',
            'search' => 'jean',
            'per_page' => '15',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/users

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

active_only   boolean  optional    

Filtrer uniquement les utilisateurs actifs. Example: true

role   string  optional    

Filtrer par rôle. Example: admin

search   string  optional    

Rechercher par nom ou email. Example: jean

per_page   integer  optional    

Nombre de résultats par page. Example: 15

Options de sélection

requires authentication

Récupère une liste simplifiée des utilisateurs actifs pour les listes déroulantes.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/users/options" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/users/options"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/users/options';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/users/options

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Afficher un utilisateur

requires authentication

Récupère les détails d'un utilisateur spécifique.

Example request:
curl --request GET \
    --get "https://creation_horaire.test/api/v1/users/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/users/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/users/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()
vary: Origin
 

{
    "error": {
        "code": "AUTHENTICATION_FAILED",
        "message": "Identifiants invalides",
        "context": {
            "reason": "invalid_credentials"
        }
    }
}
 

Request   

GET api/v1/users/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'utilisateur. Example: 1

Créer un utilisateur

requires authentication

Crée un nouvel utilisateur dans l'organisation courante.

Example request:
curl --request POST \
    "https://creation_horaire.test/api/v1/users" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Jean Dupont\",
    \"email\": \"[email protected]\",
    \"phone\": \"iyvdljnikhwaykcm\",
    \"role\": \"scheduler\",
    \"is_active\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/users"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Jean Dupont",
    "email": "[email protected]",
    "phone": "iyvdljnikhwaykcm",
    "role": "scheduler",
    "is_active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/users';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Jean Dupont',
            'email' => '[email protected]',
            'phone' => 'iyvdljnikhwaykcm',
            'role' => 'scheduler',
            'is_active' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

POST api/v1/users

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Le nom de l'utilisateur. Example: Jean Dupont

email   string     

L'email unique. Example: [email protected]

phone   string  optional    

Le champ value ne peut pas avoir plus de 20 caractères. Example: iyvdljnikhwaykcm

role   string  optional    

Le rôle à assigner. Example: scheduler

is_active   boolean  optional    

Utilisateur actif. Example: true

Modifier un utilisateur

requires authentication

Met à jour les informations d'un utilisateur existant.

Example request:
curl --request PUT \
    "https://creation_horaire.test/api/v1/users/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"[email protected]\",
    \"phone\": \"iyvdljnikhwaykcm\",
    \"role\": \"architecto\",
    \"is_active\": true
}"
const url = new URL(
    "https://creation_horaire.test/api/v1/users/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "[email protected]",
    "phone": "iyvdljnikhwaykcm",
    "role": "architecto",
    "is_active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/users/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'b',
            'email' => '[email protected]',
            'phone' => 'iyvdljnikhwaykcm',
            'role' => 'architecto',
            'is_active' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

PUT api/v1/users/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'utilisateur. Example: 1

Body Parameters

name   string  optional    

Le champ value doit avoir au moins 2 caractères. Le champ value ne peut pas avoir plus de 255 caractères. Example: b

email   string  optional    

Le champ value doit être une adresse courriel valide. Le champ value ne peut pas avoir plus de 255 caractères. Example: [email protected]

phone   string  optional    

Le champ value ne peut pas avoir plus de 20 caractères. Example: iyvdljnikhwaykcm

role   string  optional    

The name of an existing record in the roles table. Example: architecto

is_active   boolean  optional    

Example: true

Supprimer un utilisateur

requires authentication

Désactive un utilisateur (soft delete).

Example request:
curl --request DELETE \
    "https://creation_horaire.test/api/v1/users/1" \
    --header "Authorization: Bearer {VOTRE_TOKEN_BEARER}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://creation_horaire.test/api/v1/users/1"
);

const headers = {
    "Authorization": "Bearer {VOTRE_TOKEN_BEARER}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://creation_horaire.test/api/v1/users/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {VOTRE_TOKEN_BEARER}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request   

DELETE api/v1/users/{id}

Headers

Authorization        

Example: Bearer {VOTRE_TOKEN_BEARER}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

L'ID de l'utilisateur. Example: 1