MENU navbar-image

Introduction

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

Authenticating requests

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

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

A test personal access token can be generated using the /api/auth/token endpoint. For client credentials use /oauth/token see Laravel Passport docs: https://laravel.com/docs/10.x/passport#retrieving-tokens

Auth

Issue a token

Will only work in local environment for debugging purposes

Example request:
const url = new URL(
    "http://localhost:8000/api/auth/token"
);

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

let body = {
    "email": "admin@brixcrm.nl"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/auth/token';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'admin@brixcrm.nl',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/auth/token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"admin@brixcrm.nl\"
}"

Request      

POST api/auth/token

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email of the user. :Attribute is geen geldig e-mailadres. Example: admin@brixcrm.nl

Contacts

POST api/contacts

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/contacts"
);

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

let body = {
    "first_name": "nulla",
    "last_name": "facere",
    "gender": "unknown",
    "inactive_at": "2025-04-03T10:51:41",
    "phone_number": "corporis",
    "hubspot_id": 1086.93,
    "location_ids": [
        43534267
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/contacts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'first_name' => 'nulla',
            'last_name' => 'facere',
            'gender' => 'unknown',
            'inactive_at' => '2025-04-03T10:51:41',
            'phone_number' => 'corporis',
            'hubspot_id' => 1086.93,
            'location_ids' => [
                43534267.0,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/contacts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"nulla\",
    \"last_name\": \"facere\",
    \"gender\": \"unknown\",
    \"inactive_at\": \"2025-04-03T10:51:41\",
    \"phone_number\": \"corporis\",
    \"hubspot_id\": 1086.93,
    \"location_ids\": [
        43534267
    ]
}"

Request      

POST api/contacts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

first_name   string   

Example: nulla

last_name   string  optional  

Example: facere

gender   string  optional  

Example: unknown

Must be one of:
  • male
  • female
  • unknown
inactive_at   string  optional  

:Attribute moet een datum bevatten. Example: 2025-04-03T10:51:41

phone_number   string  optional  

Example: corporis

hubspot_id   number  optional  

Example: 1086.93

location_ids   number[]  optional  

The id of an existing record in the locations table.

Update the specified contact in storage.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/contacts/quisquam"
);

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

let body = {
    "first_name": "quidem",
    "last_name": "omnis",
    "gender": "unknown",
    "inactive_at": "2025-04-03T10:51:41",
    "phone_number": "error",
    "hubspot_id": 33763.1042964,
    "location_ids": [
        1357.23041312
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/contacts/quisquam';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'first_name' => 'quidem',
            'last_name' => 'omnis',
            'gender' => 'unknown',
            'inactive_at' => '2025-04-03T10:51:41',
            'phone_number' => 'error',
            'hubspot_id' => 33763.1042964,
            'location_ids' => [
                1357.23041312,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "http://localhost:8000/api/contacts/quisquam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"quidem\",
    \"last_name\": \"omnis\",
    \"gender\": \"unknown\",
    \"inactive_at\": \"2025-04-03T10:51:41\",
    \"phone_number\": \"error\",
    \"hubspot_id\": 33763.1042964,
    \"location_ids\": [
        1357.23041312
    ]
}"

Request      

PUT api/contacts/{id}

PATCH api/contacts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the contact. Example: quisquam

Body Parameters

first_name   string   

Example: quidem

last_name   string  optional  

Example: omnis

gender   string  optional  

Example: unknown

Must be one of:
  • male
  • female
  • unknown
inactive_at   string  optional  

:Attribute moet een datum bevatten. Example: 2025-04-03T10:51:41

phone_number   string  optional  

Example: error

hubspot_id   number  optional  

Example: 33763.1042964

location_ids   number[]  optional  

The id of an existing record in the locations table.

DELETE api/contacts/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/contacts/fugiat"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/contacts/fugiat';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "http://localhost:8000/api/contacts/fugiat" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (204):

Empty response
 

Request      

DELETE api/contacts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the contact. Example: fugiat

Contracts

POST api/contracts

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/contracts"
);

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

let body = {
    "hubspot_id": 1,
    "name": "Contract 1",
    "start_at": "2021-01-01",
    "end_at": "2022-01-01",
    "warranty_end_at": "2025-04-03T10:51:41",
    "company_id": 1,
    "visit_interval_days": 7
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/contracts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'hubspot_id' => 1.0,
            'name' => 'Contract 1',
            'start_at' => '2021-01-01',
            'end_at' => '2022-01-01',
            'warranty_end_at' => '2025-04-03T10:51:41',
            'company_id' => 1.0,
            'visit_interval_days' => 7,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/contracts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"hubspot_id\": 1,
    \"name\": \"Contract 1\",
    \"start_at\": \"2021-01-01\",
    \"end_at\": \"2022-01-01\",
    \"warranty_end_at\": \"2025-04-03T10:51:41\",
    \"company_id\": 1,
    \"visit_interval_days\": 7
}"

Request      

POST api/contracts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

hubspot_id   number  optional  

The hubspot id of the contract. Example: 1

name   string   

The name of the contract. Example: Contract 1

start_at   string   

The start date of the contract. :Attribute moet een datum bevatten. Example: 2021-01-01

end_at   string  optional  

The end date of the contract. :Attribute moet een datum bevatten. :Attribute moet een datum na start_at zijn. Example: 2022-01-01

warranty_end_at   string  optional  

:Attribute moet een datum bevatten. Example: 2025-04-03T10:51:41

company_id   number   

The company id of the contract. The id of an existing record in the companies table. Example: 1

visit_interval_days   integer   

The visit interval days of the contract. :Attribute moet minimaal 0 zijn. Example: 7

PUT api/contracts/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/contracts/odit"
);

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

let body = {
    "hubspot_id": 1,
    "name": "Contract 1",
    "start_at": "2021-01-01",
    "end_at": "2022-01-01",
    "warranty_end_at": "2025-04-03T10:51:41",
    "company_id": 1,
    "visit_interval_days": 7
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/contracts/odit';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'hubspot_id' => 1.0,
            'name' => 'Contract 1',
            'start_at' => '2021-01-01',
            'end_at' => '2022-01-01',
            'warranty_end_at' => '2025-04-03T10:51:41',
            'company_id' => 1.0,
            'visit_interval_days' => 7,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "http://localhost:8000/api/contracts/odit" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"hubspot_id\": 1,
    \"name\": \"Contract 1\",
    \"start_at\": \"2021-01-01\",
    \"end_at\": \"2022-01-01\",
    \"warranty_end_at\": \"2025-04-03T10:51:41\",
    \"company_id\": 1,
    \"visit_interval_days\": 7
}"

Request      

PUT api/contracts/{id}

PATCH api/contracts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the contract. Example: odit

Body Parameters

hubspot_id   number  optional  

The hubspot id of the contract. Example: 1

name   string   

The name of the contract. Example: Contract 1

start_at   string   

The start date of the contract. :Attribute moet een datum bevatten. Example: 2021-01-01

end_at   string  optional  

The end date of the contract. :Attribute moet een datum bevatten. :Attribute moet een datum na start_at zijn. Example: 2022-01-01

warranty_end_at   string  optional  

:Attribute moet een datum bevatten. Example: 2025-04-03T10:51:41

company_id   number   

The company id of the contract. The id of an existing record in the companies table. Example: 1

visit_interval_days   integer   

The visit interval days of the contract. :Attribute moet minimaal 0 zijn. Example: 7

DELETE api/contracts/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/contracts/laudantium"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/contracts/laudantium';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "http://localhost:8000/api/contracts/laudantium" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (204):

Empty response
 

Request      

DELETE api/contracts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the contract. Example: laudantium

Dates

POST api/dates/{date}/complete

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/dates/2023-03-20/complete"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/dates/2023-03-20/complete';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/dates/2023-03-20/complete" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Request      

POST api/dates/{date}/complete

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

date   date   

The day to complete. Format YYYY-MM-DD Example: 2023-03-20

Endpoints

POST api/companies

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/companies"
);

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

let body = {
    "hubspot_id": 0.71354581,
    "name": "mnhubddlau",
    "phone": "bejharp"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/companies';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'hubspot_id' => 0.71354581,
            'name' => 'mnhubddlau',
            'phone' => 'bejharp',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/companies" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"hubspot_id\": 0.71354581,
    \"name\": \"mnhubddlau\",
    \"phone\": \"bejharp\"
}"

Request      

POST api/companies

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

hubspot_id   number  optional  

Example: 0.71354581

name   string   

:Attribute mag niet uit meer dan 255 tekens bestaan. Example: mnhubddlau

phone   string  optional  

:Attribute mag niet uit meer dan 255 tekens bestaan. Example: bejharp

PUT api/companies/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/companies/dolor"
);

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

let body = {
    "hubspot_id": 2.643055,
    "name": "obynvjrfybvddjmr",
    "phone": "ypab"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/companies/dolor';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'hubspot_id' => 2.643055,
            'name' => 'obynvjrfybvddjmr',
            'phone' => 'ypab',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "http://localhost:8000/api/companies/dolor" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"hubspot_id\": 2.643055,
    \"name\": \"obynvjrfybvddjmr\",
    \"phone\": \"ypab\"
}"

Request      

PUT api/companies/{id}

PATCH api/companies/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the company. Example: dolor

Body Parameters

hubspot_id   number  optional  

Example: 2.643055

name   string   

:Attribute mag niet uit meer dan 255 tekens bestaan. Example: obynvjrfybvddjmr

phone   string  optional  

:Attribute mag niet uit meer dan 255 tekens bestaan. Example: ypab

DELETE api/companies/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/companies/repellat"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/companies/repellat';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "http://localhost:8000/api/companies/repellat" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (204):

Empty response
 

Request      

DELETE api/companies/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the company. Example: repellat

POST api/visits/{id}/split

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/visits/ut/split"
);

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

let body = {
    "date": "2025-04-03T10:51:41",
    "planned_visits": [
        {
            "ve": 73,
            "user_id": 7,
            "is_primary_user": true
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/visits/ut/split';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'date' => '2025-04-03T10:51:41',
            'planned_visits' => [
                [
                    've' => 73,
                    'user_id' => 7,
                    'is_primary_user' => true,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/visits/ut/split" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date\": \"2025-04-03T10:51:41\",
    \"planned_visits\": [
        {
            \"ve\": 73,
            \"user_id\": 7,
            \"is_primary_user\": true
        }
    ]
}"

Request      

POST api/visits/{id}/split

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the visit. Example: ut

Body Parameters

date   string   

:Attribute moet een datum bevatten. Example: 2025-04-03T10:51:41

planned_visits   object[]   
ve   integer   

:Attribute moet minimaal 1 zijn. Example: 73

user_id   integer   

The id of an existing record in the users table. Example: 7

is_primary_user   boolean   

Example: true

Holidays

POST api/holidays

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/holidays"
);

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

let body = {
    "name": "tenetur",
    "start_at": "2025-04-03T10:51:41",
    "end_at": "2089-11-17",
    "plannable": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/holidays';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'tenetur',
            'start_at' => '2025-04-03T10:51:41',
            'end_at' => '2089-11-17',
            'plannable' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/holidays" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"tenetur\",
    \"start_at\": \"2025-04-03T10:51:41\",
    \"end_at\": \"2089-11-17\",
    \"plannable\": true
}"

Request      

POST api/holidays

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Example: tenetur

start_at   string   

:Attribute moet een datum bevatten. Example: 2025-04-03T10:51:41

end_at   string   

:Attribute moet een datum bevatten. :Attribute moet een datum na of gelijk aan start_at zijn. Example: 2089-11-17

plannable   boolean   

Example: true

PUT api/holidays/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/holidays/nihil"
);

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

let body = {
    "name": "alias",
    "start_at": "2025-04-03T10:51:41",
    "end_at": "2106-09-10",
    "plannable": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/holidays/nihil';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'alias',
            'start_at' => '2025-04-03T10:51:41',
            'end_at' => '2106-09-10',
            'plannable' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "http://localhost:8000/api/holidays/nihil" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"alias\",
    \"start_at\": \"2025-04-03T10:51:41\",
    \"end_at\": \"2106-09-10\",
    \"plannable\": false
}"

Request      

PUT api/holidays/{id}

PATCH api/holidays/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the holiday. Example: nihil

Body Parameters

name   string   

Example: alias

start_at   string   

:Attribute moet een datum bevatten. Example: 2025-04-03T10:51:41

end_at   string   

:Attribute moet een datum bevatten. :Attribute moet een datum na of gelijk aan start_at zijn. Example: 2106-09-10

plannable   boolean   

Example: false

DELETE api/holidays/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/holidays/sit"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/holidays/sit';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "http://localhost:8000/api/holidays/sit" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Request      

DELETE api/holidays/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the holiday. Example: sit

Locations

POST api/locations

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/locations"
);

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

let body = {
    "preferred_fallback_user_id_1": 2,
    "preferred_fallback_user_id_2": 12,
    "preferred_fallback_user_id_3": 15,
    "name": "Hoofdkantoor",
    "route_number": 183103.2,
    "hubspot_id": 137143.019,
    "phone": "0612345678",
    "country": "gf",
    "address": "Hoofdstraat 1",
    "address_addition": "2e verdieping",
    "zip": "1234 AB",
    "city": "Amsterdam",
    "ve": 10,
    "amount_plants": 100,
    "amount_plant_walls": 10,
    "amount_moss_walls": 5,
    "logbook_location": "Onder de stoeptegel naast de personeels ingang",
    "closed_start_at": "2020-12-25",
    "closed_end_at": "2021-01-01",
    "opening_days": [
        1
    ],
    "specialties": "Ze gooien soms paaseitjes in de plantenbakken.",
    "specialties_planning": "Peter weet het allemaal",
    "special_products": "Ze hebben een speciale plantenbak voor de paaseitjes.",
    "preferred_user_id": 1,
    "contract_id": 20,
    "contact_ids": [
        4.61
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/locations';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'preferred_fallback_user_id_1' => 2,
            'preferred_fallback_user_id_2' => 12,
            'preferred_fallback_user_id_3' => 15,
            'name' => 'Hoofdkantoor',
            'route_number' => 183103.2,
            'hubspot_id' => 137143.019,
            'phone' => '0612345678',
            'country' => 'gf',
            'address' => 'Hoofdstraat 1',
            'address_addition' => '2e verdieping',
            'zip' => '1234 AB',
            'city' => 'Amsterdam',
            've' => 10,
            'amount_plants' => 100,
            'amount_plant_walls' => 10,
            'amount_moss_walls' => 5,
            'logbook_location' => 'Onder de stoeptegel naast de personeels ingang',
            'closed_start_at' => '2020-12-25',
            'closed_end_at' => '2021-01-01',
            'opening_days' => [
                1,
            ],
            'specialties' => 'Ze gooien soms paaseitjes in de plantenbakken.',
            'specialties_planning' => 'Peter weet het allemaal',
            'special_products' => 'Ze hebben een speciale plantenbak voor de paaseitjes.',
            'preferred_user_id' => 1,
            'contract_id' => 20,
            'contact_ids' => [
                4.61,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/locations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"preferred_fallback_user_id_1\": 2,
    \"preferred_fallback_user_id_2\": 12,
    \"preferred_fallback_user_id_3\": 15,
    \"name\": \"Hoofdkantoor\",
    \"route_number\": 183103.2,
    \"hubspot_id\": 137143.019,
    \"phone\": \"0612345678\",
    \"country\": \"gf\",
    \"address\": \"Hoofdstraat 1\",
    \"address_addition\": \"2e verdieping\",
    \"zip\": \"1234 AB\",
    \"city\": \"Amsterdam\",
    \"ve\": 10,
    \"amount_plants\": 100,
    \"amount_plant_walls\": 10,
    \"amount_moss_walls\": 5,
    \"logbook_location\": \"Onder de stoeptegel naast de personeels ingang\",
    \"closed_start_at\": \"2020-12-25\",
    \"closed_end_at\": \"2021-01-01\",
    \"opening_days\": [
        1
    ],
    \"specialties\": \"Ze gooien soms paaseitjes in de plantenbakken.\",
    \"specialties_planning\": \"Peter weet het allemaal\",
    \"special_products\": \"Ze hebben een speciale plantenbak voor de paaseitjes.\",
    \"preferred_user_id\": 1,
    \"contract_id\": 20,
    \"contact_ids\": [
        4.61
    ]
}"

Request      

POST api/locations

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

preferred_fallback_user_id_1   integer  optional  

The preferred fallback user id of the location. The id of an existing record in the users table. The value and preferred_user_id must be different. The value and preferred_fallback_user_id_2 must be different. The value and preferred_fallback_user_id_3 must be different. Example: 2

preferred_fallback_user_id_2   integer  optional  

The id of an existing record in the users table. The value and preferred_user_id must be different. The value and preferred_fallback_user_id_1 must be different. The value and preferred_fallback_user_id_3 must be different. Example: 12

preferred_fallback_user_id_3   integer  optional  

The id of an existing record in the users table. The value and preferred_user_id must be different. The value and preferred_fallback_user_id_1 must be different. The value and preferred_fallback_user_id_2 must be different. Example: 15

name   string   

The name of the location. Example: Hoofdkantoor

route_number   number  optional  

Example: 183103.2

hubspot_id   number  optional  

Example: 137143.019

phone   string  optional  

The phone number of the location. Example: 0612345678

country   string   

:Attribute moet 2 tekens zijn. Example: gf

address   string   

The address of the location. Example: Hoofdstraat 1

address_addition   string  optional  

The address addition of the location. Example: 2e verdieping

zip   string   

The zip code of the location. Example: 1234 AB

city   string   

The city of the location. Example: Amsterdam

ve   integer   

The number of VE's (NL: verzorgings eenheden) of the location. :Attribute moet minimaal 0 zijn. Example: 10

amount_plants   integer   

The number of plants of the location. :Attribute moet minimaal 0 zijn. Example: 100

amount_plant_walls   integer   

The number of plant walls of the location. :Attribute moet minimaal 0 zijn. Example: 10

amount_moss_walls   integer   

The number of moss walls of the location. :Attribute moet minimaal 0 zijn. Example: 5

logbook_location   string  optional  

The location of the logbook. Example: Onder de stoeptegel naast de personeels ingang

closed_start_at   string  optional  

The start date of the closed period. :Attribute moet een datum bevatten. This field is required when closed_end_at is present. Example: 2020-12-25

closed_end_at   string  optional  

The end date of the closed period. :Attribute moet een datum bevatten. This field is required when closed_start_at is present. :Attribute moet een datum na closed_start_at zijn. Example: 2021-01-01

opening_days   integer[]  optional  

The opening days of the location. Valid days: 0-6. :Attribute moet tussen 0 en 6 zijn.

specialties   string  optional  

The specialties of the location. Example: Ze gooien soms paaseitjes in de plantenbakken.

specialties_planning   string  optional  

The specialties of the location for planning. Example: Peter weet het allemaal

special_products   string  optional  

The special products of the location. Example: Ze hebben een speciale plantenbak voor de paaseitjes.

preferred_user_id   integer  optional  

The preferred user id of the location. The id of an existing record in the users table. Example: 1

contract_id   integer  optional  

The id of an existing record in the contracts table. Example: 20

contact_ids   number[]  optional  

The id of an existing record in the contacts table.

PUT api/locations/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/locations/3"
);

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

let body = {
    "preferred_fallback_user_id_1": 2,
    "preferred_fallback_user_id_2": 15,
    "preferred_fallback_user_id_3": 7,
    "name": "Hoofdkantoor",
    "route_number": 50698011.12,
    "hubspot_id": 40.278,
    "phone": "0612345678",
    "country": "jz",
    "address": "Hoofdstraat 1",
    "address_addition": "2e verdieping",
    "zip": "1234 AB",
    "city": "Amsterdam",
    "ve": 10,
    "amount_plants": 100,
    "amount_plant_walls": 10,
    "amount_moss_walls": 5,
    "logbook_location": "Onder de stoeptegel naast de personeels ingang",
    "closed_start_at": "2020-12-25",
    "closed_end_at": "2021-01-01",
    "opening_days": [
        1
    ],
    "specialties": "Ze gooien soms paaseitjes in de plantenbakken.",
    "specialties_planning": "Peter weet het allemaal",
    "special_products": "Ze hebben een speciale plantenbak voor de paaseitjes.",
    "preferred_user_id": 1,
    "contract_id": 20,
    "contact_ids": [
        11760.69
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/locations/3';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'preferred_fallback_user_id_1' => 2,
            'preferred_fallback_user_id_2' => 15,
            'preferred_fallback_user_id_3' => 7,
            'name' => 'Hoofdkantoor',
            'route_number' => 50698011.12,
            'hubspot_id' => 40.278,
            'phone' => '0612345678',
            'country' => 'jz',
            'address' => 'Hoofdstraat 1',
            'address_addition' => '2e verdieping',
            'zip' => '1234 AB',
            'city' => 'Amsterdam',
            've' => 10,
            'amount_plants' => 100,
            'amount_plant_walls' => 10,
            'amount_moss_walls' => 5,
            'logbook_location' => 'Onder de stoeptegel naast de personeels ingang',
            'closed_start_at' => '2020-12-25',
            'closed_end_at' => '2021-01-01',
            'opening_days' => [
                1,
            ],
            'specialties' => 'Ze gooien soms paaseitjes in de plantenbakken.',
            'specialties_planning' => 'Peter weet het allemaal',
            'special_products' => 'Ze hebben een speciale plantenbak voor de paaseitjes.',
            'preferred_user_id' => 1,
            'contract_id' => 20,
            'contact_ids' => [
                11760.69,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "http://localhost:8000/api/locations/3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"preferred_fallback_user_id_1\": 2,
    \"preferred_fallback_user_id_2\": 15,
    \"preferred_fallback_user_id_3\": 7,
    \"name\": \"Hoofdkantoor\",
    \"route_number\": 50698011.12,
    \"hubspot_id\": 40.278,
    \"phone\": \"0612345678\",
    \"country\": \"jz\",
    \"address\": \"Hoofdstraat 1\",
    \"address_addition\": \"2e verdieping\",
    \"zip\": \"1234 AB\",
    \"city\": \"Amsterdam\",
    \"ve\": 10,
    \"amount_plants\": 100,
    \"amount_plant_walls\": 10,
    \"amount_moss_walls\": 5,
    \"logbook_location\": \"Onder de stoeptegel naast de personeels ingang\",
    \"closed_start_at\": \"2020-12-25\",
    \"closed_end_at\": \"2021-01-01\",
    \"opening_days\": [
        1
    ],
    \"specialties\": \"Ze gooien soms paaseitjes in de plantenbakken.\",
    \"specialties_planning\": \"Peter weet het allemaal\",
    \"special_products\": \"Ze hebben een speciale plantenbak voor de paaseitjes.\",
    \"preferred_user_id\": 1,
    \"contract_id\": 20,
    \"contact_ids\": [
        11760.69
    ]
}"

Request      

PUT api/locations/{id}

PATCH api/locations/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the location. Example: 3

Body Parameters

preferred_fallback_user_id_1   integer  optional  

The preferred fallback user id of the location. The id of an existing record in the users table. The value and preferred_user_id must be different. The value and preferred_fallback_user_id_2 must be different. The value and preferred_fallback_user_id_3 must be different. Example: 2

preferred_fallback_user_id_2   integer  optional  

The id of an existing record in the users table. The value and preferred_user_id must be different. The value and preferred_fallback_user_id_1 must be different. The value and preferred_fallback_user_id_3 must be different. Example: 15

preferred_fallback_user_id_3   integer  optional  

The id of an existing record in the users table. The value and preferred_user_id must be different. The value and preferred_fallback_user_id_1 must be different. The value and preferred_fallback_user_id_2 must be different. Example: 7

name   string   

The name of the location. Example: Hoofdkantoor

route_number   number  optional  

Example: 50698011.12

hubspot_id   number  optional  

Example: 40.278

phone   string  optional  

The phone number of the location. Example: 0612345678

country   string   

:Attribute moet 2 tekens zijn. Example: jz

address   string   

The address of the location. Example: Hoofdstraat 1

address_addition   string  optional  

The address addition of the location. Example: 2e verdieping

zip   string   

The zip code of the location. Example: 1234 AB

city   string   

The city of the location. Example: Amsterdam

ve   integer   

The number of VE's (NL: verzorgings eenheden) of the location. :Attribute moet minimaal 0 zijn. Example: 10

amount_plants   integer   

The number of plants of the location. :Attribute moet minimaal 0 zijn. Example: 100

amount_plant_walls   integer   

The number of plant walls of the location. :Attribute moet minimaal 0 zijn. Example: 10

amount_moss_walls   integer   

The number of moss walls of the location. :Attribute moet minimaal 0 zijn. Example: 5

logbook_location   string  optional  

The location of the logbook. Example: Onder de stoeptegel naast de personeels ingang

closed_start_at   string  optional  

The start date of the closed period. :Attribute moet een datum bevatten. This field is required when closed_end_at is present. Example: 2020-12-25

closed_end_at   string  optional  

The end date of the closed period. :Attribute moet een datum bevatten. This field is required when closed_start_at is present. :Attribute moet een datum na closed_start_at zijn. Example: 2021-01-01

opening_days   integer[]  optional  

The opening days of the location. Valid days: 0-6. :Attribute moet tussen 0 en 6 zijn.

specialties   string  optional  

The specialties of the location. Example: Ze gooien soms paaseitjes in de plantenbakken.

specialties_planning   string  optional  

The specialties of the location for planning. Example: Peter weet het allemaal

special_products   string  optional  

The special products of the location. Example: Ze hebben een speciale plantenbak voor de paaseitjes.

preferred_user_id   integer  optional  

The preferred user id of the location. The id of an existing record in the users table. Example: 1

contract_id   integer  optional  

The id of an existing record in the contracts table. Example: 20

contact_ids   number[]  optional  

The id of an existing record in the contacts table.

DELETE api/locations/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/locations/7"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/locations/7';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "http://localhost:8000/api/locations/7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Request      

DELETE api/locations/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the location. Example: 7

Media

DELETE api/media/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/media/qui"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/media/qui';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "http://localhost:8000/api/media/qui" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (204):

Empty response
 

Request      

DELETE api/media/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the medium. Example: qui

Planning

POST api/planning

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/planning"
);

const params = {
    "from": "2025-04-03",
    "to": "2025-04-10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/planning';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2025-04-03',
            'to' => '2025-04-10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/planning?from=2025-04-03&to=2025-04-10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Request      

POST api/planning

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string   

The start date of the planning. :Attribute moet een datum bevatten. Example: 2025-04-03

to   string   

The end date of the planning. :Attribute moet een datum bevatten. :Attribute moet een datum na of gelijk aan from zijn. Example: 2025-04-10

POST api/planning/export

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/planning/export"
);

const params = {
    "date": "2025-04-03",
    "range": "7",
    "search": "quaerat",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/planning/export';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'date' => '2025-04-03',
            'range' => '7',
            'search' => 'quaerat',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/planning/export?date=2025-04-03&range=7&search=quaerat" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Request      

POST api/planning/export

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

date   string   

The offset date of the planning. :Attribute moet een datum bevatten. Example: 2025-04-03

range   integer   

The number of days to show from the offset date. :Attribute moet minimaal 1 zijn. :Attribute mag niet hoger dan 10 zijn. Example: 7

search   string  optional  

Example: quaerat

POST api/planning/swap

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/planning/swap"
);

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

let body = {
    "user_id": "qui",
    "date_a": "2075-02-20",
    "date_b": "2097-03-31"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/planning/swap';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 'qui',
            'date_a' => '2075-02-20',
            'date_b' => '2097-03-31',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/planning/swap" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": \"qui\",
    \"date_a\": \"2075-02-20\",
    \"date_b\": \"2097-03-31\"
}"

Request      

POST api/planning/swap

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

user_id   string   

The id of an existing record in the users table. Example: qui

date_a   string   

:Attribute moet een datum bevatten. :Attribute moet een datum na now zijn. Example: 2075-02-20

date_b   string   

:Attribute moet een datum bevatten. The value and date_a must be different. :Attribute moet een datum na now zijn. Example: 2097-03-31

POST api/planning/plan-route

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/planning/plan-route"
);

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

let body = {
    "user_id": "aut",
    "date": "2037-06-27",
    "route_number": 13
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/planning/plan-route';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 'aut',
            'date' => '2037-06-27',
            'route_number' => 13,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/planning/plan-route" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": \"aut\",
    \"date\": \"2037-06-27\",
    \"route_number\": 13
}"

Request      

POST api/planning/plan-route

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

user_id   string   

The id of an existing record in the users table. Example: aut

date   string   

:Attribute moet een datum bevatten. :Attribute moet een datum na now zijn. Example: 2037-06-27

route_number   integer   

Example: 13

DELETE api/planning/route

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/planning/route"
);

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

let body = {
    "route_number": 8
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/planning/route';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'route_number' => 8,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "http://localhost:8000/api/planning/route" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"route_number\": 8
}"

Request      

DELETE api/planning/route

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

route_number   integer   

Example: 8

PUT api/planning/ideal-date

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/planning/ideal-date"
);

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

let body = {
    "route_number": 16,
    "ideal_date": "2075-10-30"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/planning/ideal-date';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'route_number' => 16,
            'ideal_date' => '2075-10-30',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "http://localhost:8000/api/planning/ideal-date" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"route_number\": 16,
    \"ideal_date\": \"2075-10-30\"
}"

Request      

PUT api/planning/ideal-date

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

route_number   integer  optional  

This field is required when visit_ids is not present. Example: 16

visit_ids   string[]  optional  

The id of an existing record in the visits table.

ideal_date   string   

:Attribute moet een datum bevatten. :Attribute moet een datum na today zijn. Example: 2075-10-30

POST api/planning/inform

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/planning/inform"
);

const params = {
    "from": "2025-04-03",
    "to": "2025-04-10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/planning/inform';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2025-04-03',
            'to' => '2025-04-10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/planning/inform?from=2025-04-03&to=2025-04-10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Request      

POST api/planning/inform

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string   

The start date of the planning. :Attribute moet een datum bevatten. Example: 2025-04-03

to   string   

The end date of the planning. :Attribute moet een datum bevatten. :Attribute moet een datum na of gelijk aan from zijn. Example: 2025-04-10

POST api/planning/generate

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/planning/generate"
);

const params = {
    "from": "2025-04-03",
    "to": "2025-04-10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/planning/generate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2025-04-03',
            'to' => '2025-04-10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/planning/generate?from=2025-04-03&to=2025-04-10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Request      

POST api/planning/generate

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string   

The start date of the planning. :Attribute moet een datum bevatten. Example: 2025-04-03

to   string   

The end date of the planning. :Attribute moet een datum bevatten. :Attribute moet een datum na of gelijk aan from zijn. Example: 2025-04-10

Users

POST api/users

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/users"
);

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

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "test@example.com",
    "roles": [
        "admin"
    ],
    "country": "nf",
    "city": "Amsterdam",
    "address": "Street 1",
    "zip": "1234AB",
    "region": "west",
    "license_plate": "AB-12-CD",
    "workdays": [
        1
    ],
    "inactive_at": "2021-01-01",
    "plannable_at": "2021-01-01",
    "ve_limit": 100
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/users';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'first_name' => 'John',
            'last_name' => 'Doe',
            'email' => 'test@example.com',
            'roles' => [
                'admin',
            ],
            'country' => 'nf',
            'city' => 'Amsterdam',
            'address' => 'Street 1',
            'zip' => '1234AB',
            'region' => 'west',
            'license_plate' => 'AB-12-CD',
            'workdays' => [
                1,
            ],
            'inactive_at' => '2021-01-01',
            'plannable_at' => '2021-01-01',
            've_limit' => 100,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/users" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"test@example.com\",
    \"roles\": [
        \"admin\"
    ],
    \"country\": \"nf\",
    \"city\": \"Amsterdam\",
    \"address\": \"Street 1\",
    \"zip\": \"1234AB\",
    \"region\": \"west\",
    \"license_plate\": \"AB-12-CD\",
    \"workdays\": [
        1
    ],
    \"inactive_at\": \"2021-01-01\",
    \"plannable_at\": \"2021-01-01\",
    \"ve_limit\": 100
}"

Request      

POST api/users

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

first_name   string   

The first name of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: John

last_name   string   

The last name of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: Doe

email   string   

The email of the user. :Attribute is geen geldig e-mailadres. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: test@example.com

roles   string[]  optional  

The roles of the user. Valid roles: admin, service, planner. The name of an existing record in the roles table.

country   string   

:Attribute moet 2 tekens zijn. Example: nf

city   string   

The city of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: Amsterdam

address   string   

The address of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: Street 1

zip   string   

The zip code of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: 1234AB

region   string  optional  

Example: west

Must be one of:
  • north
  • south
  • east
  • west
license_plate   string  optional  

The license plate of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: AB-12-CD

workdays   integer[]  optional  

The workdays of the user. Valid days: 0-6. :Attribute moet tussen 0 en 6 zijn.

inactive_at   string  optional  

The date the user is inactive. :Attribute moet een datum bevatten. Example: 2021-01-01

plannable_at   string  optional  

The date the user is plannable. :Attribute moet een datum bevatten. Example: 2021-01-01

ve_limit   integer  optional  

The VE limit of the user. :Attribute moet tussen 0 en 1000 zijn. Example: 100

PUT api/users/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/users/deleniti"
);

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

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "test@example.com",
    "roles": [
        "admin"
    ],
    "country": "ee",
    "city": "Amsterdam",
    "address": "Street 1",
    "zip": "1234AB",
    "region": "east",
    "license_plate": "AB-12-CD",
    "workdays": [
        1
    ],
    "inactive_at": "2021-01-01",
    "plannable_at": "2021-01-01",
    "ve_limit": 100
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/users/deleniti';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'first_name' => 'John',
            'last_name' => 'Doe',
            'email' => 'test@example.com',
            'roles' => [
                'admin',
            ],
            'country' => 'ee',
            'city' => 'Amsterdam',
            'address' => 'Street 1',
            'zip' => '1234AB',
            'region' => 'east',
            'license_plate' => 'AB-12-CD',
            'workdays' => [
                1,
            ],
            'inactive_at' => '2021-01-01',
            'plannable_at' => '2021-01-01',
            've_limit' => 100,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "http://localhost:8000/api/users/deleniti" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"test@example.com\",
    \"roles\": [
        \"admin\"
    ],
    \"country\": \"ee\",
    \"city\": \"Amsterdam\",
    \"address\": \"Street 1\",
    \"zip\": \"1234AB\",
    \"region\": \"east\",
    \"license_plate\": \"AB-12-CD\",
    \"workdays\": [
        1
    ],
    \"inactive_at\": \"2021-01-01\",
    \"plannable_at\": \"2021-01-01\",
    \"ve_limit\": 100
}"

Request      

PUT api/users/{id}

PATCH api/users/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the user. Example: deleniti

Body Parameters

first_name   string   

The first name of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: John

last_name   string   

The last name of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: Doe

email   string   

The email of the user. :Attribute is geen geldig e-mailadres. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: test@example.com

roles   string[]  optional  

The roles of the user. Valid roles: admin, service, planner. The name of an existing record in the roles table.

country   string   

:Attribute moet 2 tekens zijn. Example: ee

city   string   

The city of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: Amsterdam

address   string   

The address of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: Street 1

zip   string   

The zip code of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: 1234AB

region   string  optional  

Example: east

Must be one of:
  • north
  • south
  • east
  • west
license_plate   string  optional  

The license plate of the user. :Attribute mag niet uit meer dan 255 tekens bestaan. Example: AB-12-CD

workdays   integer[]  optional  

The workdays of the user. Valid days: 0-6. :Attribute moet tussen 0 en 6 zijn.

inactive_at   string  optional  

The date the user is inactive. :Attribute moet een datum bevatten. Example: 2021-01-01

plannable_at   string  optional  

The date the user is plannable. :Attribute moet een datum bevatten. Example: 2021-01-01

ve_limit   integer  optional  

The VE limit of the user. :Attribute moet tussen 0 en 1000 zijn. Example: 100

Absences

DELETE api/absences/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/absences/perferendis"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/absences/perferendis';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "http://localhost:8000/api/absences/perferendis" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (204):

Empty response
 

Request      

DELETE api/absences/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the absence. Example: perferendis

Visits

Tasks

DELETE api/visit-report-tasks/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/visit-report-tasks/nihil"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/visit-report-tasks/nihil';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "http://localhost:8000/api/visit-report-tasks/nihil" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (204):

Empty response
 

Request      

DELETE api/visit-report-tasks/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the visit report task. Example: nihil

PUT api/visit-report-tasks/{visit_report_task}/restore

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/visit-report-tasks/recusandae/restore"
);

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

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/visit-report-tasks/recusandae/restore';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "http://localhost:8000/api/visit-report-tasks/recusandae/restore" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Request      

PUT api/visit-report-tasks/{visit_report_task}/restore

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

visit_report_task   string   

Example: recusandae

Planned

DELETE api/planned-visits/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/planned-visits/et"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/planned-visits/et';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "http://localhost:8000/api/planned-visits/et" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (204):

Empty response
 

Request      

DELETE api/planned-visits/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the planned visit. Example: et

POST api/visits

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/visits"
);

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

let body = {
    "planned_visit_id": "sed"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/visits';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'planned_visit_id' => 'sed',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/visits" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"planned_visit_id\": \"sed\"
}"

Request      

POST api/visits

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

planned_visit_id   string   

The id of an existing record in the planned_visits table. Example: sed

PUT api/visits/{id}

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/visits/est"
);

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

let body = {
    "status": "planned",
    "restrictions": [
        "optimization"
    ],
    "activities_next_time_planning": "aut",
    "hubspot_id": 16
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/visits/est';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'status' => 'planned',
            'restrictions' => [
                'optimization',
            ],
            'activities_next_time_planning' => 'aut',
            'hubspot_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "http://localhost:8000/api/visits/est" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"planned\",
    \"restrictions\": [
        \"optimization\"
    ],
    \"activities_next_time_planning\": \"aut\",
    \"hubspot_id\": 16
}"

Request      

PUT api/visits/{id}

PATCH api/visits/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the visit. Example: est

Body Parameters

status   string  optional  

This field is required when hubspot_id is not present. Example: planned

Must be one of:
  • backlog
  • concept
  • planned
  • completed
  • not_completed
restrictions   string[]  optional  
Must be one of:
  • optimization
activities_next_time_planning   string  optional  

Example: aut

hubspot_id   integer  optional  

This field is required when status is not present. Example: 16

POST api/visits/{id}/inform

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/visits/voluptates/inform"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://localhost:8000/api/visits/voluptates/inform';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost:8000/api/visits/voluptates/inform" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Request      

POST api/visits/{id}/inform

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the visit. Example: voluptates