Introduction
Welcome to the ServicePlanner API documentation.
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.
You can retrieve your token by visiting your account -> Modules and Koppelingen and Generate API token.
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();
$url = 'https://api.service-planner.nl/address';
$response = $client->get(
$url,
[
'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));
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"
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:
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.
add
requires authentication
Middels deze functie is het mogelijk om een adres toe te voegen.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/address';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'client_id' => 7,
'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));
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\": 7,
\"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
}"
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.
show
requires authentication
Middels deze functie kunt u meer informatie over een adres ophalen.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/address/34241';
$response = $client->get(
$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 GET \
--get "https://api.service-planner.nl/address/34241" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/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:
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.
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();
$url = 'https://api.service-planner.nl/address/34241';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'client_id' => 11,
'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));
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\": 11,
\"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
}"
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
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/address/34241';
$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 \
"https://api.service-planner.nl/address/34241" \
--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.
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();
$url = 'https://api.service-planner.nl/appointment/types';
$response = $client->get(
$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 GET \
--get "https://api.service-planner.nl/appointment/types" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/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:
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.
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();
$url = 'https://api.service-planner.nl/appointment';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page' => '1',
'users[0]' => '1',
'users[1]' => '2',
'users[2]' => '3',
'appointment_type[0]' => '1',
'appointment_type[1]' => '2',
'ordertype' => 'asc',
],
'json' => [
'page' => 8,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api.service-planner.nl/appointment?page=1&users[]=1&users[]=2&users[]=3&appointment_type[]=1&appointment_type[]=2&ordertype=asc" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"page\": 8
}"
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:
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.
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();
$url = 'https://api.service-planner.nl/appointment';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'appointment_type_id' => 1,
'client_id' => 2,
'address_id' => 3,
'time' => '60',
'send_mail_to_client' => 'default',
'plan_appointment' => true,
'appointment_or_invite' => 'appointment',
'services' => [
1,
5,
1337,
],
'users' => [
2,
3,
1986,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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\": 1,
\"client_id\": 2,
\"address_id\": 3,
\"time\": \"60\",
\"send_mail_to_client\": \"default\",
\"plan_appointment\": true,
\"appointment_or_invite\": \"appointment\",
\"services\": [
1,
5,
1337
],
\"users\": [
2,
3,
1986
]
}"
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:
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.
show
requires authentication
Middels deze functie kunt u meer informatie over een afspraak ophalen.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/appointment/31778';
$response = $client->get(
$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 GET \
--get "https://api.service-planner.nl/appointment/31778" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/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:
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
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/appointment/31778';
$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 \
"https://api.service-planner.nl/appointment/31778" \
--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.
Clients
APIs for managing clients
list
requires authentication
Middels deze functie kunt u een lijst met klanten ophalen.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/clients';
$response = $client->get(
$url,
[
'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));
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"
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
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.
add
requires authentication
Middels deze functie is het mogelijk om een client toe te voegen.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/clients';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'client_number' => 7,
'gender' => 'm-f',
'first_name' => 'John',
'last_name' => 'Doe',
'company_name' => 'John Doe',
'email' => 'example@service-planner.nl',
'mobile_phone' => '0612345678',
'phone' => '0612345678',
'address' => [
'praesentium',
'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' => [
'blanditiis',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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\": 7,
\"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\": \"praesentium\",
\"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\": [
\"blanditiis\"
]
}"
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.
show
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/clients/voluptates';
$response = $client->get(
$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 GET \
--get "https://api.service-planner.nl/clients/voluptates" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
Example response (200):
{
"id": 4,
"name": "Jessica Jones",
....,
"appointments": [ ...],
"addresses": [ ...],
"offers": [ ...],
"invoices": [ ...],
"addresses": [ ...],
}
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
requires authentication
Middels deze functie is het mogelijk om een client up te daten
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/clients/perferendis';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'client_number' => 'ab',
'gender' => 'quisquam',
'first_name' => 'quia',
'last_name' => 'nemo',
'company_name' => 'reprehenderit',
'email' => 'jerry.bruen@example.net',
'mobile_phone' => 'at',
'phone' => 'totam',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
"https://api.service-planner.nl/clients/perferendis" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"client_number\": \"ab\",
\"gender\": \"quisquam\",
\"first_name\": \"quia\",
\"last_name\": \"nemo\",
\"company_name\": \"reprehenderit\",
\"email\": \"jerry.bruen@example.net\",
\"mobile_phone\": \"at\",
\"phone\": \"totam\"
}"
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
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/clients/minus';
$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 \
"https://api.service-planner.nl/clients/minus" \
--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.
list items
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/clients/sint/services';
$response = $client->get(
$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 GET \
--get "https://api.service-planner.nl/clients/sint/services" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
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.
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();
$url = 'https://api.service-planner.nl/clients/eos/services';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'address_id' => 17,
'name' => 'iwgxhuylmllpmzjozvn',
'appointment_type_id' => 2,
'time' => 15,
'recurring' => true,
'plan_cycle' => 17,
'date_from' => '2024-12-20T12:17:33',
'date_to' => '2024-12-20T12:17:33',
'appointment_or_invite' => 'appointment',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api.service-planner.nl/clients/eos/services" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"address_id\": 17,
\"name\": \"iwgxhuylmllpmzjozvn\",
\"appointment_type_id\": 2,
\"time\": 15,
\"recurring\": true,
\"plan_cycle\": 17,
\"date_from\": \"2024-12-20T12:17:33\",
\"date_to\": \"2024-12-20T12:17:33\",
\"appointment_or_invite\": \"appointment\"
}"
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.
show item
requires authentication
Middels deze functie kunt u meer informatie over het item vinden van de client.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/clients/eos/services/aut';
$response = $client->get(
$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 GET \
--get "https://api.service-planner.nl/clients/eos/services/aut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/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:
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 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();
$url = 'https://api.service-planner.nl/clients/illum/services/quod';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'address_id' => 9,
'name' => 'ughjmblfr',
'appointment_type_id' => 15,
'time' => 8,
'recurring' => true,
'plan_cycle' => 19,
'date_from' => '2024-12-20T12:17:33',
'date_to' => '2024-12-20T12:17:33',
'appointment_or_invite' => 'invite',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
"https://api.service-planner.nl/clients/illum/services/quod" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"address_id\": 9,
\"name\": \"ughjmblfr\",
\"appointment_type_id\": 15,
\"time\": 8,
\"recurring\": true,
\"plan_cycle\": 19,
\"date_from\": \"2024-12-20T12:17:33\",
\"date_to\": \"2024-12-20T12:17:33\",
\"appointment_or_invite\": \"invite\"
}"
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.
add attachments
requires authentication
Example Attachments php: 'attachments[]'=> new CURLFILE('/C:/Users/XXXXX/Downloads/Checklist_5750-1.pdf')
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/clients/et/services/consequatur/attachments';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'delete_attachments',
'contents' => ''
],
[
'name' => 'attachments[]',
'contents' => fopen('/tmp/phpsDjCBh', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api.service-planner.nl/clients/et/services/consequatur/attachments" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "delete_attachments="\
--form "attachments[]=@/tmp/phpsDjCBh"
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
GET company-redirect/{page?}
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/company-redirect/=sTE';
$response = $client->get(
$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 GET \
--get "https://api.service-planner.nl/company-redirect/=sTE" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
Example response (302):
Show headers
cache-control: no-cache, private
location: https://app.service-planner.nl/company-redirect/=sTE
content-type: text/html; charset=utf-8
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='https://app.service-planner.nl/company-redirect/=sTE'" />
<title>Redirecting to https://app.service-planner.nl/company-redirect/=sTE</title>
</head>
<body>
Redirecting to <a href="https://app.service-planner.nl/company-redirect/=sTE">https://app.service-planner.nl/company-redirect/=sTE</a>.
</body>
</html>
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.
GET /
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/';
$response = $client->get(
$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 GET \
--get "https://api.service-planner.nl/" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
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.
Invoices
APIs for managing invoices
list
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/invoices';
$response = $client->get(
$url,
[
'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));
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"
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
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.
show
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/invoices/sint';
$response = $client->get(
$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 GET \
--get "https://api.service-planner.nl/invoices/sint" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
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.
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();
$url = 'https://api.service-planner.nl/service';
$response = $client->get(
$url,
[
'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));
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"
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:
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
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/service/aspernatur';
$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 \
"https://api.service-planner.nl/service/aspernatur" \
--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
APIs for managing users
list
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.service-planner.nl/user';
$response = $client->get(
$url,
[
'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));
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"
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Unauthenticated."
}
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.