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\"
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
]
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
]
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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\"
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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\"
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
]
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
]
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
]
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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\"
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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\"
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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\"
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.