Introduction
The API for the Service Planner App
Welcome to the ServicePlanner API documentation
Base URL
http://serviceplannerapp.test
Authenticating requests
Authenticate requests to this API's endpoints by sending an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Endpoints
GET company-redirect/{page?}
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/company-redirect/',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/company-redirect/'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/company-redirect/" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/company-redirect/"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
Show headers
cache-control: no-cache, private
location: https://app.service-planner.nl/company-redirect/
content-type: application/json
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='https://app.service-planner.nl/company-redirect/'" />
<title>Redirecting to https://app.service-planner.nl/company-redirect/</title>
</head>
<body>
Redirecting to <a href="https://app.service-planner.nl/company-redirect/">https://app.service-planner.nl/company-redirect/</a>.
</body>
</html>
Received response:
Request failed with error:
GET /
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl//'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Addresses
APIs for managing addresses
list
requires authentication
Middels deze functie kunt u een lijst met adressen ophalen.
Indien de next_page_url
aanwezig is zijn er meer pagina's met addressen. Adressen worden per 100 adressen teruggegeven.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/address',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
'per_page'=> '20',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/address'
params = {
'page': '1',
'per_page': '20',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/address?page=1&per_page=20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/address"
);
const params = {
"page": "1",
"per_page": "20",
};
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: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"current_page": 1,
"data": [
{
"id": 1,
"profitemp_id": null,
"company_id": 1,
"client_id": 2,
"street": "Dorpstraat",
"house_number": "1",
"house_number_addition": null,
"zipcode": "1234 XX",
"city": "Amsterdam",
"type": "invoice",
"geocode_lat": "52.3599976",
"geocode_lng": "4.8852188",
"country_id": 157,
"created_at": "2021-02-23T15:14:13.000000Z",
"updated_at": "2021-05-04T07:50:09.000000Z",
"old_address_id": 0,
"deleted_at": null
}
],
"first_page_url": "https://service-planner-app.test/api/address?page=1",
"from": 1,
"next_page_url": "https://service-planner-app.test/api/address?page=2",
"path": "https://service-planner-app.test/api/address",
"per_page": 100,
"prev_page_url": null,
"to": 100
}
Received response:
Request failed with error:
add
requires authentication
Middels deze functie is het mogelijk om een adres toe te voegen.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.service-planner.nl/address',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'client_id' => 19,
'street' => 'Dorpstraat',
'house_number' => '1',
'house_number_addition' => 'A',
'zipcode' => '6500AA',
'city' => 'Nijmegen',
'type' => 'work',
'geocode_lat' => '52.3599976',
'geocode_lng' => '4.8852188',
'country_id' => 157,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/address'
payload = {
"client_id": 19,
"street": "Dorpstraat",
"house_number": "1",
"house_number_addition": "A",
"zipcode": "6500AA",
"city": "Nijmegen",
"type": "work",
"geocode_lat": "52.3599976",
"geocode_lng": "4.8852188",
"country_id": 157
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl --request POST \
"https://api.service-planner.nl/address" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"client_id\": 19,
\"street\": \"Dorpstraat\",
\"house_number\": \"1\",
\"house_number_addition\": \"A\",
\"zipcode\": \"6500AA\",
\"city\": \"Nijmegen\",
\"type\": \"work\",
\"geocode_lat\": \"52.3599976\",
\"geocode_lng\": \"4.8852188\",
\"country_id\": 157
}"
const url = new URL(
"https://api.service-planner.nl/address"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"client_id": 19,
"street": "Dorpstraat",
"house_number": "1",
"house_number_addition": "A",
"zipcode": "6500AA",
"city": "Nijmegen",
"type": "work",
"geocode_lat": "52.3599976",
"geocode_lng": "4.8852188",
"country_id": 157
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
show
requires authentication
Middels deze functie kunt u meer informatie over een adres ophalen.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/address/34241',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/address/34241'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/address/34241" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/address/34241"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": ,
"company_id": 1,
"client_id": 1,
"street": "Dorpstraat 1",
"house_number": "",
"house_number_addition": "",
"zipcode": "1234 VM",
"city": "Tegelen",
"type": "invoice",
"geocode_lat": "",
"geocode_lng": "",
"country_id": 157,
"created_at": null,
"updated_at": null,
"old_address_id": 0,
"deleted_at": null,
"client": {
"id": 1,
"profitemp_id": 172,
"company_id": 1632,
"client_number": 8148,
"gender": "M",
"first_name": "Dhr.",
"last_name": "aaaaa",
"company_name": "",
"email": null,
"email_alternative": "",
"email_invoice": null,
"appointment_confirmation": 0,
"phone": "",
"phone_note": null,
"phone_alternative": "",
"phone_alternative_note": null,
"note": "",
"email_option": "",
"work_address_same_as_invoice_address": 0,
"add_contact_person": 0,
"checked": null,
"deleted_at": null,
"created_at": null,
"updated_at": null
},
}
Received response:
Request failed with error:
Response
Response Fields
type
string
The type of the address. This is either invoice
or work
.
update
requires authentication
Middels deze functie is het mogelijk om een adres te updaten.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.service-planner.nl/address/34241',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'client_id' => 14,
'street' => 'Dorpstraat',
'house_number' => '1',
'house_number_addition' => 'A',
'zipcode' => '6500AA',
'city' => 'Nijmegen',
'type' => 'work',
'geocode_lat' => '52.3599976',
'geocode_lng' => '4.8852188',
'country_id' => 157,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/address/34241'
payload = {
"client_id": 14,
"street": "Dorpstraat",
"house_number": "1",
"house_number_addition": "A",
"zipcode": "6500AA",
"city": "Nijmegen",
"type": "work",
"geocode_lat": "52.3599976",
"geocode_lng": "4.8852188",
"country_id": 157
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
curl --request PUT \
"https://api.service-planner.nl/address/34241" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"client_id\": 14,
\"street\": \"Dorpstraat\",
\"house_number\": \"1\",
\"house_number_addition\": \"A\",
\"zipcode\": \"6500AA\",
\"city\": \"Nijmegen\",
\"type\": \"work\",
\"geocode_lat\": \"52.3599976\",
\"geocode_lng\": \"4.8852188\",
\"country_id\": 157
}"
const url = new URL(
"https://api.service-planner.nl/address/34241"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"client_id": 14,
"street": "Dorpstraat",
"house_number": "1",
"house_number_addition": "A",
"zipcode": "6500AA",
"city": "Nijmegen",
"type": "work",
"geocode_lat": "52.3599976",
"geocode_lng": "4.8852188",
"country_id": 157
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
delete
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.service-planner.nl/address/34241',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/address/34241'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
curl --request DELETE \
"https://api.service-planner.nl/address/34241" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/address/34241"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Appointments
APIs for managing appointments
list types
requires authentication
Middels deze functie kunnen alle afspraaksoorten worden opgehaald. Deze kunnen gebruikt worden bij aanmaken van items of maken van afspraken.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/appointment/types',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/appointment/types'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/appointment/types" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/appointment/types"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 4927,
"profitemp_id": null,
"company_id": 1411,
"name": "Auto inspectie",
"location": "",
"time": 30,
"description": "het inspecteren van uw auto",
"priority": 0,
"max_distance": "",
"publicly_visible": true,
"created_at": "2021-11-17T09:08:48.000000Z",
"updated_at": "2021-11-17T09:08:48.000000Z",
"deleted_at": null
},
]
Received response:
Request failed with error:
Response
Response Fields
time
string
The duration of the appointment type in minutes.
list
requires authentication
Middels deze functie kunnen afspraken worden opgehaald
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/appointment',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
'users[]'=> '1',
'appointment_type[]'=> '1',
'ordertype'=> 'asc',
],
'json' => [
'page' => 14,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/appointment'
payload = {
"page": 14
}
params = {
'page': '1',
'users[]': '1',
'appointment_type[]': '1',
'ordertype': 'asc',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/appointment?page=1&users[]=1&appointment_type[]=1&ordertype=asc" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"page\": 14
}"
const url = new URL(
"https://api.service-planner.nl/appointment"
);
const params = {
"page": "1",
"users[]": "1",
"appointment_type[]": "1",
"ordertype": "asc",
};
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",
};
let body = {
"page": 14
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"current_page": 2,
"data": [
{
"id": 12345,
"company_id": ,
"client_id": ,
"appointment_type_id": ,
"send_mail_to_client": "",
"prepared_at": "2016-11-16",
"planned_at": "2016-11-16",
"send_confirmed_at": null,
"send_at": "2016-11-16",
"confirmed_at": null,
"visited_at": "2020-08-11",
"send_reminder_at": null,
"send_reminder_2_at": null,
"not_visited_at": null,
"canceled_at": "2016-11-15",
"drive_time": null,
"time_from": "2016-11-16T09:00:00.000000Z",
"time_to": "2016-11-16T10:00:00.000000Z",
"time": 60,
"plan_from": "2016-11-01T00:00:00.000000Z",
"plan_to": "2016-11-30T23:59:59.000000Z",
"plan_next_date": null,
"address_geocode": null,
"address_id": "",
"description_intern": "",
"description_client": null,
"reminder_checked": null,
"created_at": null,
"updated_at": "2020-08-11T12:11:08.000000Z",
"time_from_order": "2016-11-16 09:00:00",
"plan_from_order": "2016-11-01 00:00:00",
"appointment_type": {
"id": 1677,
"company_id": ,
"name": "Onderhoud",
"location": "",
"time": 0,
"description": "",
"priority": 0,
"max_distance": "",
"created_at": "2020-08-11T09:46:24.000000Z",
"updated_at": "2020-08-11T09:46:24.000000Z"
},
"services": [
{
"id": ,
"client_id": ,
"company_id": ,
"item_category_id": null,
"address_id": ,
"name": "TopLine Compact HRC 30/CW5",
"time": "55",
"appointment_type_id": 1677,
"user_id": 0,
"recurring": 1,
"plan_cycle": "24",
"date_from": "2019-03-01T00:00:00.000000Z",
"date_to": null,
"plan_next_date": null,
"reminders": "",
"contract": "Onderhoud 2jr",
"note": "Garantie tot: 17-6-2024",
"created_at": "2020-08-11T09:46:26.000000Z",
"updated_at": null,
"pivot": {
"appointment_id": 282331,
"service_id": 114511
},
"checklists": []
}
],
"client": {
"id": ,
"company_id": ,
"client_number": 8145,
"gender": "M",
"first_name": "Fam.",
"last_name": "aaaa",
"company_name": "",
"email": null,
"email_alternative": "",
"email_invoice": null,
"appointment_confirmation": 0,
"phone": "",
"phone_note": null,
"phone_alternative": "",
"phone_alternative_note": null,
"note": "",
"email_option": "",
"work_address_same_as_invoice_address": 0,
"add_contact_person": 0,
"checked": null,
"deleted_at": null,
"created_at": null,
"updated_at": null
},
"work_orders": [],
"address": {
"id": ,
"company_id": ,
"client_id": ,
"street": "street 18",
"house_number": "",
"house_number_addition": "",
"zipcode": "1234 TH",
"city": "plaats",
"type": "work",
"geocode_lat": "51.----",
"geocode_lng": "6.000",
"country_id": 157,
"created_at": null,
"updated_at": null,
"old_address_id": 0,
"deleted_at": null
}
}
],
"first_page_url": "....api/appointment?page=1",
"from": 2,
"last_page": 158,
"last_page_url": "....api/appointment?page=158",
"next_page_url": "....api/appointment?page=3",
"path": "....api/appointment",
"per_page": "1",
"prev_page_url": "....api/appointment?page=1",
"to": 2,
"total": 158
}
Received response:
Request failed with error:
add
requires authentication
Middels deze functie is het mogelijk om een afspraak toe te voegen.
Gebruik bij voorkeur *plan_appointment:false
Wilt u uitnodigingen versturen? zet service op invite met appointment_or_invite:'invite'! daarna deze functie met de volgende opties: send_mail_to_client:"direct",plan_appointment:false en / appointment_or_invite op invite
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.service-planner.nl/appointment',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'appointment_type_id' => 20,
'client_id' => 11,
'services' => [
1,
5,
1337,
],
'users' => [
2,
3,
1986,
],
'address_id' => 5,
'time' => 4,
'send_mail_to_client' => 'default',
'plan_appointment' => true,
'appointment_or_invite' => 'appointment',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/appointment'
payload = {
"appointment_type_id": 20,
"client_id": 11,
"services": [
1,
5,
1337
],
"users": [
2,
3,
1986
],
"address_id": 5,
"time": 4,
"send_mail_to_client": "default",
"plan_appointment": true,
"appointment_or_invite": "appointment"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl --request POST \
"https://api.service-planner.nl/appointment" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"appointment_type_id\": 20,
\"client_id\": 11,
\"services\": [
1,
5,
1337
],
\"users\": [
2,
3,
1986
],
\"address_id\": 5,
\"time\": 4,
\"send_mail_to_client\": \"default\",
\"plan_appointment\": true,
\"appointment_or_invite\": \"appointment\"
}"
const url = new URL(
"https://api.service-planner.nl/appointment"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"appointment_type_id": 20,
"client_id": 11,
"services": [
1,
5,
1337
],
"users": [
2,
3,
1986
],
"address_id": 5,
"time": 4,
"send_mail_to_client": "default",
"plan_appointment": true,
"appointment_or_invite": "appointment"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"appointment_type_id": 1077,
"client_id": 91341,
"company_id": 1488,
"time_from": "2021-03-01T15:13:35.000000Z",
"time_to": "2021-03-01T15:13:35.000000Z",
"time": 2021,
"plan_from": "2021-03-01T15:13:35.000000Z",
"plan_to": "2021-03-01T15:13:35.000000Z",
"updated_at": "2021-03-09T09:40:09.000000Z",
"created_at": "2021-03-09T09:40:09.000000Z",
"appointment_or_invite": "appointment",
"id": 466253
}
Received response:
Request failed with error:
show
requires authentication
Middels deze functie kunt u meer informatie over een afspraak ophalen.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/appointment/31778',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/appointment/31778'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/appointment/31778" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/appointment/31778"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": ,
"company_id": ,
"client_id": 804355,
"appointment_type_id": 2176,
"send_mail_to_client": "",
"prepared_at": "2016-11-16",
"planned_at": "2016-11-16",
"send_confirmed_at": null,
"send_at": "2016-11-16",
"confirmed_at": null,
"visited_at": "2020-08-11",
"send_reminder_at": null,
"send_reminder_2_at": null,
"not_visited_at": null,
"canceled_at": "2016-11-15",
"drive_time": null,
"time_from": "2016-11-16T09:00:00.000000Z",
"time_to": "2016-11-16T10:00:00.000000Z",
"time": 60,
"plan_from": "2016-11-01T00:00:00.000000Z",
"plan_to": "2016-11-30T23:59:59.000000Z",
"plan_next_date": null,
"address_geocode": null,
"address_id": "",
"description_intern": "",
"description_client": null,
"reminder_checked": null,
"created_at": null,
"updated_at": "2020-08-11T12:11:08.000000Z",
"status_system": "canceled",
"work_orders": [],
"field_values": [],
"work_order": null,
"client": {
"id": 158816,
"profitemp_id": 172,
"company_id": 1632,
"client_number": 8145,
"gender": "M",
"first_name": "Fam.",
"last_name": "Hendrix",
"company_name": "",
"email": null,
"email_alternative": "",
"email_invoice": null,
"appointment_confirmation": 0,
"phone": "",
"phone_note": null,
"phone_alternative": "",
"phone_alternative_note": null,
"note": "",
"email_option": "",
"work_address_same_as_invoice_address": 0,
"add_contact_person": 0,
"checked": null,
"deleted_at": null,
"created_at": null,
"updated_at": null
},
"appointment_type": {},
"address": {},
"checklists": [],
"services": [{}}],
"users": [{}}],
"company": {}
}
Received response:
Request failed with error:
delete
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.service-planner.nl/appointment/31778',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/appointment/31778'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
curl --request DELETE \
"https://api.service-planner.nl/appointment/31778" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/appointment/31778"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Clients
APIs for managing clients
list
requires authentication
Middels deze functie kunt u een lijst met klanten ophalen.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/clients',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
'per_page'=> '20',
'search'=> 'John Doe',
'client_number'=> '123456789',
'sort'=> 'client_number',
'ordertype'=> 'asc',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/clients'
params = {
'page': '1',
'per_page': '20',
'search': 'John Doe',
'client_number': '123456789',
'sort': 'client_number',
'ordertype': 'asc',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/clients?page=1&per_page=20&search=John+Doe&client_number=123456789&sort=client_number&ordertype=asc" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/clients"
);
const params = {
"page": "1",
"per_page": "20",
"search": "John Doe",
"client_number": "123456789",
"sort": "client_number",
"ordertype": "asc",
};
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: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
add
requires authentication
Middels deze functie is het mogelijk om een client toe te voegen.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.service-planner.nl/clients',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'client_number' => 3,
'gender' => 'm-f',
'first_name' => 'John',
'last_name' => 'Doe',
'company_name' => 'John Doe',
'email' => 'example@service-planner.nl',
'mobile_phone' => '0612345678',
'phone' => '0612345678',
'address' => [
'voluptatum',
'invoice' => [
'zipcode' => '1234AB',
'house_number' => '12',
'street' => 'Street',
'city' => 'City',
'country_id' => '157',
'house_number_addition' => 'A',
],
'work' => [
'zipcode' => '1234AB',
'house_number' => '12',
'street' => 'Street',
'city' => 'City',
'country_id' => '157',
'house_number_addition' => 'A',
],
],
'contactPerson' => [
'error',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/clients'
payload = {
"client_number": 3,
"gender": "m-f",
"first_name": "John",
"last_name": "Doe",
"company_name": "John Doe",
"email": "example@service-planner.nl",
"mobile_phone": "0612345678",
"phone": "0612345678",
"address": {
"0": "voluptatum",
"invoice": {
"zipcode": "1234AB",
"house_number": "12",
"street": "Street",
"city": "City",
"country_id": "157",
"house_number_addition": "A"
},
"work": {
"zipcode": "1234AB",
"house_number": "12",
"street": "Street",
"city": "City",
"country_id": "157",
"house_number_addition": "A"
}
},
"contactPerson": [
"error"
]
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl --request POST \
"https://api.service-planner.nl/clients" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"client_number\": 3,
\"gender\": \"m-f\",
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"company_name\": \"John Doe\",
\"email\": \"example@service-planner.nl\",
\"mobile_phone\": \"0612345678\",
\"phone\": \"0612345678\",
\"address\": {
\"0\": \"voluptatum\",
\"invoice\": {
\"zipcode\": \"1234AB\",
\"house_number\": \"12\",
\"street\": \"Street\",
\"city\": \"City\",
\"country_id\": \"157\",
\"house_number_addition\": \"A\"
},
\"work\": {
\"zipcode\": \"1234AB\",
\"house_number\": \"12\",
\"street\": \"Street\",
\"city\": \"City\",
\"country_id\": \"157\",
\"house_number_addition\": \"A\"
}
},
\"contactPerson\": [
\"error\"
]
}"
const url = new URL(
"https://api.service-planner.nl/clients"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"client_number": 3,
"gender": "m-f",
"first_name": "John",
"last_name": "Doe",
"company_name": "John Doe",
"email": "example@service-planner.nl",
"mobile_phone": "0612345678",
"phone": "0612345678",
"address": {
"0": "voluptatum",
"invoice": {
"zipcode": "1234AB",
"house_number": "12",
"street": "Street",
"city": "City",
"country_id": "157",
"house_number_addition": "A"
},
"work": {
"zipcode": "1234AB",
"house_number": "12",
"street": "Street",
"city": "City",
"country_id": "157",
"house_number_addition": "A"
}
},
"contactPerson": [
"error"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
show
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/clients/75603',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/clients/75603'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/clients/75603" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/clients/75603"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 4,
"name": "Jessica Jones",
....,
"appointments": [ ...],
"addresses": [ ...],
"offers": [ ...],
"invoices": [ ...],
"addresses": [ ...],
}
Received response:
Request failed with error:
update
requires authentication
Middels deze functie is het mogelijk om een client up te daten
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.service-planner.nl/clients/75603',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'client_number' => 'aut',
'gender' => 'libero',
'first_name' => 'eos',
'last_name' => 'at',
'company_name' => 'est',
'email' => 'officiis',
'mobile_phone' => 'maiores',
'phone' => 'et',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/clients/75603'
payload = {
"client_number": "aut",
"gender": "libero",
"first_name": "eos",
"last_name": "at",
"company_name": "est",
"email": "officiis",
"mobile_phone": "maiores",
"phone": "et"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
curl --request PUT \
"https://api.service-planner.nl/clients/75603" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"client_number\": \"aut\",
\"gender\": \"libero\",
\"first_name\": \"eos\",
\"last_name\": \"at\",
\"company_name\": \"est\",
\"email\": \"officiis\",
\"mobile_phone\": \"maiores\",
\"phone\": \"et\"
}"
const url = new URL(
"https://api.service-planner.nl/clients/75603"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"client_number": "aut",
"gender": "libero",
"first_name": "eos",
"last_name": "at",
"company_name": "est",
"email": "officiis",
"mobile_phone": "maiores",
"phone": "et"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
delete
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.service-planner.nl/clients/75603',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/clients/75603'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
curl --request DELETE \
"https://api.service-planner.nl/clients/75603" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/clients/75603"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
list items
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/clients/75603/services',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/clients/75603/services'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/clients/75603/services" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/clients/75603/services"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
create item
requires authentication
Create a new item for the client. Example Attachments php: 'attachments[]'=> new CURLFILE('/C:/Users/XXXXX/Downloads/Checklist_5750-1.pdf')
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.service-planner.nl/clients/75603/services',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'address_id' => 19,
'name' => 'nljbpdcobxrxsbnktorrt',
'appointment_type_id' => 18,
'time' => 16,
'recurring' => false,
'plan_cycle' => 9,
'date_from' => '2024-05-14T17:44:40',
'date_to' => '2024-05-14T17:44:40',
'appointment_or_invite' => 'invite',
'attachments' => [
'ut',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/clients/75603/services'
payload = {
"address_id": 19,
"name": "nljbpdcobxrxsbnktorrt",
"appointment_type_id": 18,
"time": 16,
"recurring": false,
"plan_cycle": 9,
"date_from": "2024-05-14T17:44:40",
"date_to": "2024-05-14T17:44:40",
"appointment_or_invite": "invite",
"attachments": [
"ut"
]
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl --request POST \
"https://api.service-planner.nl/clients/75603/services" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"address_id\": 19,
\"name\": \"nljbpdcobxrxsbnktorrt\",
\"appointment_type_id\": 18,
\"time\": 16,
\"recurring\": false,
\"plan_cycle\": 9,
\"date_from\": \"2024-05-14T17:44:40\",
\"date_to\": \"2024-05-14T17:44:40\",
\"appointment_or_invite\": \"invite\",
\"attachments\": [
\"ut\"
]
}"
const url = new URL(
"https://api.service-planner.nl/clients/75603/services"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"address_id": 19,
"name": "nljbpdcobxrxsbnktorrt",
"appointment_type_id": 18,
"time": 16,
"recurring": false,
"plan_cycle": 9,
"date_from": "2024-05-14T17:44:40",
"date_to": "2024-05-14T17:44:40",
"appointment_or_invite": "invite",
"attachments": [
"ut"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
show item
requires authentication
Middels deze functie kunt u meer informatie over het item vinden van de client.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/clients/75603/services/22809',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/clients/75603/services/22809'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/clients/75603/services/22809" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/clients/75603/services/22809"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 258530,
"profitemp_id": null,
"client_id": 335816,
"company_id": 1411,
"item_category_id": null,
"address_id": 578863,
"name": "test",
"time": "60",
"appointment_type_id": 4789,
"user_id": 0,
"recurring": null,
"plan_cycle": "12",
"date_from": null,
"date_to": null,
"plan_next_date": null,
"reminders": null,
"contract": null,
"note": null,
"created_at": "2022-01-11T08:13:09.000000Z",
"updated_at": "2022-01-11T08:13:47.000000Z",
"deleted_at": null,
"comments": [
{
"id": 97382,
"service_id": 258530,
"user_id": 26502,
"description": "test",
"created_at": "2022-01-11T08:13:39.000000Z",
"updated_at": "2022-01-11T08:13:39.000000Z"
},
{
"id": 97383,
"service_id": 258530,
"user_id": 26502,
"description": "test",
"created_at": "2022-01-11T08:13:47.000000Z",
"updated_at": "2022-01-11T08:13:47.000000Z"
}
]
}
Received response:
Request failed with error:
update item
requires authentication
Create a new item for the client. Example Attachments php: 'attachments[]'=> new CURLFILE('/C:/Users/XXXXX/Downloads/Checklist_5750-1.pdf')
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.service-planner.nl/clients/75603/services/22809',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'address_id' => 9,
'name' => 'eonbyefbzizjtlvvknmoctdgwblahpduobtaiozucdrhtjuspxsrvdlkwboqybckinkxoodtljcylqmokkmvzpqdaoudjyhdueqfgmtyfccagsqg',
'appointment_type_id' => 4,
'time' => 20,
'recurring' => true,
'plan_cycle' => 11,
'date_from' => '2024-05-14T17:44:40',
'date_to' => '2024-05-14T17:44:40',
'appointment_or_invite' => 'appointment',
'attachments' => [
'eius',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/clients/75603/services/22809'
payload = {
"address_id": 9,
"name": "eonbyefbzizjtlvvknmoctdgwblahpduobtaiozucdrhtjuspxsrvdlkwboqybckinkxoodtljcylqmokkmvzpqdaoudjyhdueqfgmtyfccagsqg",
"appointment_type_id": 4,
"time": 20,
"recurring": true,
"plan_cycle": 11,
"date_from": "2024-05-14T17:44:40",
"date_to": "2024-05-14T17:44:40",
"appointment_or_invite": "appointment",
"attachments": [
"eius"
]
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
curl --request PUT \
"https://api.service-planner.nl/clients/75603/services/22809" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"address_id\": 9,
\"name\": \"eonbyefbzizjtlvvknmoctdgwblahpduobtaiozucdrhtjuspxsrvdlkwboqybckinkxoodtljcylqmokkmvzpqdaoudjyhdueqfgmtyfccagsqg\",
\"appointment_type_id\": 4,
\"time\": 20,
\"recurring\": true,
\"plan_cycle\": 11,
\"date_from\": \"2024-05-14T17:44:40\",
\"date_to\": \"2024-05-14T17:44:40\",
\"appointment_or_invite\": \"appointment\",
\"attachments\": [
\"eius\"
]
}"
const url = new URL(
"https://api.service-planner.nl/clients/75603/services/22809"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"address_id": 9,
"name": "eonbyefbzizjtlvvknmoctdgwblahpduobtaiozucdrhtjuspxsrvdlkwboqybckinkxoodtljcylqmokkmvzpqdaoudjyhdueqfgmtyfccagsqg",
"appointment_type_id": 4,
"time": 20,
"recurring": true,
"plan_cycle": 11,
"date_from": "2024-05-14T17:44:40",
"date_to": "2024-05-14T17:44:40",
"appointment_or_invite": "appointment",
"attachments": [
"eius"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Invoices
APIs for managing invoices
list
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/invoices',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'per_page'=> '20',
'page'=> '1',
'created_at'=> 'YYYY-MM-DD',
'updated_at'=> 'YYYY-MM-DD',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/invoices'
params = {
'per_page': '20',
'page': '1',
'created_at': 'YYYY-MM-DD',
'updated_at': 'YYYY-MM-DD',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/invoices?per_page=20&page=1&created_at=YYYY-MM-DD&updated_at=YYYY-MM-DD" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/invoices"
);
const params = {
"per_page": "20",
"page": "1",
"created_at": "YYYY-MM-DD",
"updated_at": "YYYY-MM-DD",
};
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: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
show
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/invoices/3475',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/invoices/3475'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/invoices/3475" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/invoices/3475"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Items
APIs for managing items
list
requires authentication
Middels deze functie kunt u een lijst met items ophalen.
Indien de next_page_url
aanwezig is zijn er meer pagina's met items. Items worden per 100 items teruggegeven.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/service',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
'per_page'=> '20',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/service'
params = {
'page': '1',
'per_page': '20',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/service?page=1&per_page=20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/service"
);
const params = {
"page": "1",
"per_page": "20",
};
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: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"current_page": 1,
"data": [
{
"id": 1,
"profitemp_id": null,
"company_id": 1,
"item_category_id": 2,
"address_id": "Dorpstraat",
"name": "Piano",
"time": 30,
"appointment_type_id": 1,
"user_id": 0,
"recurring": true,
"plan_cycle": 12,
"date_from": "2022-02-15",
"date_to": "2022-02-15",
"plan_next_date": "2022-02-23",
"reminders": "Stemmer meenemen",
"contract": null,
"appointment_or_invite":"invite"
"note": null,
}
],
"first_page_url": "https:\/\/service-planner-app.test\/api\/client?page=1",
"from": 1,
"next_page_url": "https:\/\/service-planner-app.test\/api\/client?page=2",
"path": "https:\/\/service-planner-app.test\/api\/client",
"per_page": 100,
"prev_page_url": null,
"to": 100
}
Received response:
Request failed with error:
delete
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.service-planner.nl/service/22809',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/service/22809'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
curl --request DELETE \
"https://api.service-planner.nl/service/22809" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/service/22809"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Users
APIs for managing users
list
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.service-planner.nl/user',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
'per_page'=> '20',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.service-planner.nl/user'
params = {
'page': '1',
'per_page': '20',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
curl --request GET \
--get "https://api.service-planner.nl/user?page=1&per_page=20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.service-planner.nl/user"
);
const params = {
"page": "1",
"per_page": "20",
};
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: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
Received response:
Request failed with error: