MENU navbar-image

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
}
 

Request      

GET address

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   number  optional  

the page number. Example: 1

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. Example: 20

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

Request      

POST address

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

client_id   integer   

The id of the client. Example: 7

street   string  optional  

Example: Dorpstraat

house_number   string  optional  

Example: 1

house_number_addition   string  optional  

Example: A

zipcode   string  optional  

Example: 6500AA

city   string  optional  

Example: Nijmegen

type   string   

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

geocode_lat   string  optional  

Example: 52.3599976

geocode_lng   string  optional  

Example: 4.8852188

country_id   integer   

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

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

Request      

GET address/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the address. Example: 34241

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

Request      

PUT address/{id}

PATCH address/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the address. Example: 34241

Body Parameters

client_id   integer   

The id of the client. Example 1 Example: 11

street   string  optional  

Example: Dorpstraat

house_number   string  optional  

Example: 1

house_number_addition   string  optional  

Example: A

zipcode   string  optional  

Example: 6500AA

city   string  optional  

Example: Nijmegen

type   string   

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

geocode_lat   string  optional  

Example: 52.3599976

geocode_lng   string  optional  

Example: 4.8852188

country_id   integer   

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

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"

Request      

DELETE address/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the address. Example: 34241

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

Request      

GET appointment/types

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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
}
 

Request      

GET appointment

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

the page number. Example: 1

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. Example: asc

Body Parameters

page   integer  optional  

Example: 8

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
}
 

Request      

POST appointment

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

appointment_type_id   integer   

The id of the appointment type. Example: 1

client_id   integer   

The id of the client. Example: 2

address_id   integer   

The id of the address. Example: 3

time   string   

The time of the appointment in minutes. Example: 60

send_mail_to_client   string   

Mail option. Available options are: never, direct or default. Example: default

plan_appointment   boolean  optional  

optional. Available options are: true, false default is true. Example: true

appointment_or_invite   optional.  optional  

Available options are: appointment, invite default is appointment. Example: appointment

services   integer[]  optional  

optional A list of services (items).

users   integer[]  optional  

optional A list of users (employees).

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

Request      

GET appointment/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the appointment. Example: 31778

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"

Request      

DELETE appointment/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the appointment. Example: 31778

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

Request      

GET clients

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

page number. Example: 1

per_page   integer  optional  

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

search   string  optional  

search for a client by name. Example: John Doe

client_number   string  optional  

search for a client by client number. Example: 123456789

sort   string  optional  

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

ordertype   string  optional  

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

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

Request      

POST clients

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

client_number   integer  optional  

A unique identifier of the client. Only numbers allowed Example: 7

gender   string  optional  

m, f, m-f, fam, afd. Example: m-f

first_name   string  optional  

The first name of the client. Example: John

last_name   string  optional  

The last name of the client. Example: Doe

company_name   string  optional  

The name of the company. Example: John Doe

email   string  optional  

The email of the client. Example: example@service-planner.nl

mobile_phone   string  optional  

The mobile phone of the client. Example: 0612345678

phone   string  optional  

The phone of the client. Example: 0612345678

address   string[]  optional  

The work/invoice address of the client.

invoice   object  optional  
zipcode   string  optional  

The zipcode of the invoice address. Example: 1234AB

house_number   string  optional  

The house number of the invoice address. Example: 12

street   string  optional  

The street of the invoice address. Example: Street

city   string  optional  

The city of the invoice address. Example: City

country_id   string  optional  

Use 157 for the Netherlands or 22 for Belgium. Example: 157

house_number_addition   string  optional  

The house number addition of the invoice address. Example: A

work   object  optional  
zipcode   string  optional  

The zipcode of the work address. Example: 1234AB

house_number   string  optional  

The house number of the work address. Example: 12

street   string  optional  

The street of the work address. Example: Street

city   string  optional  

The city of the work address. Example: City

country_id   string  optional  

Use 157 for the Netherlands or 22 for Belgium. Example: 157

house_number_addition   string  optional  

The house number addition of the work address. Example: A

contactPerson   string[]  optional  
name   string  optional  

The name of the contact person. Example: John Doe

email   string   

The email of the contact person.

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

Request      

GET clients/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the client. Example: voluptates

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

Request      

PUT clients/{id}

PATCH clients/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the client. Example: perferendis

Body Parameters

client_number   string  optional  

A unique identifier of the client. required Example: ab

gender   string  optional  

m, f, m-f, fam, afd Example: quisquam

first_name   string  optional  

Example: quia

last_name   string  optional  

Example: nemo

company_name   string  optional  

Example: reprehenderit

email   string  optional  

Example: jerry.bruen@example.net

mobile_phone   string  optional  

Example: at

phone   string  optional  

Example: totam

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"

Request      

DELETE clients/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the client. Example: minus

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

Request      

GET clients/{client}/services

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

client   string   

The client. Example: sint

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

Request      

POST clients/{client}/services

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

client   string   

The client. Example: eos

Body Parameters

address_id   integer   

The id of the address. Example: 17

name   string   

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

appointment_type_id   integer   

The id of the appointment type. Example: 2

time   integer   

Duration in minutes. Example: 15

recurring   boolean  optional  

Set to true to plan this item automatilcy. Example: true

plan_cycle   integer  optional  

Plan cycle in months. This field is required when recurring is 1. Example: 17

date_from   string  optional  

Start date for recurring planning. value moet een datum bevatten. Example: 2024-12-20T12:17:33

date_to   string  optional  

End date of recurring planning, can be null. value moet een datum bevatten. Example: 2024-12-20T12:17:33

appointment_or_invite   string  optional  

Example: appointment

Must be one of:
  • appointment
  • invite
attachments   object  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();
$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"
        }
    ]
}
 

Request      

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

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

client   string   

The client. Example: eos

service   string   

The service. Example: aut

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

Request      

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

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

client   string   

The client. Example: illum

service   string   

The service. Example: quod

Body Parameters

address_id   integer   

Example: 9

name   string   

value mag niet uit meer dan 255 tekens bestaan. Example: ughjmblfr

appointment_type_id   integer   

Example: 15

time   integer   

Example: 8

recurring   boolean  optional  

Example: true

plan_cycle   integer  optional  

This field is required when recurring is 1. Example: 19

date_from   string  optional  

value moet een datum bevatten. Example: 2024-12-20T12:17:33

date_to   string  optional  

value moet een datum bevatten. Example: 2024-12-20T12:17:33

appointment_or_invite   string  optional  

Example: invite

Must be one of:
  • appointment
  • invite

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" 

Request      

POST clients/{client}/services/{service}/attachments

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

client   string   

The client. Example: et

service   string   

The service. Example: consequatur

Body Parameters

delete_attachments   boolean  optional  

Example: false

attachments   file[]   

Must be a file. value mag niet meer dan 20000 kilobytes zijn.

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>
 

Request      

GET company-redirect/{page?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

page   string  optional  

Example: =sTE

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

Request      

GET /

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET invoices

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

per_page   integer  optional  

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

page   integer  optional  

page number. Example: 1

created_at   string  optional  

date. Example: YYYY-MM-DD

updated_at   string  optional  

date. Example: YYYY-MM-DD

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

Request      

GET invoices/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the invoice. Example: sint

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
}
 

Request      

GET service

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

the page number. Example: 1

per_page   integer  optional  

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

client_id   integer  optional  

show only items of this client.

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"

Request      

DELETE service/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the service. Example: aspernatur

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

Request      

GET user

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

the page number. Example: 1

per_page   integer  optional  

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