MENU navbar-image

Introduction

Documentation de l'API de l'application Programme 31 Jours

This documentation aims to provide all the information you need to work with our API.

Base URL

https://api-prog31jours.charisma.fr

Authenticating requests

This API is not authenticated.

01 - User Authentication

POST /api/logout

requires authentication

Logout the user's session

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/logout"
);

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

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

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

POST api/logout

GET /api/userinfo

requires authentication

Get the user's information

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/profile"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/profile',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "id": 1,
    "name": "Admin",
    "email": "admin@admin.com",
    "firstname": "Admin",
    "birthdate": null,
    "civilite": "Mr",
    "civil_status": null,
    "mobile_phone": null,
    "secteur_gf": null,
    "reseau_md": null,
    "autre_departement": null,
    "genre": null,
    "created_at": null,
    "updated_at": "2022-01-11 13:15:54",
    "is_active": 1,
    "roles": [
        {
            "id": 1,
            "title": "Admin système"
        },
        {}
    ]
}
 

Request      

GET api/profile

GET /api/profils

requires authentication

Get the profile's list

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/profiles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/profiles"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/profiles',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


[
    {
        "id": "76c378c8-bf14-4460-b350-fd7a0fc6da3a",
        "name": "Prog31 Administrateurs",
        "path": "/Prog31 Administrateurs",
        "profil_code": "administrateur",
        "profil_name": "Administrateur"
    },
    {
        "...": "..."
    }
]
 

Request      

GET api/profiles

POST /api/login

Request a token for a user's session after providing credentials

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"admin@admin.com\",
    \"password\": \"admin\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/login"
);

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

let body = {
    "email": "admin@admin.com",
    "password": "admin"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/login',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'admin@admin.com',
            'password' => 'admin',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "accessToken": "eyJhbGciOiJSUz...O3pGQ",
    "refreshToken": "eyJhbGci...RT8",
    "accessExpiresIn": 1800,
    "refreshExpiresIn": 1800,
    "tokenType": "Bearer",
    "scope": "openid profile email"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/login

Body Parameters

email  string  

The user's email. value doit être une adresse e-mail valide.

password  string  

The user's password.

POST /api/forgot-password

Forgot password process

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/forgot-password"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/forgot-password',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/forgot-password

Get new token from refresh token

Get a new token from refresh token

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/refresh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"refresh_token\": \"ipsa\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/refresh"
);

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

let body = {
    "refresh_token": "ipsa"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/refresh',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'refresh_token' => 'ipsa',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "accessToken": "eyJhbGciOiJSUz...O3pGQ",
    "refreshToken": null,
    "accessExpiresIn": 1800,
    "refreshExpiresIn": 1800,
    "tokenType": "Bearer",
    "scope": "openid profile email"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/refresh

Body Parameters

refresh_token  string  

02 - Utilisateurs

Lister les utilisateurs

requires authentication

Permet de recuperer la liste des utilisateurs avec leurs roles et leur team

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/users"
);

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

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

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/users

Créer un utilisateur

requires authentication

Permet de créer une nouvel utilisateur

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Doe\",
    \"email\": \"john.doe@localhost.com\",
    \"firstname\": \"John\",
    \"mobile_phone\": \"01-23-45-67-89\",
    \"genre\": \"Homme\",
    \"profils\": {
        \"a\": \"Profil a\",
        \"b\": \"profil b\",
        \"c\": \"profil c\"
    }
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/users"
);

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

let body = {
    "name": "Doe",
    "email": "john.doe@localhost.com",
    "firstname": "John",
    "mobile_phone": "01-23-45-67-89",
    "genre": "Homme",
    "profils": {
        "a": "Profil a",
        "b": "profil b",
        "c": "profil c"
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/users',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Doe',
            'email' => 'john.doe@localhost.com',
            'firstname' => 'John',
            'mobile_phone' => '01-23-45-67-89',
            'genre' => 'Homme',
            'profils' => [
                'a' => 'Profil a',
                'b' => 'profil b',
                'c' => 'profil c',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "id": 1,
    "name": "Admin",
    "email": "admin@admin.com",
    "firstname": "Admin",
    "birthdate": null,
    "civilite": "Mr",
    "civil_status": null,
    "mobile_phone": null,
    "secteur_gf": null,
    "reseau_md": null,
    "autre_departement": null,
    "genre": null,
    "created_at": null,
    "updated_at": "2022-01-11 13:15:54",
    "is_active": 1,
    "roles": [
        {
            "id": 1,
            "title": "Admin système"
        },
        {}
    ]
}
 

Request      

POST api/v1/users

Body Parameters

name  string  

Nom de l'utilisateur.

email  string  

Email de de l'utilisateur.

firstname  string  

Prénom de l'utilisateur.

mobile_phone  string optional  

Téléphone mobile de l'utilisateur.

genre  string optional  

Homme ou Femme.

profils  string[] optional  

Liste des profils à affecter.

Afficher un utilisateur

requires authentication

Permet de récupérer les détails d'un utilisateur

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/users/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/users/1"
);

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

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

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "id": 1,
    "name": "Admin",
    "email": "admin@admin.com",
    "firstname": "Admin",
    "birthdate": null,
    "civilite": "Mr",
    "civil_status": null,
    "mobile_phone": null,
    "secteur_gf": null,
    "reseau_md": null,
    "autre_departement": null,
    "genre": null,
    "created_at": null,
    "updated_at": "2022-01-11 13:15:54",
    "is_active": 1,
    "roles": [
        {
            "id": 1,
            "title": "Admin système"
        },
        {}
    ]
}
 

Request      

GET api/v1/users/{id}

URL Parameters

id  integer  

The ID of the user.

Modifier un utilisateur

requires authentication

Permet de modifier un utilisateur

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/users/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Doe\",
    \"roles\": [
        1,
        2,
        3
    ],
    \"firstname\": \"John\",
    \"birthdate\": \"2022-01-11\",
    \"mobile_phone\": \"01-23-45-67-89\",
    \"reseau_md\": \"MD A\",
    \"autre_departement\": \"modi\",
    \"genre\": \"Homme\",
    \"civilite\": \"Mr\",
    \"civil_status\": \"Célibataire\",
    \"is_active\": true
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/users/1"
);

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

let body = {
    "name": "Doe",
    "roles": [
        1,
        2,
        3
    ],
    "firstname": "John",
    "birthdate": "2022-01-11",
    "mobile_phone": "01-23-45-67-89",
    "reseau_md": "MD A",
    "autre_departement": "modi",
    "genre": "Homme",
    "civilite": "Mr",
    "civil_status": "Célibataire",
    "is_active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/users/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Doe',
            'roles' => [
                1,
                2,
                3,
            ],
            'firstname' => 'John',
            'birthdate' => '2022-01-11',
            'mobile_phone' => '01-23-45-67-89',
            'reseau_md' => 'MD A',
            'autre_departement' => 'modi',
            'genre' => 'Homme',
            'civilite' => 'Mr',
            'civil_status' => 'Célibataire',
            'is_active' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "id": 1,
    "name": "Admin",
    "email": "admin@admin.com",
    "firstname": "Admin",
    "birthdate": null,
    "civilite": "Mr",
    "civil_status": null,
    "mobile_phone": null,
    "secteur_gf": null,
    "reseau_md": null,
    "autre_departement": null,
    "genre": null,
    "created_at": null,
    "updated_at": "2022-01-11 13:15:54",
    "is_active": 1,
    "roles": [
        {
            "id": 1,
            "title": "Admin système"
        },
        {}
    ]
}
 

Request      

PUT api/v1/users/{id}

PATCH api/v1/users/{id}

URL Parameters

id  integer  

The ID of the user.

Body Parameters

name  string optional  

Nom de l'utilisateur.

roles  integer[] optional  

firstname  string optional  

Prénom de l'utilisateur.

birthdate  string optional  

Date de naissance de l'utilisateur. Must be a valid date in the format Y-m-d.

mobile_phone  string optional  

Téléphone mobile de l'utilisateur.

reseau_md  string optional  

Réseau de MD de l'utilisateur.

autre_departement  string optional  

genre  string optional  

Homme ou Femme.

civilite  string optional  

Mr, Mme ou Mlle.

civil_status  string optional  

Marié(e), Célibataire, Veuf(ve), Divorc(é)....

is_active  boolean  

indique si le compte est actif ou non.

Supprimer un utilisateur

requires authentication

Permet de supprimer un utilisateur (soft delete)

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/users/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/users/1"
);

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

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

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/v1/users/{id}

URL Parameters

id  integer  

The ID of the user.

Listes des genres

requires authentication

Permet de récupérer la liste des genres (Homme ou Femme)

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/user-genres" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/user-genres"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/user-genres',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

GET api/v1/user-genres

Quota par utilisateur

requires authentication

Permet de recuperer le qutota de suivi par utilisateur

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/user-quota" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/user-quota"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/user-quota',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/user-quota

Listes des civilités

requires authentication

Permet de récupérer les civilités (Mr Mme Mlle)

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/user-civilites" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/user-civilites"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/user-civilites',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

GET api/v1/user-civilites

Listes des états civils

requires authentication

Permet de récupérer les civilités (Mr Mme Mlle)

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/user-etat-civils" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/user-etat-civils"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/user-etat-civils',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

GET api/v1/user-etat-civils

Trouver des utilisateurs

requires authentication

Permet de récupérer les détails d'un utilisateur

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/user-find" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"pattern\": \"fuga\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/user-find"
);

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

let body = {
    "pattern": "fuga"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/user-find',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'pattern' => 'fuga',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "id": 1,
    "name": "Admin",
    "email": "admin@admin.com",
    "firstname": "Admin",
    "birthdate": null,
    "civilite": "Mr",
    "civil_status": null,
    "mobile_phone": null,
    "secteur_gf": null,
    "reseau_md": null,
    "autre_departement": null,
    "genre": null,
    "created_at": null,
    "updated_at": "2022-01-11 13:15:54",
    "is_active": 1,
    "roles": [
        {
            "id": 1,
            "title": "Admin système"
        },
        {}
    ]
}
 

Request      

POST api/v1/user-find

Body Parameters

pattern  string  

motif de recherche.

03 - Contacts

Lister les contacts

requires authentication

Permet de recuperer la liste des utilisateurs avec leurs roles et leur team

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contacts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contacts"
);

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

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

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contacts

Créer un contact

requires authentication

Permet de créer une nouveau contact

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/contacts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"lastname\": \"ducimus\",
    \"firstname\": \"Jean\",
    \"etat_civil\": \"Marié(e)\",
    \"birthdate\": \"2022-01-11\",
    \"metier\": \"Agriculteur\",
    \"telephone\": \"01-23-45-67-89\",
    \"email\": \"aliquam\",
    \"genre\": \"Homme\",
    \"civilite\": \"Mr\",
    \"est_mineur\": false,
    \"source_id\": 1,
    \"subscription_date\": \"2022-01-11\",
    \"ville\": \"Le Blanc-Mesnil\",
    \"code_postal\": \"93150\",
    \"secteur_gf\": \"Secteur 1\",
    \"adresse_postale\": \"7 rue Isaac Newton\",
    \"nationalite\": \"et\",
    \"langue_parlee\": \"ratione\",
    \"autre_telephone\": \"in\",
    \"num_personne_foyer\": \"eos\",
    \"invite_par\": \"omnis\",
    \"date_conversion\": \"2025-02-21\",
    \"conseiller_nc\": \"similique\",
    \"est_candidat_prog31\": true,
    \"est_candidat_visite\": true,
    \"est_converti_cec\": false,
    \"is_livre\": false,
    \"observations\": \"nulla\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contacts"
);

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

let body = {
    "lastname": "ducimus",
    "firstname": "Jean",
    "etat_civil": "Marié(e)",
    "birthdate": "2022-01-11",
    "metier": "Agriculteur",
    "telephone": "01-23-45-67-89",
    "email": "aliquam",
    "genre": "Homme",
    "civilite": "Mr",
    "est_mineur": false,
    "source_id": 1,
    "subscription_date": "2022-01-11",
    "ville": "Le Blanc-Mesnil",
    "code_postal": "93150",
    "secteur_gf": "Secteur 1",
    "adresse_postale": "7 rue Isaac Newton",
    "nationalite": "et",
    "langue_parlee": "ratione",
    "autre_telephone": "in",
    "num_personne_foyer": "eos",
    "invite_par": "omnis",
    "date_conversion": "2025-02-21",
    "conseiller_nc": "similique",
    "est_candidat_prog31": true,
    "est_candidat_visite": true,
    "est_converti_cec": false,
    "is_livre": false,
    "observations": "nulla"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/contacts',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'lastname' => 'ducimus',
            'firstname' => 'Jean',
            'etat_civil' => 'Marié(e)',
            'birthdate' => '2022-01-11',
            'metier' => 'Agriculteur',
            'telephone' => '01-23-45-67-89',
            'email' => 'aliquam',
            'genre' => 'Homme',
            'civilite' => 'Mr',
            'est_mineur' => false,
            'source_id' => 1,
            'subscription_date' => '2022-01-11',
            'ville' => 'Le Blanc-Mesnil',
            'code_postal' => '93150',
            'secteur_gf' => 'Secteur 1',
            'adresse_postale' => '7 rue Isaac Newton',
            'nationalite' => 'et',
            'langue_parlee' => 'ratione',
            'autre_telephone' => 'in',
            'num_personne_foyer' => 'eos',
            'invite_par' => 'omnis',
            'date_conversion' => '2025-02-21',
            'conseiller_nc' => 'similique',
            'est_candidat_prog31' => true,
            'est_candidat_visite' => true,
            'est_converti_cec' => false,
            'is_livre' => false,
            'observations' => 'nulla',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "data": {
        "lastname": "Dupont",
        "firstname": "Marie",
        "etat_civil": "Marié(e)",
        "birthdate": "2022-01-11",
        "metier": "Institutrice",
        "telephone": "01-23-45-67-89",
        "email": "est",
        "genre": "Femme",
        "civilite": "Mme",
        "est_mineur": false,
        "liste_id": 2,
        "source_id": 2,
        "updated_at": "2022-01-12 14:07:21",
        "created_at": "2022-01-12 14:07:21",
        "id": 2,
        "subscription_date": "2023-07-24 16:05:24",
        "ville": null,
        "code_postal": null,
        "secteur_gf": null,
        "adresse_postale": null,
        "liste": {
            "id": 2,
            "libelle": "Persévérance",
            "code": "PSV",
            "description": "Liste des contacts dont le suivi est suspendu"
        },
        "source": {
            "id": 2,
            "libelle": "Evangélisation",
            "code": "EVG",
            "description": "Contact provenant d'une campagne d'évangélisation"
        }
    }
}
 

Request      

POST api/v1/contacts

Body Parameters

lastname  string  

firstname  string  

Prénom du contact.

etat_civil  string optional  

Etat civil du contact.

birthdate  string optional  

Date de naissance du contact. Must be a valid date in the format Y-m-d.

metier  string optional  

Métier du contact.

telephone  string optional  

Téléphone mobile du contact.

email  string optional  

genre  string optional  

Homme ou Femme.

civilite  string optional  

Mr, Mme ou Mlle.

est_mineur  boolean optional  

source_id  integer  

Id d'origine d'inscription du contact.

subscription_date  string  

Date d'inscription ou de conversion. Must be a valid date in the format Y-m-d.

ville  string optional  

Ville de résidence du contact.

code_postal  string optional  

Code postal de résidence du contact.

secteur_gf  string optional  

Secteur de GF de résidence.

adresse_postale  string optional  

Adresse postale du contact.

nationalite  string optional  

langue_parlee  string optional  

autre_telephone  string optional  

num_personne_foyer  string optional  

invite_par  string optional  

date_conversion  string optional  

Must be a valid date in the format Y-m-d.

conseiller_nc  string optional  

est_candidat_prog31  boolean optional  

est_candidat_visite  boolean optional  

est_converti_cec  boolean optional  

is_livre  boolean optional  

Indique si le contact a reçu le livre "31 Jours".

observations  string optional  

Afficher un contact

requires authentication

Permet de récupérer les détails d'un contact

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contacts/12" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contacts/12"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contacts/12',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "Id inconnu"
}
 

Example response (200):


{
    "data": {
        "lastname": "Dupont",
        "firstname": "Marie",
        "etat_civil": "Marié(e)",
        "birthdate": "2022-01-11",
        "metier": "Institutrice",
        "telephone": "01-23-45-67-89",
        "email": "est",
        "genre": "Femme",
        "civilite": "Mme",
        "est_mineur": false,
        "liste_id": 2,
        "source_id": 2,
        "updated_at": "2022-01-12 14:07:21",
        "created_at": "2022-01-12 14:07:21",
        "id": 2,
        "subscription_date": "2023-07-24 16:05:24",
        "ville": null,
        "code_postal": null,
        "secteur_gf": null,
        "adresse_postale": null,
        "liste": {
            "id": 2,
            "libelle": "Persévérance",
            "code": "PSV",
            "description": "Liste des contacts dont le suivi est suspendu"
        },
        "source": {
            "id": 2,
            "libelle": "Evangélisation",
            "code": "EVG",
            "description": "Contact provenant d'une campagne d'évangélisation"
        }
    }
}
 

Request      

GET api/v1/contacts/{id}

URL Parameters

id  integer  

The ID of the contact.

Modifier un contact

requires authentication

Permet de modifier un contact

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/contacts/2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"lastname\": \"eveniet\",
    \"firstname\": \"Jean\",
    \"etat_civil\": \"Marié(e)\",
    \"birthdate\": \"2022-01-11\",
    \"metier\": \"Agriculteur\",
    \"telephone\": \"01-23-45-67-89\",
    \"email\": \"rerum\",
    \"genre\": \"Homme\",
    \"civilite\": \"Mr\",
    \"est_mineur\": false,
    \"liste_id\": 1,
    \"source_id\": 1,
    \"subscription_date\": \"2022-01-11\",
    \"ville\": \"Le Blanc-Mesnil\",
    \"code_postal\": \"93150\",
    \"secteur_gf\": \"Secteur 1\",
    \"adresse_postale\": \"7 rue Isaac Newton\",
    \"is_livre\": false
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contacts/2"
);

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

let body = {
    "lastname": "eveniet",
    "firstname": "Jean",
    "etat_civil": "Marié(e)",
    "birthdate": "2022-01-11",
    "metier": "Agriculteur",
    "telephone": "01-23-45-67-89",
    "email": "rerum",
    "genre": "Homme",
    "civilite": "Mr",
    "est_mineur": false,
    "liste_id": 1,
    "source_id": 1,
    "subscription_date": "2022-01-11",
    "ville": "Le Blanc-Mesnil",
    "code_postal": "93150",
    "secteur_gf": "Secteur 1",
    "adresse_postale": "7 rue Isaac Newton",
    "is_livre": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/contacts/2',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'lastname' => 'eveniet',
            'firstname' => 'Jean',
            'etat_civil' => 'Marié(e)',
            'birthdate' => '2022-01-11',
            'metier' => 'Agriculteur',
            'telephone' => '01-23-45-67-89',
            'email' => 'rerum',
            'genre' => 'Homme',
            'civilite' => 'Mr',
            'est_mineur' => false,
            'liste_id' => 1,
            'source_id' => 1,
            'subscription_date' => '2022-01-11',
            'ville' => 'Le Blanc-Mesnil',
            'code_postal' => '93150',
            'secteur_gf' => 'Secteur 1',
            'adresse_postale' => '7 rue Isaac Newton',
            'is_livre' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "Id inconnu"
}
 

Example response (200):


{
    "data": {
        "lastname": "Dupont",
        "firstname": "Marie",
        "etat_civil": "Marié(e)",
        "birthdate": "2022-01-11",
        "metier": "Institutrice",
        "telephone": "01-23-45-67-89",
        "email": "est",
        "genre": "Femme",
        "civilite": "Mme",
        "est_mineur": false,
        "liste_id": 2,
        "source_id": 2,
        "updated_at": "2022-01-12 14:07:21",
        "created_at": "2022-01-12 14:07:21",
        "id": 2,
        "subscription_date": "2023-07-24 16:05:24",
        "ville": null,
        "code_postal": null,
        "secteur_gf": null,
        "adresse_postale": null,
        "liste": {
            "id": 2,
            "libelle": "Persévérance",
            "code": "PSV",
            "description": "Liste des contacts dont le suivi est suspendu"
        },
        "source": {
            "id": 2,
            "libelle": "Evangélisation",
            "code": "EVG",
            "description": "Contact provenant d'une campagne d'évangélisation"
        }
    }
}
 

Request      

PUT api/v1/contacts/{id}

PATCH api/v1/contacts/{id}

URL Parameters

id  integer  

The ID of the contact.

Body Parameters

lastname  string  

firstname  string  

Prénom du contact.

etat_civil  string optional  

Etat civil du contact.

birthdate  string optional  

Date de naissance du contact. Must be a valid date in the format Y-m-d.

metier  string optional  

Métier du contact.

telephone  string optional  

Téléphone mobile du contact.

email  string optional  

genre  string optional  

Homme ou Femme.

civilite  string optional  

Mr, Mme ou Mlle.

est_mineur  boolean optional  

liste_id  integer optional  

Id de liste de suivi du contact.

source_id  integer  

Id d'origine d'inscription du contact.

subscription_date  string optional  

Date d'inscription ou de conversion. Must be a valid date in the format Y-m-d.

ville  string optional  

Ville de résidence du contact.

code_postal  string optional  

Code postal de résidence du contact.

secteur_gf  string optional  

Secteur de GF de résidence.

adresse_postale  string optional  

Adresse postale du contact.

is_livre  boolean optional  

Indique si le contact a reçu le livre "31 Jours".

Supprimer un contact

requires authentication

Permet de supprimer un contact (soft delete)

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/contacts/18" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contacts/18"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api-prog31jours.charisma.fr/api/v1/contacts/18',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "Id inconnu"
}
 

Request      

DELETE api/v1/contacts/{id}

URL Parameters

id  integer  

The ID of the contact.

Listes des genres

requires authentication

Permet de récupérer la liste des genres (Homme ou Femme)

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-genres" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-genres"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-genres',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "Id inconnu"
}
 

Request      

GET api/v1/contact-genres

Contacts - Liste principale

requires authentication

Permet de recuperer la liste des contacts de la liste principale

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-principale" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-principale"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-principale',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-principale

Contacts - Liste principale Adulte

requires authentication

Permet de recuperer la liste des contacts adultes de la liste principale

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-principale-adulte" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-principale-adulte"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-principale-adulte',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-principale-adulte

Contacts - Liste principale Adolescent

requires authentication

Permet de recuperer la liste des contacts adolescents de la liste principale

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-principale-ado" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-principale-ado"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-principale-ado',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-principale-ado

Contacts - Mes saisies

requires authentication

Permet de recuperer la liste des contacts en attente saisis par l'utilisateur authentifié

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-mes-saisies" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-mes-saisies"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-mes-saisies',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-mes-saisies

Contacts - Liste perséverance

requires authentication

Permet de recuperer la liste des contacts de la liste perseverance

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-perseverance" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-perseverance"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-perseverance',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-perseverance

Contacts - Liste perséverance Adulte

requires authentication

Permet de recuperer la liste des contacts de la liste perseverance

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-perseverance-adulte" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-perseverance-adulte"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-perseverance-adulte',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-perseverance-adulte

Contacts - Liste perséverance Adolescent

requires authentication

Permet de recuperer la liste des contacts de la liste perseverance

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-perseverance-ado" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-perseverance-ado"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-perseverance-ado',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-perseverance-ado

Contacts - Liste attente attribution

requires authentication

Permet de recuperer la liste des contacts en attente d'attribution pour un coach

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-attente" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-attente"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-attente',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-attente

Contacts - Liste attente attribution adulte

requires authentication

Permet de recuperer la liste des contacts adultes en attente d'attribution pour un coach

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-attente-adulte" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-attente-adulte"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-attente-adulte',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-attente-adulte

Contacts - Liste attente attribution adolescents

requires authentication

Permet de recuperer la liste des contacts adolescents en attente d'attribution pour un coach

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-attente-ado" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-attente-ado"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-attente-ado',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-attente-ado

Listes des civilités

requires authentication

Permet de récupérer les civilités (Mr Mme Mlle)

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-civilites" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-civilites"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-civilites',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "Id inconnu"
}
 

Request      

GET api/v1/contact-civilites

Listes des états civils

requires authentication

Permet de récupérer les civilités (Mr Mme Mlle)

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-etat-civils" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-etat-civils"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-etat-civils',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "Id inconnu"
}
 

Request      

GET api/v1/contact-etat-civils

Listes des secteurs de GF

requires authentication

Permet de récupérer les secteurs de GF

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-secteurs-gf" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-secteurs-gf"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-secteurs-gf',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "Id inconnu"
}
 

Request      

GET api/v1/contact-secteurs-gf

Lister les Villes

requires authentication

Permet de récupérer les villes avec code postal et secteur associés

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-villes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-villes"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-villes',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "Id inconnu"
}
 

Request      

GET api/v1/contact-villes

Trouver des contacts

requires authentication

Permet de retrouver des contacts par nom, prénom, email, ou numéro de téléphone

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/contact-find" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"pattern\": \"quia\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-find"
);

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

let body = {
    "pattern": "quia"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/contact-find',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'pattern' => 'quia',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "data": {
        "lastname": "Dupont",
        "firstname": "Marie",
        "etat_civil": "Marié(e)",
        "birthdate": "2022-01-11",
        "metier": "Institutrice",
        "telephone": "01-23-45-67-89",
        "email": "est",
        "genre": "Femme",
        "civilite": "Mme",
        "est_mineur": false,
        "liste_id": 2,
        "source_id": 2,
        "updated_at": "2022-01-12 14:07:21",
        "created_at": "2022-01-12 14:07:21",
        "id": 2,
        "subscription_date": "2023-07-24 16:05:24",
        "ville": null,
        "code_postal": null,
        "secteur_gf": null,
        "adresse_postale": null,
        "liste": {
            "id": 2,
            "libelle": "Persévérance",
            "code": "PSV",
            "description": "Liste des contacts dont le suivi est suspendu"
        },
        "source": {
            "id": 2,
            "libelle": "Evangélisation",
            "code": "EVG",
            "description": "Contact provenant d'une campagne d'évangélisation"
        }
    }
}
 

Request      

POST api/v1/contact-find

Body Parameters

pattern  string  

motif de recherche.

Trouver le secteur GF d'une ville

requires authentication

Permet de retrouver le secteur GF d'une ville à partir de son code postal

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/contact-find-secteur/ipsum" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-find-secteur/ipsum"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/contact-find-secteur/ipsum',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

POST api/v1/contact-find-secteur/{code}

URL Parameters

code  string  

04 - Affectations de suivi

Lister les affectations de suivi

requires authentication

Permet de recuperer la liste des affectations de suivi (coach / contact)

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-contacts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-contacts"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-contacts',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/suivi-contacts

Créer une affectation de suivi

requires authentication

Permet de créer une affectation de suivi

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/suivi-contacts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contact_id\": 1,
    \"coach_id\": 1,
    \"date_debut\": \"2022-01-15 00:00:00\",
    \"date_fin\": \"2022-01-19 00:00:00\",
    \"commentaires\": \"RAS\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-contacts"
);

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

let body = {
    "contact_id": 1,
    "coach_id": 1,
    "date_debut": "2022-01-15 00:00:00",
    "date_fin": "2022-01-19 00:00:00",
    "commentaires": "RAS"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-contacts',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'contact_id' => 1,
            'coach_id' => 1,
            'date_debut' => '2022-01-15 00:00:00',
            'date_fin' => '2022-01-19 00:00:00',
            'commentaires' => 'RAS',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "data": {
        "contact_id": 2,
        "coach_id": 2,
        "date_debut": "2022-01-18 16:30:11",
        "updated_at": "2022-01-18 16:30:11",
        "created_at": "2022-01-18 16:30:11",
        "id": 3,
        "contact": {
            "id": 2,
            "civilite": "Mme",
            "lastname": "Dupont",
            "firstname": "Marie",
            "etat_civil": "Marié(e)",
            "genre": "Femme",
            "birthdate": "2022-01-11",
            "est_mineur": 0,
            "metier": "Agriculteur",
            "telephone": "01-23-45-67-89",
            "email": "est",
            "created_at": "2022-01-12 14:07:21",
            "updated_at": "2022-01-12 14:07:21",
            "deleted_at": null,
            "liste_id": 2,
            "source_id": 2
        },
        "coach": {
            "id": 2,
            "name": "D'ALMEIDA",
            "email": "laurenda1fr@yahoo.fr",
            "firstname": "Laurenda",
            "birthdate": null,
            "civilite": "Mme",
            "civil_status": "Marié(e)",
            "mobile_phone": null,
            "secteur_gf": null,
            "reseau_md": null,
            "autre_departement": null,
            "genre": null,
            "created_at": "2021-10-06 20:15:38",
            "updated_at": "2021-10-06 20:15:38",
            "is_active": 1
        }
    }
}
 

Request      

POST api/v1/suivi-contacts

Body Parameters

contact_id  integer  

Id du contact à suivre.

coach_id  integer  

Id du coach.

date_debut  string optional  

Date de début du suivi. Must be a valid date in the format Y-m-d.

date_fin  string optional  

Date de fin du suivi. Must be a valid date in the format Y-m-d.

commentaires  string optional  

Commentaires.

Afficher une affection de suivi

requires authentication

Permet de récupérer les détails d'une affectation de suivi d'un contact

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-contacts/13" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-contacts/13"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-contacts/13',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "contact_id": 2,
        "coach_id": 2,
        "date_debut": "2022-01-18 16:30:11",
        "updated_at": "2022-01-18 16:30:11",
        "created_at": "2022-01-18 16:30:11",
        "id": 3,
        "contact": {
            "id": 2,
            "civilite": "Mme",
            "lastname": "Dupont",
            "firstname": "Marie",
            "etat_civil": "Marié(e)",
            "genre": "Femme",
            "birthdate": "2022-01-11",
            "est_mineur": 0,
            "metier": "Agriculteur",
            "telephone": "01-23-45-67-89",
            "email": "est",
            "created_at": "2022-01-12 14:07:21",
            "updated_at": "2022-01-12 14:07:21",
            "deleted_at": null,
            "liste_id": 2,
            "source_id": 2
        },
        "coach": {
            "id": 2,
            "name": "D'ALMEIDA",
            "email": "laurenda1fr@yahoo.fr",
            "firstname": "Laurenda",
            "birthdate": null,
            "civilite": "Mme",
            "civil_status": "Marié(e)",
            "mobile_phone": null,
            "secteur_gf": null,
            "reseau_md": null,
            "autre_departement": null,
            "genre": null,
            "created_at": "2021-10-06 20:15:38",
            "updated_at": "2021-10-06 20:15:38",
            "is_active": 1
        }
    }
}
 

Request      

GET api/v1/suivi-contacts/{id}

URL Parameters

id  integer  

The ID of the suivi contact.

suivi_contact  integer  

ID de l'objet suivi_contact. Exemple : 1

Modifier une affectation de suivi

requires authentication

Permet de modifier une affectation de suivi

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/suivi-contacts/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_debut\": \"2022-01-15\",
    \"date_fin\": \"2022-01-19\",
    \"commentaires\": \"RAS\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-contacts/1"
);

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

let body = {
    "date_debut": "2022-01-15",
    "date_fin": "2022-01-19",
    "commentaires": "RAS"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-contacts/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'date_debut' => '2022-01-15',
            'date_fin' => '2022-01-19',
            'commentaires' => 'RAS',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "contact_id": 2,
        "coach_id": 2,
        "date_debut": "2022-01-18 16:30:11",
        "updated_at": "2022-01-18 16:30:11",
        "created_at": "2022-01-18 16:30:11",
        "id": 3,
        "contact": {
            "id": 2,
            "civilite": "Mme",
            "lastname": "Dupont",
            "firstname": "Marie",
            "etat_civil": "Marié(e)",
            "genre": "Femme",
            "birthdate": "2022-01-11",
            "est_mineur": 0,
            "metier": "Agriculteur",
            "telephone": "01-23-45-67-89",
            "email": "est",
            "created_at": "2022-01-12 14:07:21",
            "updated_at": "2022-01-12 14:07:21",
            "deleted_at": null,
            "liste_id": 2,
            "source_id": 2
        },
        "coach": {
            "id": 2,
            "name": "D'ALMEIDA",
            "email": "laurenda1fr@yahoo.fr",
            "firstname": "Laurenda",
            "birthdate": null,
            "civilite": "Mme",
            "civil_status": "Marié(e)",
            "mobile_phone": null,
            "secteur_gf": null,
            "reseau_md": null,
            "autre_departement": null,
            "genre": null,
            "created_at": "2021-10-06 20:15:38",
            "updated_at": "2021-10-06 20:15:38",
            "is_active": 1
        }
    }
}
 

Request      

PUT api/v1/suivi-contacts/{id}

PATCH api/v1/suivi-contacts/{id}

URL Parameters

id  integer  

The ID of the suivi contact.

suivi_contact  integer  

ID de l'objet suivi_contact. Exemple : 1

Body Parameters

date_debut  string optional  

Date de début du suivi. Must be a valid date in the format Y-m-d.

date_fin  string optional  

Date de fin du suivi. Must be a valid date in the format Y-m-d.

commentaires  string optional  

Commentaires.

Supprimer une affectation de suivi

requires authentication

Permet de supprimer une affectation de suivi (soft delete)

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/suivi-contacts/12" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-contacts/12"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-contacts/12',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/v1/suivi-contacts/{id}

URL Parameters

id  integer  

The ID of the suivi contact.

suivi_contact  integer  

ID de l'objet suivi_contact. Exemple : 1

Mes affectations de suivi

requires authentication

Permet de récupérer les contacts suivis par l'utilisateur connecté

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/mes-affectations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/mes-affectations"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/mes-affectations',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "data": {
        "contact_id": 2,
        "coach_id": 2,
        "date_debut": "2022-01-18 16:30:11",
        "updated_at": "2022-01-18 16:30:11",
        "created_at": "2022-01-18 16:30:11",
        "id": 3,
        "contact": {
            "id": 2,
            "civilite": "Mme",
            "lastname": "Dupont",
            "firstname": "Marie",
            "etat_civil": "Marié(e)",
            "genre": "Femme",
            "birthdate": "2022-01-11",
            "est_mineur": 0,
            "metier": "Agriculteur",
            "telephone": "01-23-45-67-89",
            "email": "est",
            "created_at": "2022-01-12 14:07:21",
            "updated_at": "2022-01-12 14:07:21",
            "deleted_at": null,
            "liste_id": 2,
            "source_id": 2
        },
        "coach": {
            "id": 2,
            "name": "D'ALMEIDA",
            "email": "laurenda1fr@yahoo.fr",
            "firstname": "Laurenda",
            "birthdate": null,
            "civilite": "Mme",
            "civil_status": "Marié(e)",
            "mobile_phone": null,
            "secteur_gf": null,
            "reseau_md": null,
            "autre_departement": null,
            "genre": null,
            "created_at": "2021-10-06 20:15:38",
            "updated_at": "2021-10-06 20:15:38",
            "is_active": 1
        }
    }
}
 

Request      

GET api/v1/mes-affectations

05 - Sessions de bilans

Liste des particiapations aux sessions de bilans

requires authentication

Permet de recuperer la liste des participations aux sessions de bilans

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/session-bilans" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/session-bilans"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/session-bilans',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/session-bilans

Enregistrer une participation à un bilan

requires authentication

Permet d'enregistrer la participation d'un contact à une session de bilan pour un contact

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/session-bilans" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contact_id\": 1,
    \"bilan_id\": 1,
    \"date\": \"2022-01-15 00:00:00\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/session-bilans"
);

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

let body = {
    "contact_id": 1,
    "bilan_id": 1,
    "date": "2022-01-15 00:00:00"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/session-bilans',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'contact_id' => 1,
            'bilan_id' => 1,
            'date' => '2022-01-15 00:00:00',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "data": {
        "name": "Toto",
        "email": "toto@localhost.com",
        "firstname": "John",
        "mobile_phone": "01-23-45-67-89",
        "genre": "Mademoiselle",
        "civilite": "Mr",
        "civil_status": "Célibataire",
        "updated_at": "2022-02-15 11:20:54",
        "created_at": "2022-02-15 11:20:54",
        "id": 11,
        "roles": [
            {
                "id": 1,
                "title": "Admin système"
            }
        ],
        "team": null
    }
}
 

Request      

POST api/v1/session-bilans

Body Parameters

contact_id  integer  

Id du contact à suivre.

bilan_id  integer  

Id du bilan.

date  string  

Date de la session. Must be a valid date in the format Y-m-d.

Afficher une participation pour un contact

requires authentication

Permet de récupérer les détails d'une participation d'un contact à un session de bilan

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/session-bilans/10" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/session-bilans/10"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/session-bilans/10',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "id": 1,
        "date": "2022-01-17",
        "bilan_id": 2,
        "contact_id": 1,
        "bilan": {
            "id": 2,
            "nom": "Bilan Semaine 2",
            "code": "BS2",
            "description": "Bilan Semaine 2",
            "programme_id": 1
        },
        "contact": {
            "id": 1,
            "civilite": "Mr",
            "lastname": "Dupont",
            "firstname": "Jean",
            "etat_civil": "Marié(e)",
            "genre": "Homme",
            "birthdate": "2022-01-11",
            "est_mineur": 0,
            "metier": "Agriculteur",
            "telephone": "01-23-45-67-89",
            "email": "ipsum",
            "liste_id": 1,
            "source_id": 1
        }
    }
}
 

Request      

GET api/v1/session-bilans/{id}

URL Parameters

id  integer  

The ID of the session bilan.

session_bilan  integer  

ID de l'objet session_bilan. Exemple : 1

Modifier une participation pour un contact

requires authentication

Permet de modifier les détails d'une participation d'un contact à un session de bilan

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/session-bilans/11" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date\": \"2022-01-15 00:00:00\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/session-bilans/11"
);

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

let body = {
    "date": "2022-01-15 00:00:00"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/session-bilans/11',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'date' => '2022-01-15 00:00:00',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "date": "2022-01-10",
        "id": 1
    }
}
 

Request      

PUT api/v1/session-bilans/{id}

PATCH api/v1/session-bilans/{id}

URL Parameters

id  integer  

The ID of the session bilan.

session_bilan  integer  

ID de l'objet session_bilan. Exemple : 1

Body Parameters

date  string  

Date de la session. Must be a valid date in the format Y-m-d.

Supprimer une participation pour un contact

requires authentication

Permet de supprimer la participation d'un contact à une session de bilan (soft delete)

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/session-bilans/15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/session-bilans/15"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api-prog31jours.charisma.fr/api/v1/session-bilans/15',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/v1/session-bilans/{id}

URL Parameters

id  integer  

The ID of the session bilan.

session_bilan  integer  

ID de l'objet session_bilan Exemple : 1

06 - Suivi téléphonique

Liste des suivis téléphoniques

requires authentication

Permet d'afficher la liste des suivis téléphoniques

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/suivi-telephoniques

Enregistrer suivi téléphonique

requires authentication

Permet d'enregistrer le rapport d'un suivi téléphonique

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_appel\": \"2022-01-15 15:30:00\",
    \"commentaires\": \"N.A\",
    \"contact_id\": 1,
    \"coach_id\": 1,
    \"statut_id\": 1
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques"
);

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

let body = {
    "date_appel": "2022-01-15 15:30:00",
    "commentaires": "N.A",
    "contact_id": 1,
    "coach_id": 1,
    "statut_id": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'date_appel' => '2022-01-15 15:30:00',
            'commentaires' => 'N.A',
            'contact_id' => 1,
            'coach_id' => 1,
            'statut_id' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "data": {
        "contact_id": 2,
        "coach_id": 5,
        "date_appel": "2022-01-24 15:40:00",
        "commentaires": "test de création de suivi téléphonique",
        "statut_id": 4,
        "updated_at": "2022-02-16 14:41:05",
        "created_at": "2022-02-16 14:41:05",
        "id": 1
    }
}
 

Request      

POST api/v1/suivi-telephoniques

Body Parameters

date_appel  string  

Date et heure d'appel du suivi. Must be a valid date in the format Y-m-d.

commentaires  string optional  

Commentaires éventuels saisis par le coach.

contact_id  integer  

Id du contact à suivre.

coach_id  integer  

Id du coach qui effectue le bilan.

statut_id  integer  

Id du statut du suivi.

Afficher un suivi téléphonique

requires authentication

Permet de récupérer les détails d'un rapport de suivi téléphonique

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques/1"
);

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

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

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "id": 1,
        "date_appel": "2022-01-24 15:40:00",
        "commentaires": "test de création de suivi téléphonique",
        "contact_id": 2,
        "coach_id": 5,
        "statut_id": 4,
        "contact": {
            "id": 2,
            "civilite": "Mme",
            "lastname": "Dupont",
            "firstname": "Marie-Claire",
            "etat_civil": "Marié(e)",
            "genre": "Femme",
            "birthdate": "2022-01-11",
            "est_mineur": 1,
            "metier": "Agriculteur",
            "telephone": "01-23-45-67-89",
            "email": "est",
            "liste_id": 1,
            "source_id": 1
        },
        "coach": {
            "id": 5,
            "name": "Ngoileye",
            "email": "emailtestlaurence@yahoo.fr",
            "firstname": "Laurence",
            "birthdate": "1985-06-12",
            "civilite": "Mme",
            "civil_status": "Marié(e)",
            "mobile_phone": "0612121212",
            "secteur_gf": "Secteur 7",
            "reseau_md": "MD Intensité",
            "autre_departement": "Libéralité",
            "genre": "Femme",
            "created_at": "2021-11-13 23:11:06",
            "updated_at": "2021-11-13 23:15:21",
            "keycloak_user_id": null,
            "is_active": 1
        },
        "statut": {
            "id": 4,
            "libelle": "Changement de coach",
            "code": "CCH",
            "description": "Changement de coach",
            "type": "PCP"
        },
        "team": null
    }
}
 

Request      

GET api/v1/suivi-telephoniques/{id}

URL Parameters

id  integer  

The ID of the suivi telephonique.

suivi_telephonique  integer  

ID de l'objet suivi_telephonique. Exemple : 1

Modifier un suivi téléphonique

requires authentication

Permet de modifier les détails d'une participation d'un contact à un session de bilan

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques/5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_appel\": \"2022-01-15 15:30:00\",
    \"commentaires\": \"N.A\",
    \"statut_id\": 1
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques/5"
);

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

let body = {
    "date_appel": "2022-01-15 15:30:00",
    "commentaires": "N.A",
    "statut_id": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques/5',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'date_appel' => '2022-01-15 15:30:00',
            'commentaires' => 'N.A',
            'statut_id' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "date_appel": "2022-01-23 16:35:00",
        "commentaires": "test de modification de suivi téléphonique",
        "statut_id": 3,
        "id": 1
    }
}
 

Request      

PUT api/v1/suivi-telephoniques/{id}

PATCH api/v1/suivi-telephoniques/{id}

URL Parameters

id  integer  

The ID of the suivi telephonique.

suivi_telephonique  integer  

ID de l'objet suivi_telephonique. Exemple : 1

Body Parameters

date_appel  string optional  

Date et heure d'appel du suivi. Must be a valid date in the format Y-m-d.

commentaires  string optional  

Commentaires éventuels saisis par le coach.

statut_id  integer  

Id du statut du suivi.

Supprimer un suivi téléphonique

requires authentication

Permet de supprimer le rapport de suivi téléphonique

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques/19" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques/19"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephoniques/19',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/v1/suivi-telephoniques/{id}

URL Parameters

id  integer  

The ID of the suivi telephonique.

suivi_telephonique  integer  

ID de l'objet suivi_telephonique Exemple : 1

Mon suivi téléphonique

requires authentication

Permet d'afficher la liste des suivis téléphoniques de l'utilisateur connecté

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/mon-suivi-telephonique" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/mon-suivi-telephonique"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/mon-suivi-telephonique',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/mon-suivi-telephonique

Suivi téléphonique persévérance

requires authentication

Permet d'afficher la liste des suivis téléphoniques de la liste de persévérance

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-perseverance" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-perseverance"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-perseverance',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/suivi-telephonique-perseverance

Suivi téléphonique persévérance adulte

requires authentication

Permet d'afficher la liste des suivis téléphoniques de la liste de persévérance

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-perseverance-adulte" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-perseverance-adulte"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-perseverance-adulte',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/suivi-telephonique-perseverance-adulte

Suivi téléphonique persévérance adolescent

requires authentication

Permet d'afficher la liste des suivis téléphoniques de la liste de persévérance

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-perseverance-ado" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-perseverance-ado"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-perseverance-ado',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/suivi-telephonique-perseverance-ado

Suivi téléphonique principale

requires authentication

Permet d'afficher la liste des suivis téléphoniques de la liste principale

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-principale" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-principale"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-principale',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/suivi-telephonique-principale

Listes des statuts d'action

requires authentication

Permet de récupérer la liste des statuts d'action

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-liste-actions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-liste-actions"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-liste-actions',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "Id inconnu"
}
 

Request      

GET api/v1/suivi-telephonique-liste-actions

Suivi pour action

requires authentication

Permet d'afficher la liste des suivis téléphoniques necéssitant une action

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-action" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-action"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-action',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/suivi-telephonique-action

Suivi pour action adulte

requires authentication

Permet d'afficher la liste des suivis téléphoniques necéssitant une action (adulte)

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-action-adulte" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-action-adulte"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-action-adulte',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/suivi-telephonique-action-adulte

Suivi pour action ado

requires authentication

Permet d'afficher la liste des suivis téléphoniques necéssitant une action (ado)

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-action-ado" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-action-ado"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-telephonique-action-ado',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/suivi-telephonique-action-ado

07 - Paramètres

Lister les paramètes

requires authentication

Permet de recuperer la liste des paramètres

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/configs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/configs"
);

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

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

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/configs

Créer un paramètre

requires authentication

Permet de créer un nouveau paramètre

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/configs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"quota_suivi_contact\",
    \"value\": \"10\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/configs"
);

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

let body = {
    "name": "quota_suivi_contact",
    "value": "10"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/configs',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'quota_suivi_contact',
            'value' => '10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "data": {
        "lastname": "quota_suivi_contact",
        "value": "10"
    }
}
 

Request      

POST api/v1/configs

Body Parameters

name  string  

Nom du paramètre.

value  string  

Valeur du paramètre.

Afficher un paramètre par son Id

requires authentication

Permet de récupérer les détails d'un paramètre par son id

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/configs/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/configs/1"
);

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

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

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "lastname": "quota_suivi_contact",
        "value": "10"
    }
}
 

Request      

GET api/v1/configs/{id}

URL Parameters

id  integer  

The ID of the config.

Modifier un paramètre

requires authentication

Permet de modifier un paramètre

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/configs/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"quota_suivi_contact\",
    \"value\": \"10\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/configs/1"
);

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

let body = {
    "name": "quota_suivi_contact",
    "value": "10"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/configs/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'quota_suivi_contact',
            'value' => '10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "lastname": "quota_suivi_contact",
        "value": "10"
    }
}
 

Request      

PUT api/v1/configs/{id}

PATCH api/v1/configs/{id}

URL Parameters

id  integer  

The ID of the config.

Body Parameters

name  string  

Nom du paramètre.

value  string  

Valeur du paramètre.

Supprimer un paramètre

requires authentication

Permet de supprimer un paramètre

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/configs/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/configs/1"
);

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

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

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/v1/configs/{id}

URL Parameters

id  integer  

The ID of the config.

Afficher un paramètre

requires authentication

Permet de récupérer les détails d'un paramètre par som nom

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/config-by-name/ea" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/config-by-name/ea"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/config-by-name/ea',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "lastname": "quota_suivi_contact",
        "value": "10"
    }
}
 

Request      

GET api/v1/config-by-name/{name}

URL Parameters

name  string  

08 - Certificats

POST /api/v1/diplomes/print

requires authentication

Print and dowload diplomes

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/diplomes/print" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        16
    ]
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/diplomes/print"
);

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

let body = {
    "users": [
        16
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/diplomes/print',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'users' => [
                16,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{"document file"}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid parameters"
}
 

Request      

POST api/v1/diplomes/print

Body Parameters

users  integer[] optional  

POST /api/v1/diplomes/latests

requires authentication

Print and dowload latest diplomes

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/diplomes/latests" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/diplomes/latests"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/diplomes/latests',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{"document file"}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid parameters"
}
 

Request      

GET api/v1/diplomes/latests

POST /api/v1/diplomes/update-date

requires authentication

Update date of certification

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/diplomes/update-date" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        17
    ]
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/diplomes/update-date"
);

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

let body = {
    "users": [
        17
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/diplomes/update-date',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'users' => [
                17,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{"results : ok"}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid parameters"
}
 

Request      

POST api/v1/diplomes/update-date

Body Parameters

users  integer[] optional  

09 - Types de Contact

Lister les types de contacts

requires authentication

Permet de recuperer la liste des types de contacts

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-list-types" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-list-types"
);

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

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

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-list-types

Créer un type de contact

requires authentication

Permet de créer une nouveau type contact

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/contact-list-types" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"libelle\": \"quos\",
    \"code\": \"rerum\",
    \"description\": \"rem\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-list-types"
);

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

let body = {
    "libelle": "quos",
    "code": "rerum",
    "description": "rem"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/contact-list-types',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'libelle' => 'quos',
            'code' => 'rerum',
            'description' => 'rem',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "data": {
        "id": 1,
        "libelle": "Principale",
        "code": "PCP",
        "description": "Liste principale des contacts"
    }
}
 

Request      

POST api/v1/contact-list-types

Body Parameters

libelle  string  

code  string  

description  string optional  

Afficher un type de contact

requires authentication

Permet de récupérer les détails d'un type de contact

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-list-types/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-list-types/1"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-list-types/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "id": 1,
        "libelle": "Principale",
        "code": "PCP",
        "description": "Liste principale des contacts"
    }
}
 

Request      

GET api/v1/contact-list-types/{id}

URL Parameters

id  integer  

The ID of the contact list type.

Modifier un type de contact

requires authentication

Permet de modifier un type de contact

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/contact-list-types/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"libelle\": \"officia\",
    \"code\": \"est\",
    \"description\": \"velit\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-list-types/1"
);

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

let body = {
    "libelle": "officia",
    "code": "est",
    "description": "velit"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/contact-list-types/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'libelle' => 'officia',
            'code' => 'est',
            'description' => 'velit',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "id": 1,
        "libelle": "Principale",
        "code": "PCP",
        "description": "Liste principale des contacts"
    }
}
 

Request      

PUT api/v1/contact-list-types/{id}

PATCH api/v1/contact-list-types/{id}

URL Parameters

id  integer  

The ID of the contact list type.

Body Parameters

libelle  string  

code  string  

description  string optional  

Supprimer un type de contact

requires authentication

Permet de supprimer un type de contact (soft delete)

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/contact-list-types/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-list-types/1"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api-prog31jours.charisma.fr/api/v1/contact-list-types/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/v1/contact-list-types/{id}

URL Parameters

id  integer  

The ID of the contact list type.

Lister les types de contacts actifs

requires authentication

Permet de recuperer la liste des types de contacts ayant le statut actif

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/contact-list-types-active" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/contact-list-types-active"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/contact-list-types-active',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/contact-list-types-active

10 - Sources de Contact

Lister les sources de contacts

requires authentication

Permet de recuperer la liste des sources de contacts

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/source-contacts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/source-contacts"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/source-contacts',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ "data" : [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/v1/source-contacts

Créer une source de contact

requires authentication

Permet de créer une nouvelle source de contact

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/source-contacts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"libelle\": \"qui\",
    \"code\": \"dolor\",
    \"description\": \"ipsum\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/source-contacts"
);

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

let body = {
    "libelle": "qui",
    "code": "dolor",
    "description": "ipsum"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/source-contacts',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'libelle' => 'qui',
            'code' => 'dolor',
            'description' => 'ipsum',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "data": {
        "id": 1,
        "libelle": "Nouveaux Convertis",
        "code": "NCO",
        "description": "Contact provenant de la liste des nouveaux convertis"
    }
}
 

Request      

POST api/v1/source-contacts

Body Parameters

libelle  string optional  

code  string optional  

description  string optional  

Afficher une source de contact

requires authentication

Permet de récupérer les détails d'une source de contact

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/source-contacts/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/source-contacts/1"
);

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

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

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "id": 1,
        "libelle": "Nouveaux Convertis",
        "code": "NCO",
        "description": "Contact provenant de la liste des nouveaux convertis"
    }
}
 

Request      

GET api/v1/source-contacts/{id}

URL Parameters

id  integer  

The ID of the source contact.

Modifier une source de contact

requires authentication

Permet de modifier une source de contact

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/source-contacts/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"libelle\": \"assumenda\",
    \"code\": \"quos\",
    \"description\": \"cupiditate\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/source-contacts/1"
);

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

let body = {
    "libelle": "assumenda",
    "code": "quos",
    "description": "cupiditate"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/source-contacts/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'libelle' => 'assumenda',
            'code' => 'quos',
            'description' => 'cupiditate',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "data": {
        "id": 1,
        "libelle": "Nouveaux Convertis",
        "code": "NCO",
        "description": "Contact provenant de la liste des nouveaux convertis"
    }
}
 

Request      

PUT api/v1/source-contacts/{id}

PATCH api/v1/source-contacts/{id}

URL Parameters

id  integer  

The ID of the source contact.

Body Parameters

libelle  string optional  

code  string optional  

description  string optional  

Supprimer une source de contact

requires authentication

Permet de supprimer une source de contact (soft delete)

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/source-contacts/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/source-contacts/1"
);

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

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

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/v1/source-contacts/{id}

URL Parameters

id  integer  

The ID of the source contact.

Endpoints

Display Swagger API page.

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/documentation" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/documentation"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/documentation',
    [
        'headers' => [
            '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
vary: Origin
 

<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>L5 Swagger UI</title>
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet">
  <link rel="stylesheet" type="text/css" href="https://api-prog31jours.charisma.fr/docs/asset/swagger-ui.css?v=3fb53292764c7c9a0ee0928832bfbe54" >
  <link rel="icon" type="image/png" href="https://api-prog31jours.charisma.fr/docs/asset/favicon-32x32.png?v=40d4f2c38d1cd854ad463f16373cbcb6" sizes="32x32" />
  <link rel="icon" type="image/png" href="https://api-prog31jours.charisma.fr/docs/asset/favicon-16x16.png?v=f0ae831196d55d8f4115b6c5e8ec5384" sizes="16x16" />
  <style>
    html
    {
        box-sizing: border-box;
        overflow: -moz-scrollbars-vertical;
        overflow-y: scroll;
    }
    *,
    *:before,
    *:after
    {
        box-sizing: inherit;
    }

    body {
      margin:0;
      background: #fafafa;
    }
  </style>
</head>

<body>

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0">
  <defs>
    <symbol viewBox="0 0 20 20" id="unlocked">
          <path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"></path>
    </symbol>

    <symbol viewBox="0 0 20 20" id="locked">
      <path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"/>
    </symbol>

    <symbol viewBox="0 0 20 20" id="close">
      <path d="M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"/>
    </symbol>

    <symbol viewBox="0 0 20 20" id="large-arrow">
      <path d="M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"/>
    </symbol>

    <symbol viewBox="0 0 20 20" id="large-arrow-down">
      <path d="M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"/>
    </symbol>


    <symbol viewBox="0 0 24 24" id="jump-to">
      <path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"/>
    </symbol>

    <symbol viewBox="0 0 24 24" id="expand">
      <path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/>
    </symbol>

  </defs>
</svg>

<div id="swagger-ui"></div>

<script src="https://api-prog31jours.charisma.fr/docs/asset/swagger-ui-bundle.js?v=33c03a3200a2896a44cf03aa482d3317"> </script>
<script src="https://api-prog31jours.charisma.fr/docs/asset/swagger-ui-standalone-preset.js?v=f2e8d34c39f7b7a59647d27eedbb5a46"> </script>
<script>
window.onload = function() {
  // Build a system
  const ui = SwaggerUIBundle({
    dom_id: '#swagger-ui',

    url: "https://api-prog31jours.charisma.fr/docs/api-docs.json",
    operationsSorter: null,
    configUrl: null,
    validatorUrl: null,
    oauth2RedirectUrl: "https://api-prog31jours.charisma.fr/api/oauth2-callback",

    requestInterceptor: function(request) {
      request.headers['X-CSRF-TOKEN'] = '';
      return request;
    },

    presets: [
      SwaggerUIBundle.presets.apis,
      SwaggerUIStandalonePreset
    ],

    plugins: [
      SwaggerUIBundle.plugins.DownloadUrl
    ],

    layout: "StandaloneLayout",

    persistAuthorization: true,
  })

  window.ui = ui
}
</script>
</body>

</html>

 

Request      

GET api/documentation

Display Oauth2 callback pages.

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/oauth2-callback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/oauth2-callback"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/oauth2-callback',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
content-type: text/html; charset=UTF-8
cache-control: no-cache, private
vary: Origin
 

<!doctype html>
<html lang="en-US">
<head>
    <title>Swagger UI: OAuth2 Redirect</title>
</head>
<body>
<script>
    'use strict';
    function run () {
        var oauth2 = window.opener.swaggerUIRedirectOauth2;
        var sentState = oauth2.state;
        var redirectUrl = oauth2.redirectUrl;
        var isValid, qp, arr;

        if (/code|token|error/.test(window.location.hash)) {
            qp = window.location.hash.substring(1).replace('?', '&');
        } else {
            qp = location.search.substring(1);
        }

        arr = qp.split("&");
        arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
        qp = qp ? JSON.parse('{' + arr.join() + '}',
                function (key, value) {
                    return key === "" ? value : decodeURIComponent(value);
                }
        ) : {};

        isValid = qp.state === sentState;

        if ((
          oauth2.auth.schema.get("flow") === "accessCode" ||
          oauth2.auth.schema.get("flow") === "authorizationCode" ||
          oauth2.auth.schema.get("flow") === "authorization_code"
        ) && !oauth2.auth.code) {
            if (!isValid) {
                oauth2.errCb({
                    authId: oauth2.auth.name,
                    source: "auth",
                    level: "warning",
                    message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
                });
            }

            if (qp.code) {
                delete oauth2.state;
                oauth2.auth.code = qp.code;
                oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
            } else {
                let oauthErrorMsg;
                if (qp.error) {
                    oauthErrorMsg = "["+qp.error+"]: " +
                        (qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
                        (qp.error_uri ? "More info: "+qp.error_uri : "");
                }

                oauth2.errCb({
                    authId: oauth2.auth.name,
                    source: "auth",
                    level: "error",
                    message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
                });
            }
        } else {
            oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
        }
        window.close();
    }

    if (document.readyState !== 'loading') {
        run();
    } else {
        document.addEventListener('DOMContentLoaded', function () {
            run();
        });
    }
</script>
</body>
</html>

 

Request      

GET api/oauth2-callback

GET api/v1/roles

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/roles"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/roles',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/roles

POST api/v1/roles

requires authentication

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"beatae\",
    \"permissions\": [
        4
    ]
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/roles"
);

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

let body = {
    "title": "beatae",
    "permissions": [
        4
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/roles',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'beatae',
            'permissions' => [
                4,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/roles

Body Parameters

title  string  

permissions  integer[] optional  

GET api/v1/roles/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/roles/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/roles/1"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/roles/1',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/roles/{id}

URL Parameters

id  integer  

The ID of the role.

PUT api/v1/roles/{id}

requires authentication

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/roles/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"illo\",
    \"permissions\": [
        15
    ]
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/roles/1"
);

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

let body = {
    "title": "illo",
    "permissions": [
        15
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/roles/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'illo',
            'permissions' => [
                15,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/v1/roles/{id}

PATCH api/v1/roles/{id}

URL Parameters

id  integer  

The ID of the role.

Body Parameters

title  string  

permissions  integer[] optional  

DELETE api/v1/roles/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/roles/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/roles/1"
);

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

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

Request      

DELETE api/v1/roles/{id}

URL Parameters

id  integer  

The ID of the role.

GET api/v1/statut-appels

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/statut-appels" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/statut-appels"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/statut-appels',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/statut-appels

POST api/v1/statut-appels

requires authentication

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/statut-appels" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"libelle\": \"cum\",
    \"code\": \"voluptates\",
    \"description\": \"necessitatibus\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/statut-appels"
);

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

let body = {
    "libelle": "cum",
    "code": "voluptates",
    "description": "necessitatibus"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/statut-appels',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'libelle' => 'cum',
            'code' => 'voluptates',
            'description' => 'necessitatibus',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/statut-appels

Body Parameters

libelle  string optional  

code  string optional  

description  string optional  

GET api/v1/statut-appels/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/statut-appels/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/statut-appels/1"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/statut-appels/1',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/statut-appels/{id}

URL Parameters

id  integer  

The ID of the statut appel.

PUT api/v1/statut-appels/{id}

requires authentication

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/statut-appels/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"libelle\": \"voluptatibus\",
    \"code\": \"a\",
    \"description\": \"impedit\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/statut-appels/1"
);

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

let body = {
    "libelle": "voluptatibus",
    "code": "a",
    "description": "impedit"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/statut-appels/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'libelle' => 'voluptatibus',
            'code' => 'a',
            'description' => 'impedit',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/v1/statut-appels/{id}

PATCH api/v1/statut-appels/{id}

URL Parameters

id  integer  

The ID of the statut appel.

Body Parameters

libelle  string optional  

code  string optional  

description  string optional  

DELETE api/v1/statut-appels/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/statut-appels/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/statut-appels/1"
);

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

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

Request      

DELETE api/v1/statut-appels/{id}

URL Parameters

id  integer  

The ID of the statut appel.

GET api/v1/teams

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/teams" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/teams"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/teams',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/teams

POST api/v1/teams

requires authentication

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/teams" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"amet\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/teams"
);

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

let body = {
    "name": "amet"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/teams',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'amet',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/teams

Body Parameters

name  string  

GET api/v1/teams/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/teams/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/teams/1"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/teams/1',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/teams/{id}

URL Parameters

id  integer  

The ID of the team.

PUT api/v1/teams/{id}

requires authentication

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/teams/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"beatae\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/teams/1"
);

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

let body = {
    "name": "beatae"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/teams/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'beatae',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/v1/teams/{id}

PATCH api/v1/teams/{id}

URL Parameters

id  integer  

The ID of the team.

Body Parameters

name  string  

DELETE api/v1/teams/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/teams/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/teams/1"
);

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

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

Request      

DELETE api/v1/teams/{id}

URL Parameters

id  integer  

The ID of the team.

GET api/v1/user-alerts

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/user-alerts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/user-alerts"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/user-alerts',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/user-alerts

POST api/v1/user-alerts

requires authentication

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/user-alerts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"alert_text\": \"voluptas\",
    \"alert_link\": \"laboriosam\",
    \"users\": [
        7
    ]
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/user-alerts"
);

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

let body = {
    "alert_text": "voluptas",
    "alert_link": "laboriosam",
    "users": [
        7
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/user-alerts',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'alert_text' => 'voluptas',
            'alert_link' => 'laboriosam',
            'users' => [
                7,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/user-alerts

Body Parameters

alert_text  string  

alert_link  string optional  

users  integer[] optional  

GET api/v1/user-alerts/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/user-alerts/3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/user-alerts/3"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/user-alerts/3',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/user-alerts/{id}

URL Parameters

id  integer  

The ID of the user alert.

DELETE api/v1/user-alerts/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/user-alerts/8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/user-alerts/8"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api-prog31jours.charisma.fr/api/v1/user-alerts/8',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

DELETE api/v1/user-alerts/{id}

URL Parameters

id  integer  

The ID of the user alert.

POST api/v1/content-pages/media

requires authentication

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/content-pages/media" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/content-pages/media"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/content-pages/media',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/content-pages/media

GET api/v1/content-pages

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/content-pages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/content-pages"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/content-pages',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/content-pages

POST api/v1/content-pages

requires authentication

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/content-pages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"consequatur\",
    \"categories\": [
        2
    ],
    \"tags\": [
        9
    ]
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/content-pages"
);

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

let body = {
    "title": "consequatur",
    "categories": [
        2
    ],
    "tags": [
        9
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/content-pages',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'consequatur',
            'categories' => [
                2,
            ],
            'tags' => [
                9,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/content-pages

Body Parameters

title  string  

categories  integer[] optional  

tags  integer[] optional  

GET api/v1/content-pages/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/content-pages/3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/content-pages/3"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/content-pages/3',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/content-pages/{id}

URL Parameters

id  integer  

The ID of the content page.

PUT api/v1/content-pages/{id}

requires authentication

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/content-pages/9" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"autem\",
    \"categories\": [
        10
    ],
    \"tags\": [
        5
    ]
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/content-pages/9"
);

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

let body = {
    "title": "autem",
    "categories": [
        10
    ],
    "tags": [
        5
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/content-pages/9',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'autem',
            'categories' => [
                10,
            ],
            'tags' => [
                5,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/v1/content-pages/{id}

PATCH api/v1/content-pages/{id}

URL Parameters

id  integer  

The ID of the content page.

Body Parameters

title  string  

categories  integer[] optional  

tags  integer[] optional  

DELETE api/v1/content-pages/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/content-pages/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/content-pages/17"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api-prog31jours.charisma.fr/api/v1/content-pages/17',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

DELETE api/v1/content-pages/{id}

URL Parameters

id  integer  

The ID of the content page.

GET api/v1/programmes

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/programmes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/programmes"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/programmes',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/programmes

POST api/v1/programmes

requires authentication

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/programmes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"nom\": \"beatae\",
    \"description\": \"architecto\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/programmes"
);

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

let body = {
    "nom": "beatae",
    "description": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/programmes',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'nom' => 'beatae',
            'description' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/programmes

Body Parameters

nom  string  

description  string optional  

GET api/v1/programmes/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/programmes/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/programmes/1"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/programmes/1',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/programmes/{id}

URL Parameters

id  integer  

The ID of the programme.

DELETE api/v1/programmes/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/programmes/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/programmes/1"
);

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

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

Request      

DELETE api/v1/programmes/{id}

URL Parameters

id  integer  

The ID of the programme.

GET api/v1/bilans

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/bilans" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/bilans"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/bilans',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/bilans

POST api/v1/bilans

requires authentication

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/bilans" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"nom\": \"et\",
    \"code\": \"et\",
    \"description\": \"eaque\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/bilans"
);

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

let body = {
    "nom": "et",
    "code": "et",
    "description": "eaque"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/bilans',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'nom' => 'et',
            'code' => 'et',
            'description' => 'eaque',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/bilans

Body Parameters

nom  string  

code  string optional  

description  string optional  

GET api/v1/bilans/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/bilans/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/bilans/1"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/bilans/1',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/bilans/{id}

URL Parameters

id  integer  

The ID of the bilan.

DELETE api/v1/bilans/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/bilans/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/bilans/1"
);

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

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

Request      

DELETE api/v1/bilans/{id}

URL Parameters

id  integer  

The ID of the bilan.

GET api/v1/formations

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/formations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/formations"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/formations',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/formations

POST api/v1/formations

requires authentication

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/formations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"nom\": \"accusantium\",
    \"description\": \"eum\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/formations"
);

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

let body = {
    "nom": "accusantium",
    "description": "eum"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/formations',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'nom' => 'accusantium',
            'description' => 'eum',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/formations

Body Parameters

nom  string  

description  string optional  

GET api/v1/formations/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/formations/5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/formations/5"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/formations/5',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/formations/{id}

URL Parameters

id  integer  

The ID of the formation.

DELETE api/v1/formations/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/formations/2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/formations/2"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api-prog31jours.charisma.fr/api/v1/formations/2',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

DELETE api/v1/formations/{id}

URL Parameters

id  integer  

The ID of the formation.

GET api/v1/suivi-formations

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-formations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-formations"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-formations',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/suivi-formations

POST api/v1/suivi-formations

requires authentication

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/v1/suivi-formations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_formation\": \"2025-02-21\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-formations"
);

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

let body = {
    "date_formation": "2025-02-21"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-formations',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'date_formation' => '2025-02-21',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/v1/suivi-formations

Body Parameters

date_formation  string optional  

Must be a valid date in the format Y-m-d.

GET api/v1/suivi-formations/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://api-prog31jours.charisma.fr/api/v1/suivi-formations/4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-formations/4"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-formations/4',
    [
        'headers' => [
            '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
vary: Origin
 

{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Not authenticated",
    "userid": null,
    "accessToken": null
}
 

Request      

GET api/v1/suivi-formations/{id}

URL Parameters

id  integer  

The ID of the suivi formation.

PUT api/v1/suivi-formations/{id}

requires authentication

Example request:
curl --request PUT \
    "https://api-prog31jours.charisma.fr/api/v1/suivi-formations/6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_formation\": \"2025-02-21\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-formations/6"
);

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

let body = {
    "date_formation": "2025-02-21"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-formations/6',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'date_formation' => '2025-02-21',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/v1/suivi-formations/{id}

PATCH api/v1/suivi-formations/{id}

URL Parameters

id  integer  

The ID of the suivi formation.

Body Parameters

date_formation  string optional  

Must be a valid date in the format Y-m-d.

DELETE api/v1/suivi-formations/{id}

requires authentication

Example request:
curl --request DELETE \
    "https://api-prog31jours.charisma.fr/api/v1/suivi-formations/3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/v1/suivi-formations/3"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api-prog31jours.charisma.fr/api/v1/suivi-formations/3',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

DELETE api/v1/suivi-formations/{id}

URL Parameters

id  integer  

The ID of the suivi formation.

POST api/register

requires authentication

Example request:
curl --request POST \
    "https://api-prog31jours.charisma.fr/api/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"aperiam\",
    \"email\": \"runolfsson.trevor@example.com\",
    \"password\": \"bqngzt\"
}"
const url = new URL(
    "https://api-prog31jours.charisma.fr/api/register"
);

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

let body = {
    "name": "aperiam",
    "email": "runolfsson.trevor@example.com",
    "password": "bqngzt"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api-prog31jours.charisma.fr/api/register',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'aperiam',
            'email' => 'runolfsson.trevor@example.com',
            'password' => 'bqngzt',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/register

Body Parameters

name  string  

email  string  

value doit être une adresse e-mail valide.

password  string  

value doit être au moins 6 caractères.