MENU navbar-image

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>
 

Request      

GET company-redirect/{page?}

URL Parameters

page  string optional  

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."
}
 

Request      

GET /

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
}
 

Request      

GET address

Query Parameters

page  number optional  

the page number.

client_id  number optional  

show only addresses of the client with this id.

per_page  integer optional  

number of results per page. Valid options are 20, 100, 200, 500, 1000.

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());

Request      

POST address

Body Parameters

client_id  integer  

The id of the client.

street  string optional  

house_number  string optional  

house_number_addition  string optional  

zipcode  string optional  

city  string optional  

type  string  

The type of the address. This is either invoice or work.

geocode_lat  string optional  

geocode_lng  string optional  

country_id  integer  

The id of the country. Use 157 for the Netherlands or 22 for Belgium.

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
 },
}
 

Request      

GET address/{id}

URL Parameters

id  integer  

The ID of the address.

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());

Request      

PUT address/{id}

PATCH address/{id}

URL Parameters

id  integer  

The ID of the address.

Body Parameters

client_id  integer  

The id of the client. Example 1

street  string optional  

house_number  string optional  

house_number_addition  string optional  

zipcode  string optional  

city  string optional  

type  string  

The type of the address. This is either invoice or work.

geocode_lat  string optional  

geocode_lng  string optional  

country_id  integer  

The id of the country. Use 157 for the Netherlands or 22 for Belgium.

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());

Request      

DELETE address/{id}

URL Parameters

id  integer  

The ID of the address.

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
},
]
 

Request      

GET appointment/types

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
}
 

Request      

GET appointment

Query Parameters

page  integer optional  

the page number.

users  integer[] optional  

a list with id's of the employees.

client_id  integer optional  

the id of a client.

appointment_type  integer[] optional  

appointment type id.

order  string optional  

The field for sorting appointments. Available options are id, appointment_type_id, time_from, time, client_id, address_id, status, updated_at, created_at.

ordertype  string optional  

Sorting by ascending or descending. Available options are asc and desc.

Body Parameters

page  integer optional  

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
}
 

Request      

POST appointment

Body Parameters

appointment_type_id  integer  

client_id  integer  

services  integer[] optional  

optional A list of services (items).

users  integer[] optional  

optional A list of users (employees).

address_id  integer  

time  integer  

The time in minutes.

send_mail_to_client  string  

Must be one of never, direct, or default.

plan_appointment  boolean optional  

appointment_or_invite  string optional  

Must be one of appointment or invite.

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": {}
}
 

Request      

GET appointment/{id}

URL Parameters

id  integer  

The ID of the appointment.

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());

Request      

DELETE appointment/{id}

URL Parameters

id  integer  

The ID of the appointment.

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."
}
 

Request      

GET clients

Query Parameters

page  integer optional  

page number.

per_page  integer optional  

number of results per page. Valid options are 20, 100, 200, 500, 1000.

search  string optional  

search for a client by name.

client_number  string optional  

search for a client by client number.

sort  string optional  

sort results by a field. Valid options are id, client_number, first_name, last_name, email, created_at, updated_at.

ordertype  string optional  

sort order. Valid options are asc, desc. Required if sort is set.

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());

Request      

POST clients

Body Parameters

client_number  integer optional  

A unique identifier of the client. Only numbers allowed

gender  string optional  

m, f, m-f, fam, afd.

first_name  string optional  

The first name of the client.

last_name  string optional  

The last name of the client.

company_name  string optional  

The name of the company.

email  string optional  

The email of the client.

mobile_phone  string optional  

The mobile phone of the client.

phone  string optional  

The phone of the client.

address  string[] optional  

The work/invoice address of the client.

address.invoice  object optional  

address.invoice.zipcode  string optional  

The zipcode of the invoice address.

address.invoice.house_number  string optional  

The house number of the invoice address.

address.invoice.street  string optional  

The street of the invoice address.

address.invoice.city  string optional  

The city of the invoice address.

address.invoice.country_id  string optional  

Use 157 for the Netherlands or 22 for Belgium.

address.invoice.house_number_addition  string optional  

The house number addition of the invoice address.

address.work  object optional  

address.work.zipcode  string optional  

The zipcode of the work address.

address.work.house_number  string optional  

The house number of the work address.

address.work.street  string optional  

The street of the work address.

address.work.city  string optional  

The city of the work address.

address.work.country_id  string optional  

Use 157 for the Netherlands or 22 for Belgium.

address.work.house_number_addition  string optional  

The house number addition of the work address.

contactPerson  string[] optional  

contactPerson.name  string optional  

The name of the contact person.

contactPerson.email  string  

The email of the contact person.

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": [ ...],
}
 

Request      

GET clients/{id}

URL Parameters

id  integer  

The ID of the client.

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());

Request      

PUT clients/{id}

PATCH clients/{id}

URL Parameters

id  integer  

The ID of the client.

Body Parameters

client_number  string optional  

A unique identifier of the client. required

gender  string optional  

m, f, m-f, fam, afd

first_name  string optional  

last_name  string optional  

company_name  string optional  

email  string optional  

mobile_phone  string optional  

phone  string optional  

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());

Request      

DELETE clients/{id}

URL Parameters

id  integer  

The ID of the client.

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."
}
 

Request      

GET clients/{client}/services

URL Parameters

client  integer  

The client.

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());

Request      

POST clients/{client}/services

URL Parameters

client  integer  

The client.

Body Parameters

address_id  integer  

The id of the address.

name  string  

The name of the item. value mag niet uit meer dan 255 tekens bestaan.

appointment_type_id  integer  

The id of the appointment type.

time  integer  

Duration in minutes.

recurring  boolean optional  

Set to true to plan this item automatilcy.

plan_cycle  integer optional  

Plan cycle in months. value is verplicht indien recurring gelijk is aan 1.

date_from  string optional  

Start date for recurring planning. value moet een datum bevatten.

date_to  string optional  

End date of recurring planning, can be null. value moet een datum bevatten.

appointment_or_invite  string optional  

Must be one of appointment or invite.

attachments  string[] optional  

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"
        }
    ]
}
 

Request      

GET clients/{client}/services/{service}

URL Parameters

client  integer  

The client.

service  integer  

The service.

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());

Request      

PUT clients/{client}/services/{service}

URL Parameters

client  integer  

The client.

service  integer  

The service.

Body Parameters

address_id  integer  

name  string  

value mag niet uit meer dan 255 tekens bestaan.

appointment_type_id  integer  

time  integer  

recurring  boolean optional  

plan_cycle  integer optional  

value is verplicht indien recurring gelijk is aan 1.

date_from  string optional  

value moet een datum bevatten.

date_to  string optional  

value moet een datum bevatten.

appointment_or_invite  string optional  

Must be one of appointment or invite.

attachments  string[] optional  

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."
}
 

Request      

GET invoices

Query Parameters

per_page  integer optional  

number of results per page. Valid options are 20, 100, 200, 500, 1000.

page  integer optional  

page number.

created_at  string optional  

date.

updated_at  string optional  

date.

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."
}
 

Request      

GET invoices/{id}

URL Parameters

id  integer  

The ID of the invoice.

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
}
 

Request      

GET service

Query Parameters

page  integer optional  

the page number.

per_page  integer optional  

number of results per page. Valid options are 20, 100, 200, 500, 1000.

client_id  integer optional  

show only items of this client.

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());

Request      

DELETE service/{id}

URL Parameters

id  integer  

The ID of the service.

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."
}
 

Request      

GET user

Query Parameters

page  integer optional  

the page number.

per_page  integer optional  

number of results per page. Valid options are 20, 100, 200, 500, 1000.