Planaday Public API URL

This documentation describes the calls available in the public API of planaday.

Overview

Last updated

See changelist at the end of this documentation!

API URL

Please replace apitest in the URL mentioned in the examples with your own company code. (as in apitest should be replaced with your prefix in your normal environment. i.e. https://myname.planaday.nl, apitest = myname)

Example URL

https://customer.api.planaday.nl/v1/booking/2

Notational Conventions

The keywords “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC2119.

Authentication

  • This API uses API Keys as configured in the main application (PAD) for authentication. Please read the support documentation for more information: Handleiding Publieke API.

  • Key MUST be provided in X-Api-Key header,

Example Header

X-Api-Key: 5113F6314DC7A397323EA383B0D65B39CD03FC9F77F30CDA6E0C9523543DF8B8

Consumer Identification

This API uses User-Agent headers to identify API consumer.

Example Headers

User-Agent: Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/_BuildID_) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36

HTTP Methods

This API uses HTTP verbs (methods) as following:

  • GET - Read - used to read (or retrieve) a representation of a resource,

  • POST - Create - used to create new resources. In particular, it’s used to create subordinate resources.

  • PUT - Update/Replace - used for update capabilities, PUT-ing to a known resource URI with the request body containing the newly-updated representation of the original resource. On successful request, replaces identified resource with the request body.

  • PATCH - Update/Modify - used for modify capabilities. The PATCH request only needs to contain the changes to the resource, not the complete resource.

  • DELETE - Delete - used to delete a resource identified by a URI.

Media Type

Where applicable this API MUST use the JSON media-type. Requests with a message-body are using plain JSON to set or update resource states.

Content-type: application/json & Accept: application/json headers SHOULD be set on all requests if not stated otherwise in the documentation.

Not sending the correct headers will result in an 415 Unsupported Media Type error from the server.

Example Headers

Content-type: application/json
Accept: application/json

Representation of Date and Time

All exchange of date and time-related data MUST be done according to ISO 8601 standard and stored in Europe/Amsterdam timezone.

  • When returning or sending date-related data YYYYMMDD format IS/MUST be used.

  • When returning or sending time-related related data HH:mm format IS/MUST be used.

Status Codes and Errors

This API uses HTTP status codes to communicate with the API consumer.

  • 200 OK - Response to a successful GET, PUT, PATCH or DELETE.

  • 201 Created - Response to a POST that results in a creation.

  • 204 No Content - Response to a successful request that won’t be returning a body (like a DELETE request).

  • 400 Bad Request - Malformed request; form validation errors.

  • 401 Unauthorized - When no or invalid authentication details are provided.

  • 403 Forbidden - When authentication succeeded but authenticated user doesn’t have access to the resource.

  • 404 Not Found - When a non-existent resource is requested.

  • 405 Method Not Allowed - Method not allowed.

  • 406 Not Acceptable - Could not satisfy the request Accept header.

  • 415 Unsupported Media Type - Unsupported media type in request.

  • 500 Server error - Something went realy wrong.

  • 503 Rate Limit Reached - Ratelimit reached, please try again later.

Ratelimiting

The API uses ratelimiting and shows the status about that in the response headers.

X-RateLimit-Limit: 720000
X-RateLimit-Remaining: 719999
X-RateLimit-Reset: 1610536876

The maximum amount of calls pers hours is shown in the X-RateLimit-Limit header. The calls remaining in the X-RateLimit-Remaining header. The last X-RateLimit header shows the reset timestamp

Pagination

Some of the responses will contain 2 special blocks:

  • meta

  • links

Meta

This block shows information about how many results there are (records), current(page), offset, limit per page and how many pages (total). The last one is based on your limit and offset.

"meta": {
  "page": {
    "current": 1,
    "offset": 1,
    "limit": 100,
    "total": 4
  },
  "records": 393
}
  • current: Current page shown of ‘total’

  • offset: Record of ‘records’ to start with showing

  • limit: Max amount of ‘record’ to fetch in one call

  • total: Total amount of pages of ‘limit’ records

  • records: Total amount of records found

Using offset

Example: with offset 200 will give the following answer (note the change in current and offset)

"meta": {
  "page": {
    "current": 3,
    "offset": 200,
    "limit": 100,
    "total": 4
  },
  "records": 393
}

Links

This block show the links to the current, first, next, previous and last page with records.

"links": {
    "self": "https://apitest.api.planaday.net/v1/course/1/dayparts?limit=20&offset=20",
    "first": "https://apitest.api.planaday.net/v1/course/1/dayparts?limit=20&offset=1",
    "last": "https://apitest.api.planaday.net/v1/course/1/dayparts?limit=20&offset=40",
    "next": "https://apitest.api.planaday.net/v1/course/1/dayparts?limit=20&offset=40",
    "previous": "https://apitest.api.planaday.net/v1/course/1/dayparts?limit=20&offset=1"
}

VAT codes

The following vat_codes can be returned in the API:

  • 0 = 0% vat (none)

  • 1 = 9% vat (low)

  • 2 = 21% vat (high)

Attribute blocks

Notice: Attributes block can only be used when a Planaday employee gives the rights to use this!

Attributes blocks are special block with settings that are configured in the application. They can be used to trigger sales in the websites, set special colors for course, but also to select a course language, select multiple options for a course, etc.

The attribute blocks can be found beneath:

  • Coursetemplates

  • Courses

  • Daypart beneath courses

The attribute block look like this:

"Attributes": [
  "Aanbieding": {
      "code": "{E27A0D46-AAF1-BDB8-A667-D3C0510F0A5E}",
      "values": [
          "ja": {
            "value": "50",
            "description": "display tekst"
          },
          "nee": {
            "value": "0",
            "description": "display tekst"
          }
      ],
      "is_required": false,
      "multiple_values_allowed": false,
      "is_financial": false
  }
]

code

This is the field we expect back in the booking (see the ‘booking’ documentation for examples)

values

This is a list of possible values for a field. This can contain 1 or more items.

The following structures are possible:

Both value and description are known:

"value 1": {
    "value": "50",
    "description": "Text #1"
}

Only value is known:

"value 2": {
    "value": "50",
    "description": null
}

Only description is known:

"value 3": {
    "value": null,
    "description": "description #1"
}

Both value/description are unknown:

"value 4": []

is_required

This will be true when the booking required this item to be posted! (see the ‘booking’ documentation for examples)

multiple_values_allowed

WHen this is true, multiple values can be posted in the booking (see the ‘booking’ documentation for examples)

is_financial

When an attribute involes a financial thing (i.e. an course option which has a price), the is_financial will be true and the vat and vat_code item will be included

The values will then look like:

"Attributes": [
  "Mogelijke opties": {
      "code": "{E27A0D46-AAF1-BDB8-A667-D3C0510F0A5E}",
      "values": [
          "EPT": {
            "value": null,
            "description": "Text #1"
          },
          "Heftruck": {
            "value": '25',
            "description": "Text #2"
          },
          "Reachtruck": {
            "value": '50',
            "description": null
          },
          "Anders": []
      ],
      "is_required": false,
      "multiple_values_allowed": false,
      "is_financial": false,
      "vat": 21,
      "vat_code": 2
  }
]

Booking

With the booking api you can create new course booking for students.

Booking

POST https://apitest.api.planaday.net/v1/booking/course_id
RequestsCreate booking for 2 studentCreate booking for a student with extra fieldsCreate booking for a student with attributes
Headers
Content-Type: application/json
X-Api-Key: <apikey>
Body
{
  "students": [
    {
      "id": 12312312,
      "gender": "m", // m, f, nvt, null
      "initials": "P.W.M.",
      "first_name": "Pieter",
      "nick_name": "Piet",
      "prefix": "van der",
      "last_name": "Pietersen",
      "email": "pieter@pietersen.nl",
      "address": "Straat",
      "house_number": "1",
      "house_number_extension": null,
      "postal_code": "2132PS",
      "city": "Hoofddorp",
      "country": "Nederland",
      "phonenumber": null,
      "date_of_birth": "20000101",
      "hometown": "maastricht",
      "country_of_birth": "Nederland",
      "employeeId": "ABR1234",
      "costcentercode": "700123",
      "company_position": "Scrum leader",
      "is_contact_person": true,
      "is_student": false,
      "internal_reference": "123445AA",
      "process_code95": false,
      "process_soob": false,
      "language": "NL",
      "stap_regulation": true,
    },
    {
      "id": 12312313,
      "gender": "f",
      "initials": "K.S",
      "first_name": "Klara",
      "last_name": "Pietersen",
      "maiden_name": "Delft",
      "email": "klara@pietersen.nl",
      "address": "Straat",
      "house_number": "1",
      "house_number_extension": null,
      "postal_code": "2132PS",
      "city": "Hoofddorp",
      "phonenumber": null,
      "date_of_birth": null,
      "employeeId": "ABR1235",
      "costcentercode": "700123",
      "company_position": "Scrum leader",
      "is_contact_person": false,
      "is_student": true,
      "internal_reference": "123445AA",
      "remark": "This is a remark",
      "stap_regulation": false,
    }
  ],
  "company": {
    "name": "Pietersen BV",
    "email": "klara@pietersen.nl",
    "address": "Straat",
    "house_number": "1",
    "house_number_extension": null,
    "postal_code": "2132PS",
    "city": "Hoofddorp",
    "phonenumber": null,
    "invoice_email": "facturatie@pietersen.nl",
    "Chamber_of_commerce": "AS1231231a",
    "invoice" : {
       "address": "Paalbergweg",
       "house_number": "134",
       "house_number_extension": null,
       "postal_code": "1111AA",
       "city": "Amsterdam",
       "country": "Nederland"
    },
    "mailing" : {
       "address": "Paalbergweg",
       "house_number": "133",
       "house_number_extension": "Zw",
       "postal_code": "1111AA",
       "city": "Amsterdam",
       "country": "Nederland"
    }
  },
  "created_at": "2017-12-17T22:50:27+00:00",
  "creating_source": "www.testsite.nl",
  "course_id": 2,
  "dayparts": [
    76,
    77,
    78,
    79
  ],
  "materials": [
    405,
    407
  ],
  "label": "Group1",
  "is_payed": true,
  "payment" : {
    "party": "ideal",
    "transaction_id": "1231ASSBBD12321"
  }
}
Responses200400400404
Headers
Content-Type: application/json
Body
{
  "result": "OK",
  "booking_id": "API5ce597c40e0fc6.85265205",
  "details": {
    "company": {
      "action": "resused",
      "id": 52,
      "name": "Pietersen BV"
    },
    "students": [
      {
        "action": "reused",
        "type": "employee",
        "id": 12312312,
        "name": "Pietersen, Pieter",
        "option_ids": [
          65,
          66,
          67,
          68
        ]
      },
      {
        "action": "reused",
        "type": "employee",
        "id": 12312313,
        "name": "Pietersen, Klara",
        "option_ids": [
          69,
          70,
          71,
          72
        ]
      }
    ]
  }
}
Headers
Content-Type: application/json
Body
{
  "error": 402,
  "message": "Missing students block"
}
Headers
Content-Type: application/json
Body
{
  "error": 425,
  "message": "attribute: unknown value given for attribute {1A811192-969F-323B-04C7-257C7BC6C897} : foo. Allowed: Reachtruck/ EPT"
}
Headers
Content-Type: application/json
Body
{
  "message": "Unavailable course selected"
}
Headers
Content-Type: application/json
X-Api-Key: <apikey>
Body
{
  "students": [
    {
      "id": 12312312,
      "gender": "m", // m, f, nvt, null
      "initials": "P.W.M.",
      "first_name": "Pieter",
      "last_name": "Pietersen",
      "email": "pieter@pietersen.nl",
      "address": "Straat",
      "house_number": "1",
      "house_number_extension": null,
      "postal_code": "2132PS",
      "city": "Hoofddorp",
      "country": "Nederland",
      "phonenumber": null,
      "date_of_birth": "20000101",
      "hometown": "maastricht",
      "country_of_birth": "Nederland",
      "employeeId": "ABR1234",
      "costcentercode": "700123",
      "company_position": "Scrum leader",
      "is_contact_person": true,
      "is_student": false,
      "internal_reference": "123445AA",
      "extrafields": [
        "51": "bhv|brand|ehbo",
        "201": "true",
        "52": "false",
        "49": "15"
      ],
      "process_code95": false,
      "process_soob": false,
      "language": "NL"
    }
  ],
  "company": {
    "name": "Pietersen BV",
    "email": "klara@pietersen.nl",
    "address": "Straat",
    "house_number": "1",
    "house_number_extension": null,
    "postal_code": "2132PS",
    "city": "Hoofddorp",
    "phonenumber": null,
    "invoice_email": "facturatie@pietersen.nl"
  },
  "created_at": "2017-12-17T22:50:27+00:00",
  "creating_source": "www.testsite.nl",
  "course_id": 2,
  "dayparts": [
    76,
    77,
    78,
    79
  ]
}
Responses200400400404
Headers
Content-Type: application/json
Body
{
  "result": "OK",
  "booking_id": "API5ce597c40e0fc6.85265205",
  "details": {
    "company": {
      "action": "resused",
      "id": 52,
      "name": "Pietersen BV"
    },
    "students": [
      {
        "action": "reused",
        "type": "employee",
        "id": 12312312,
        "name": "Pietersen, Pieter",
        "option_ids": [
          65,
          66,
          67,
          68
        ]
      },
      {
        "action": "reused",
        "type": "employee",
        "id": 12312313,
        "name": "Pietersen, Klara",
        "option_ids": [
          69,
          70,
          71,
          72
        ]
      }
    ]
  }
}
Headers
Content-Type: application/json
Body
{
  "error": 402,
  "message": "Missing students block"
}
Headers
Content-Type: application/json
Body
{
  "error": 425,
  "message": "attribute: unknown value given for attribute {1A811192-969F-323B-04C7-257C7BC6C897} : foo. Allowed: Reachtruck/ EPT"
}
Headers
Content-Type: application/json
Body
{
  "message": "Unavailable course selected"
}
Headers
Content-Type: application/json
X-Api-Key: <apikey>
Body
{
  "students": [
    {
      "id": 12312313,
      "gender": "f",
      "initials": "K.S",
      "first_name": "Klara",
      "last_name": "Pietersen",
      "email": "klara@pietersen.nl",
      "address": "Straat",
      "house_number": "1",
      "house_number_extension": null,
      "postal_code": "2132PS",
      "city": "Hoofddorp",
      "phonenumber": null,
      "date_of_birth": null,
      "employeeId": "ABR1235",
      "costcentercode": "700123",
      "company_position": "Scrum leader",
      "is_contact_person": false,
      "is_student": true,
      "internal_reference": "123445AA",
      "remark": "This is a remark"
    }
  ],
  "company": {
    "name": "Pietersen BV",
    "email": "klara@pietersen.nl",
    "address": "Straat",
    "house_number": "1",
    "house_number_extension": null,
    "postal_code": "2132PS",
    "city": "Hoofddorp",
    "phonenumber": null,
    "invoice_email": "facturatie@pietersen.nl"
  },
  "created_at": "2021-05-01T22:50:27+00:00",
  "creating_source": "www.testsite.nl",
  "course_id": 2,
  "dayparts": [
    76,
    77
  ],
  "attributes": [
    {
      "code": "{E27A0D46-AAF1-BDB8-A667-D3C0510F0A5EF",
      "values": [
        "foo",
        "bar"
      ]
    }
  ]
}
Responses200400400404
Headers
Content-Type: application/json
Body
{
  "result": "OK",
  "booking_id": "API5ce597c40e0fc6.85265205",
  "details": {
    "company": {
      "action": "resused",
      "id": 52,
      "name": "Pietersen BV"
    },
    "students": [
      {
        "action": "reused",
        "type": "employee",
        "id": 12312312,
        "name": "Pietersen, Pieter",
        "option_ids": [
          65,
          66,
          67,
          68
        ]
      },
      {
        "action": "reused",
        "type": "employee",
        "id": 12312313,
        "name": "Pietersen, Klara",
        "option_ids": [
          69,
          70,
          71,
          72
        ]
      }
    ]
  }
}
Headers
Content-Type: application/json
Body
{
  "error": 402,
  "message": "Missing students block"
}
Headers
Content-Type: application/json
Body
{
  "error": 425,
  "message": "attribute: unknown value given for attribute {1A811192-969F-323B-04C7-257C7BC6C897} : foo. Allowed: Reachtruck/ EPT"
}
Headers
Content-Type: application/json
Body
{
  "message": "Unavailable course selected"
}

Create booking
POST/booking/{course_id}

Use this call to create booking for optional company and one (1) or more students. These booking are visible in the application in the section: cursus->openstaande aanvragen (/cursus/aanvragen).

Student block

The students block is required and can contain one or more student objects.

The complete list of fields for each student object is listed in the request example. The following fields are required:

  • first_name

  • last_name

  • email (can be null)

  • phonenumber (can be null)

Possible gender values are:

  • ‘m’ (male)

  • ‘f’ (female)

  • ‘nvt’ (inapplicable) or ‘nr’ (not relevant)

  • ‘null’ value or ‘u’ (unkown)

  • no gender field = ‘u’

The language field is optional, but these are the possible language values:

  • ‘NL’ (dutch)

  • ‘ENG’ (english)

  • ‘FR’ (French)

  • ‘DU’ (German)

  • ‘PL’ (Polish)

  • No language field = ‘NL’

When an id is specified we will link the booking to this user known in Planaday. This field is optional.

The optional costcentercode field must contain a known code you defined in Planaday (beheer -> kostenplaats).

The optional fields block can contain ‘extra/custom’ fields as defined in the Planaday application. Please note that these combination are always in the format: “fieldname” : “value” (including the double quotes) (Deprecated, use extrafields from now, 2023-01-11)

The optional extrafields block can contain ‘extra fields’ as defined in the Planaday application. Please note that these combination are always in the format: “fieldid” : “value(s)” (including the double quotes) (Also the the call ‘/extrafields/get’ for a list of available extrafields)

"extrafields": {
"50": "invoice@example.com",
"51": "Financial person",
"52": "950123",
}

When multiple values are possible seperate them with a | (pipe character), like

"extrafields": {
"53": "bhv|brand|ehbo"
}

You can create contacts for a company by using the is_contact and is_student fields. When you make ‘is_contact’ true and ‘is_student’ false, only a contact will be added for the company.

You can add an optional internal reference to a student, wich will be copied from the booking to the real student. This field is called internal_reference.

Company block

The whole company block is optional. When it’s added the following fields are required:

  • name

  • address

  • house_number

  • postal_code

  • city

Within the company there are 2 other optionals blocks, withing these blocks all fields are optional!

Invoice information block

"invoice": {
  "email": "invoice@example.com",
  "addressee": "Financial person",
  "address": "Paalbergweg",
  "house_number": "134",
  "house_number_extension": null,
  "postal_code": "1111AA",
  "city": "Amsterdam",
  "country": "Nederland",
}

and mailing address information block

"mailing": {
  "address": "Paalbergweg",
  "house_number": "134",
  "house_number_extension": null,
  "postal_code": "1111AA",
  "city": "Amsterdam",
  "country": "Nederland",
}

When no company block is added, each student will be added as a private (particulier) student.

Dayparts block

The dayparts block is an optional list of dayparts ids that will be booked for the students. If the ‘dayparts’ block is an empty list then the students will be booked for all dayparts of the selected course.

Payment block

If the is_payed field is added and has the true value, the payment block is required!

This must contain the following fields

  • party

  • transaction_id

Attributes block

Notice: This block can only be used when a Planaday employee gives the rights to use this!

When dayparts or course has attributes that are required, the attributes block in the post is also required! The booking API gives as much information as possible when there are errors in the post.

When there are attributes required in a course/daypart it is NOT possible to send multiple students in the booking.

Attributes block always contains the following:

"attributes": [
    {
        "code": "{E27A0D46-AAF1-BDB8-A667-D3C0510F0A5EF",
        "values": [
            "foo"
        ]
    }
]

and when multiple items (in this case items with values) are allowed the value can contain:

"attributes": [
    {
        "code": "{E27A0D46-AAF1-BDB8-A667-D3C0510F0A5E}",
        "values": [
          "Foo",
          "Bar"
        ]
    }
]

General items

You can add an additional creating_source string which you can use to determine the source of the API request. (i.e. the url of the website which uses the API) This string will be visible in the Planaday application.

It is possible to label a booking with the optional label field. This field may contain a-z, A-Z, 0-9 and - (dash). No spaces or other character are allowed

Error codes

Code Message
400 Bad Request, 400: parameters missing: id
400 Bad Request, 401: unable to parse posted json
400 Bad Request, 402: missing students block
400 Bad Request, 403: students:gender missing, empty or invalid value (m/f/nvt/u/nr allowed)
400 Bad Request, 404: students:first_name missing or empty
400 Bad Request, 405: students:last_name missing or empty
400 Bad Request, 406: students:email contains invalid value ()
400 Bad Request, 407: course_id missing or not the same as url parameter
400 Bad Request, 408: company:name missing or empty
400 Bad Request, 409: company:address missing or empty
400 Bad Request, 410: company:house_number missing or empty
400 Bad Request, 411: company:postal_code missing or empty
400 Bad Request, 412: company:city missing or empty
400 Bad Request, 413: course selected without dayparts
400 Bad Request, 414: unknown course selected
400 Bad Request, 415: course selected without dayparts
400 Bad Request, 416: dayparts includes id not present in given course
400 Bad Request, 417: material includes id not present in given course
400 Bad Request, 418: payment block is missing
400 Bad Request, 419: attribute:attributes block is missing
400 Bad Request, 420: attribute:only 1 student allowed when attributes block is set
400 Bad Request, 421: attribute:code is missing
400 Bad Request, 422: attribute:value is missing
400 Bad Request, 423: attribute:unknown attribute code given for this course/daypart: {}. Allowed codes: [list]
400 Bad Request, 424: attribute:not all required attributes are posted. Missing attributes: [list]
400 Bad Request, 425: attribute:unkown value given for attribute {}: [value], Allowed values: [list]
400 Bad Request, 426: students:unknown language given (), allowed: [list]
400 Bad Request, 427: attribute:Attributes given, but none required/configured
400 Bad Request, 428: attribute:Multiple item given for attribute {}. Only 1 allowed
400 Bad Request, 429: attribute:Value required, but non given
400 Bad Request, 430: students:Bad date of birth given
400 Bad Request, 431: students:date of birth is required for STAP courses
400 Bad Request, 432: students:address is required for STAP courses
400 Bad Request, 433: students:house_number is required for STAP courses
400 Bad Request, 434: students:postal_code is required for STAP courses
400 Bad Request, 435: students:city is required for STAP courses
400 Bad Request, 436: Non STAP booking is not allowed on STAP only course
401 No Access Right
404 Course not found
URI Parameters
HideShow
course_id
number (required) 

ID of the Course to create booking for in the form of an integer


Booking payed

POST https://apitest.api.planaday.net/v1/booking/payed/booking_id
RequestsMark booking as payed
Headers
Content-Type: application/json
X-Api-Key: <apikey>
Body
{
  "is_payed": true,
  "payment": {
    "party": "ideal",
    "transaction_id": "1231ASSBBD12321"
  }
}
Responses200400404
Headers
Content-Type: application/json
Body
{
  "result": "OK",
  "bookingId": "API5ce597c40e0fc6.85265205"
}
Headers
Content-Type: application/json
Body
{
  "error": 401,
  "message": "Parameters missing: id"
}
Headers
Content-Type: application/json
Body
{
  "message": "Unavailable booking selected"
}

Mark booking as payed
POST/booking/payed/{booking_id}

Use this call to mark a booking as payed. This can be handy after handeling a payment callback.

If the ‘is_payed’ field is ‘true’, the ‘payment’ block is required!

Error codes

Code Message
400 Bad Request, 400: Parameters missing: booking_id
400 Bad Request, 401: Unable to parse posted json
400 Bad Request, 402: Missing payment block
400 Bad Request, 403: Missing party
400 Bad Request, 404: Missing transaction_id
404 Booking not found
URI Parameters
HideShow
booking_id
string (required) 

ID of the booking received in the booking post call (i.e API5ce597c40e0fc6.85265205)


Delete booking

DELETE https://apitest.api.planaday.net/v1/booking/booking_id
RequestsDelete bookingDelete booking using internal reference
Headers
Content-Type: application/json
X-Api-Key: <apikey>
Responses200400404
Headers
Content-Type: application/json
Body
{
  "result": "OK",
  "bookingId": "API5ce597c40e0fc6.85265205"
}
Headers
Content-Type: application/json
Body
{
  "error": 401,
  "message": "Parameters missing: bookingid"
}
Headers
Content-Type: application/json
Body
{
  "message": "Booking not found"
}
Headers
Content-Type: application/json
X-Api-Key: <apikey>
Body
{
  "internal_reference": "1234AA123",
  "deleting_source": "plusport",
  "reason": "Student is ill"
}
Responses200400404
Headers
Content-Type: application/json
Body
{
  "result": "OK",
  "bookingId": "API5ce597c40e0fc6.85265205"
}
Headers
Content-Type: application/json
Body
{
  "error": 401,
  "message": "We found some errors, please check"
  "errors": "No or invalid cancel information given"
}
Headers
Content-Type: application/json
Body
{
  "message": "Booking not found"
}

Delete made booking
DELETE/booking/{booking_id}

Use this call to delete an earlier made booking.

First we try with the {booking_id}. This works when the the booking isn’t converted to a planned student yet! When the booking is already converted we will make a cancel request in the backoffice.

When the booking_id isn’t found, we do a second attempt using the 3 fields.

When no booking is found at all we throw an error.

When available the ‘reason’ field will be added in the notes.

Error codes

Code Message
400 Bad Request, 400: Parameters missing: bookingid
400 Bad Request, 401: Unkown bookingid and no or invalid cancel information given
400 Bad Request, 402: Missing or empty internal_reference
400 Bad Request, 403: Missing or empty deleting_source
400 Bad Request, 404: Missing or empty reason
404 Booking not found
URI Parameters
HideShow
booking_id
string (required) 

ID of the booking received in the booking post call (i.e API5ce597c40e0fc6.85265205)


Course

With the course api you can fetch information about a course.

Course list

GET https://apitest.api.planaday.net/v1/course/list?start=start&end=end&templateid=templateid&offset=offset&limit=limit&label=label
RequestsNormal answerAnswer with freefield
Headers
X-Api-Key: <apikey>
Responses200
Headers
Content-Type: application/json
Body
{
  "meta": {
    "page": {
      "offset": 0,
      "limit": 30,
      "total": 1
    },
    "records": 2
  },
  "data": [
    {
      "id": 1,
      "code": "d52-201710-001",
      "name": "Gereedschap verkleinen",
      "description": null,
      "type": "open",
      "status": "active",
      "daypart_amount": 1,
      "dayparts": [
        {
          "id": 3,
          "href": "https://apitest.api.planaday.nl/v1/daypart/3",
          "visible": true
        }
      ],
      "users": {
        "min": 7,
        "max": 14,
        "available": 11,
        "options": 1
      },
      "costs": {
        "user": 321,
        "course": 2884,
        "vat": 21,
        "vat_code": 2,
        "remark": null
      },
      "coursetemplate": {
        "id": 123,
        "href": "https://apitest.api.planaday.nl/v1/coursetemplate/123"
      },
      "start_guaranteed": 0,
      "moneyback_guaranteed": 1,
      "has_elearning": 1,
      "has_code95": 1,
      "has_soob": 0,
      "has_stap": 0,
      "stap_only": 0,
      "href": "https://apitest.api.planaday.nl/v1/course/1",
      "labels": [
        "EHBO",
        "BHV"
      ],
      "attributes": {
          "Take exam": {
              "code": "{182BF814-FAA4-1C3C-941A-FCD180A78033}",
              "values": [
                  "ja": {
                    "value": "50",
                    "description": "display tekst"
                  },
                  "nee": {
                    "value": "0",
                    "description": "display tekst"
                  }
              ],
              "is_required": true,
              "multiple_values_allowed": false,
              "is_financial": true,
              "vat": 21,
              "vat_code": 2
          }
      },
      "language": "NL"
    },
    {
      "id": 2,
      "code": "986-201710-003",
      "name": "Fiets slopen",
      "description": null,
      "type": "open",
      "status": "concept",
      "daypart_amount": 1,
      "dayparts": [
        {
          "id": 2,
          "href": "https://apitest.api.planaday.nl/v1/daypart/2",
          "visible": false
        }
      ],
      "users": {
        "min": 5,
        "max": 12,
        "available": 9,
        "options": 2
      },
      "costs": {
        "user": 109,
        "course": 3482,
        "vat": 21,
        "vat_code": 2,
        "remark": null
      },
      "coursetemplate": {
        "id": 124,
        "href": "https://apitest.api.planaday.nl/v1/coursetemplate/124"
      },
      "start_guaranteed": 0,
      "moneyback_guaranteed": 1,
      "has_elearning": 0,
      "has_code95": 0,
      "has_soob": 0,
      "has_stap": 1,
      "stap_only": 1,
      "href": "https://apitest.api.planaday.nl/v1/course/2",
      "labels": [
        "CODE95"
      ],
      "attributes": [],
      "language": "NL"
    }
  ],
  "links": {
    "self": "https://apitest.api.planaday.nl/v1/course/list?start=20171101&end=20171101&offset=1",
    "first": "https://apitest.api.planaday.nl/v1/course/list?start=20171101&end=20171101&offset=1",
    "last": "https://apitest.api.planaday.nl/v1/course/list?start=20171101&end=20171101&offset=10",
    "previous": "",
    "next": "https://apitest.api.planaday.nl/v1/course/list?start=20171101&end=20171101&offset=10"
  }
}
Headers
X-Api-Key: <apikey>
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "href": "http://apitest.api.planaday.localhost/v1/course/1",
  "code": "96a-202108-001",
  "name": "EAD en reanimatie",
  "description": "",
  "type": "open",
  "status": "concept",
  "daypart_amount": 0,
  "dayparts": [],
  "users": {
    "min": 6,
    "max": 15,
    "available": 15,
    "options": 0
  },
  "costs": {
    "user": 387,
    "course": 2469,
    "vat": 21,
    "vat_code": 2,
    "remark": ""
  },
  "coursetemplate": {
    "id": 1,
    "href": "http://apitest.api.planaday.localhost/v1/coursetemplate/1"
  },
  "level": "Advanced",
  "level_description": "",
  "start_guaranteed": false,
  "moneyback_guaranteed": false,
  "has_elearning": false,
  "has_code95": false,
  "has_soob": false,
  "has_stap": false,
  "stap_only": false,
  "labels": [],
  "language": "NL",
  "extrafields": {
    "Startdatum": "23-08-2021"
  },
  "repeating_courses": [
    {
      "id": null,
      "href": null
    }
  ]
}

Get a list of courses
GET/course/list?start={start}&end={end}&templateid={templateid}&offset={offset}&limit={limit}&label={label}

Use this call to get a list of courses. You can use the optional parameter templateid to limit your search to courses belonging to one course. Or add the optional parameter label to filter on labels connected to the course.

label

The label parameter can contain 1 label to select courses that matches 1 label

&label=BHV

or a list of labels seperated by , (comma) to select courses that matches ALL labels:

&label=BHV,LOGISTIEK

Error codes

Code Message
400 Bad Request
401 No Access Right
404 Course not found
URI Parameters
HideShow
start
date (required) 

Start date of planned courses to look for (YYYYMMDD)

end
date (required) 

End date of planned courses to look for (YYYYMMDD)

templateid
number (optional) 

ID of the Coursetemplate to find courses for

offset
number (optional) 

Start offset of courses to show (i.e. 25)

limit
number (optional) 

Amount of courses to show in one response (i.e. 25, limited to 100)

label
string (optional) 

labels which the course MUST have (see also label API calls)


Get Course

GET https://apitest.api.planaday.net/v1/course/course_id
Requestsexample 1
Headers
X-Api-Key: <apikey>
Responses200
Headers
Content-Type: application/json
Body
{
    "id": 8,
    "code": "Test-01/10",
    "name": "Test cursus",
    "description": "Dit is een test cursus",
    "type": "open",
    "status": "active",
    "daypart_amount": 2,
    "dayparts" : [
       {
           "id" : 1,
           "href": "https://apitest.api.planaday.nl/v1/daypart/1",
           "labels": [
               "CODE95"
           ],
           "visible": true,
           "status": "option",
           "attributes": {
             "Aanbieding": {
               "code": "{E27A0D46-AAF1-BDB8-A667-D3C0510F0A5E}",
               "values": [
                 "ja": {
                    "value": "50",
                    "description": "display tekst"
                  }
               ],
               "is_required": false,
               "multiple_values_allowed": false,
               "is_financial": true,
               "vat": 21,
               "vat_code": 2
             },
           }
       },
       {
           "id" : 2,
           "href": "https://apitest.api.planaday.nl/v1/daypart/2",
           "labels": [
               "EHBO",
               "BHV"
           ],
           "visible": true,
           "status": "concept"
       }
    ],
    "users": {
       "min": 5,
       "max": 10,
       "available": 7,
       "options": 2
    },
    "costs": {
       "user": 1299,
       "course": 4500,
       "vat": 21,
       "remark": null
    },
    "coursetemplate": {
      "id": 123,
      "href": "https://apitest.api.planaday.nl/v1/coursetemplate/123"
    },
    "level": "Advanced",
    "level_description": "Higher level course",
    "start_guaranteed": 0,
    "moneyback_guaranteed": 1,
    "has_elearning": 1,
    "has_code95": 1,
    "code95" : {
        "practice": 12,
        "theory": 5
    },
    "has_soob": 0,
    "has_stap": false,
    "stap_only": false,
    "href": "https://apitest.api.planaday.nl/v1/course/1",
    "labels": [
      "CODE95"
    ],
    "attributes": {
      "Aanbieding": {
          "code": "{E27A0D46-AAF1-BDB8-A667-D3C0510F0A5E}",
          "values": [
              "ja": {
                "value": "50",
                "description": "display tekst"
              }
          ],
          "is_required": false,
          "multiple_values_allowed": false,
          "is_financial": false
      },
      "Taal": {
          "code": "{B299A824-1174-9501-70B0-1F505B50E18F}",
          "values": [
              "nl": {
                "value": null,
                "description": "display tekst"
              },
              "eng": {
                "value": '25',
                "description": "Engels"
              },
              "du": [],
              "pl": {
                "value": '50',
                "description": null
              }
          ],
          "is_required": true,
          "multiple_values_allowed": false,
          "is_financial": true,
          "vat": 21,
          "vat_code": 2
      }
    },
    "recurrence": [
        {
            "id": 1,
            "period": 14,
            "unit": "maanden",
            "is_required": true,
            "href": "http://development.api.planaday.localhost/v1/coursetemplate/1"
        },
        {
            "id": 1,
            "period": 23,
            "unit": "maanden",
            "is_required": true,
            "href": "http://development.api.planaday.localhost/v1/coursetemplate/1"
        }
    ],
    "language": "NL",
}

View Course Detail
GET/course/{course_id}

Use this call to fetch detailed information about one (1) course

Error codes

Code Message
401 No Access Right
404 Course not found
URI Parameters
HideShow
course_id
number (required) 

ID of the Course in the form of an integer


Course dayparts

GET https://apitest.api.planaday.net/v1/course/course_id/dayparts&offset=offset&limit=limit
Responses200
Headers
Content-Type: application/json
Body
{
    "meta": {
       "page": {
           "offset": 1,
           "limit": 2,
           "total": 1
       }
    },
    "data": [
       {
           "id" : 1,
           "name": "Dagdeel 1",
           "description": "",
           "status": "active",
           "date": "20160301",
           "start_time": "09:00",
           "end_time": "17:00",
           "is_elearning": 0,
           "visible": true,
           "instructors": {
               "id": 1,
               "href": "https://apitest.api.planaday.nl/v1/instructor/1"
           },
           "users": {
               "scheduled": 10,
               "options": 0,
               "waitinglist": 2
           },
           "locations": [
               "id": 1,
               "href": "https://apitest.api.planaday.nl/v1/location/1"
           ],
           "costs": {
               "user": "0",
               "vat": "0"
           },
           "has_code95": 1,
           "code95" : {
               "practice": 12,
               "theory": 5
           },
           "labels": [
               "CODE95"
           ],
           "attributes": {
              "Take exam": {
                  "code": "{182BF814-FAA4-1C3C-941A-FCD180A78033}",
                  "values": [
                      "ja": {
                        "value": "50",
                        "description": "display tekst"
                      },
                      "nee": {
                        "value": "0",
                        "description": "display tekst"
                      }
                  ],
                  "is_required": true,
                  "multiple_values_allowed": false,
                  "is_financial": true,
                  "vat": 21,
                  "vat_code": 2
             }
           },
           "href": "https://apitest.api.planaday.nl/v1/daypart/1"
       },
       {
           "id" : 2,
           "name": "Dagdeel 2: elearning",
           "description": "",
           "status": "active",
           "date": "20200901",
           "start_time": "09:00",
           "end_time": "17:00",
           "is_elearning": 1,
           "visible": true,
           "date_finish_before": "20210901",
           "instructors": {
               "id": 1,
               "href": "https://apitest.api.planaday.nl/v1/instructor/1"
           },
           "users": {
               "scheduled": 10,
               "options": 0,
               "waitinglist": 2
           },
           "locations": [
               "id": 2,
               "href": "https://apitest.api.planaday.nl/v1/location/2"
           ],
           "costs": {
               "user": "0",
               "vat": "0",
               "vat_code": 0
           },
           "has_code95": 0,
           "is_elearning": 1,
           "labels": [
               "EHBO",
               "BHV"
           ],
           "href": "https://apitest.api.planaday.nl/v1/daypart/2"
       }
    ],
    "links": {
           "self": "https://apitest.api.planaday.net/v1/course/1/dayparts?limit=20&offset=20",
           "first": "https://apitest.api.planaday.net/v1/course/1/dayparts?limit=20&offset=1",
           "last": "https://apitest.api.planaday.net/v1/course/1/dayparts?limit=20&offset=40",
           "next": "https://apitest.api.planaday.net/v1/course/1/dayparts?limit=20&offset=40",
           "previous": "https://apitest.api.planaday.net/v1/course/1/dayparts?limit=20&offset=1"
    }
}

View list of dayparts of Course
GET/course/{course_id}/dayparts&offset={offset}&limit={limit}

Use this call to fetch detailed information the dayparts of one (1) course

Error codes

Code Message
401 No Access Right
404 Course not found
URI Parameters
HideShow
course_id
number (required) 

ID of the Course in the form of an integer

offset
number (optional) 

Start offset of dayparts to show (i.e. 25)

limit
number (optional) 

Amount of dayparts to show in one response (i.e. 25, limited to 100)


Course materials

GET https://apitest.api.planaday.net/v1/course/course_id/materials&offset=offset&limit=limit&label=
Responses200
Headers
Content-Type: application/json
Body
{
  "meta": {
    "page": {
      "offset": 1,
      "limit": 20,
      "total": 2
    }
  },
  "data": [
    {
      "id": 450,
      "code": "b997b",
      "name": "Brandblusser stift",
      "description": "",
      "selling_price": 125
    },
    {
      "id": 450,
      "code": "0460d",
      "name": "Verband schrift",
      "description": "",
      "selling_price": 88,
      "vat": 21,
      "vat_code": 2
    }
  ],
  "links": {
    "self": "https://apitest.api.planaday.net/v1/course/1/materials?limit=20&offset=20",
    "first": "https://apitest.api.planaday.net/v1/course/1/materials?limit=20&offset=1",
    "last": "https://apitest.api.planaday.net/v1/course/1/materials?limit=20&offset=40",
    "next": "https://apitest.api.planaday.net/v1/course/1/materials?limit=20&offset=40",
    "previous": "https://apitest.api.planaday.net/v1/course/1/materials?limit=20&offset=1"
  }
}

View list of materials of Course
GET/course/{course_id}/materials&offset={offset}&limit={limit}&label=

Use this call to fetch the materials of one (1) course

Error codes

Code Message
401 No Access Right
404 Course not found
URI Parameters
HideShow
course_id
number (required) 

ID of the Course in the form of an integer

offset
number (optional) 

Start offset of materials to show (i.e. 25)

limit
number (optional) 

Amount of materials to show in one response (i.e. 25, limited to 100)


Course images

GET https://apitest.api.planaday.net/v1/course/course_id/images&offset=offset&limit=limit
Responses200
Headers
Content-Type: application/json
Body
{
    "meta": {
       "page": {
           "current": 1,
           "offset": 1,
           "limit": 20,
           "total": 1
       }
       "records": 1
    },
    "data": [
       {
           "id": 1,
           "name": "rookworst",
           "description": "",
           "href": ""https://apitest.api.planaday.net/v1/image/26S96G?crc=1b26f92dd44d7bea4e109f569447c4a2"
       }
    ],
    "links": {
           "self": "https://apitest.api.planaday.net/v1/course/1/materials?limit=20&offset=20",
           "first": "https://apitest.api.planaday.net/v1/course/1/materials?limit=20&offset=1",
           "last": "https://apitest.api.planaday.net/v1/course/1/materials?limit=20&offset=40",
           "next": "https://apitest.api.planaday.net/v1/course/1/materials?limit=20&offset=40",
           "previous": "https://apitest.api.planaday.net/v1/course/1/materials?limit=20&offset=1"
    }
}

View list of images of Course
GET/course/{course_id}/images&offset={offset}&limit={limit}

Use this call to fetch the images of one (1) course

Error codes

Code Message
401 No Access Right
404 Course not found
URI Parameters
HideShow
course_id
number (required) 

ID of the Course in the form of an integer

offset
number (optional) 

Start offset of materials to show (i.e. 25)

limit
number (optional) 

Amount of materials to show in one response (i.e. 25, limited to 100)


Coursetemplate

With the coursetemplate api you can fetch information about a coursetemplate.

List Coursetemplates

GET https://apitest.api.planaday.net/v1/coursetemplate/list
Requestsexample 1
Headers
X-Api-Key: <apikey>
Responses200
Headers
Content-Type: application/json
Body
{
  "coursetemplates": [
    {
      "id": 1,
      "code": "a5f-#Y#M-#3C",
      "name": "Achterdeur maken",
      "description": null,
      "daypart_amount": 1,
      "has_elearning": true,
      "has_code95": false,
      "has_soob": false,
      "has_stap": false,
      "stap_only": false,
      "labels": [
        "CODE95"
      ],
      "language": "NL",
      "href": "https://apitest.api.planaday.nl/v1/coursetemplate/1"
    },
    {
      "id": 2,
      "code": "b44-#Y#M-#3C",
      "name": "Band repareren",
      "description": null,
      "daypart_amount": 3,
      "has_elearning": false,
      "has_code95": false,
      "has_soob": false,
      "has_stap": false,
      "stap_only": false,
      "labels": [
        "EHBO",
        "BHV"
      ],
      "language": "NL",
      "href": "https://apitest.api.planaday.nl/v1/coursetemplate/2"
    }
}

Get list of Coursetemplates
GET/coursetemplate/list

Use this call to get a list of coursetemplates. Only coursetemplates with 1 or more dayparts are returned.

Error codes

Code Message
400 Bad Request
401 No Access Right

Get Coursetemplate

GET https://apitest.api.planaday.net/v1/coursetemplate/coursetemplate_id
Requestsexample 1
Headers
X-Api-Key: <apikey>
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "href": "https://apitest.api.planaday.nl/v1/coursetemplate/1",
  "code": "511-#Y#M-#3C",
  "name": "Televisie opkopen",
  "description": null,
  "daypart_amount": 2,
  "dayparts": [
    {
      "id": 2,
      "href": "https://apitest.api.planaday.nl/v1/daypart/2"
    },
    {
      "id": 1,
      "href": "https://apitest.api.planaday.nl/v1/daypart/1"
    }
  ],
  "users": {
    "min": 5,
    "max": 12
  },
  "costs": {
    "user": 384,
    "course": 3179,
    "vat": 21,
    "vat_code": 2,
    "remark": null
  },
  "level": "Advanced",
  "has_elearning": 1,
  "has_code95": false,
  "has_soob": false,
  "has_stap": false,
  "stap_only": false,
  "labels": [
      "EHBO",
      "CODE95"
  ],
  "attributes": {
    "Take exam": {
      "code": "{182BF814-FAA4-1C3C-941A-FCD180A78033}",
      "values": [
          "ja": {
            "value": "50",
            "description": "display tekst"
          },
          "nee": {
            "value": "0",
            "description": "display tekst"
          }
      ],
      "is_required": true,
      "multiple_values_allowed": false,
      "is_financial": true,
      "vat": 21,
      "vat_code": 2
    }
  },
  "language": "NL"
}

View Coursetemplate Detail
GET/coursetemplate/{coursetemplate_id}

Use this call to fetch detailed information about one (1) coursetemplate.

Error codes

Code Message
400 Bad Request
401 No Access Right
404 Coursetemplate not found
URI Parameters
HideShow
coursetemplate_id
number (required) 

ID of the Location in the form of an integer


Daypart

With the daypart api you can fetch information about dayparts.

Get Daypart

GET https://apitest.api.planaday.net/v1/daypart/daypart_id
Requestsexample 1
Headers
X-Api-Key: <apikey>
Responses200
Headers
Content-Type: application/json
Body
{
  "href": "https://apitest.api.planaday.nl/v1/daypart/1",
  "id": 1,
  "code": null,
  "name": "Dagdeel #0",
  "description": null,
  "status": "concept",
  "date": "20200710",
  "date_finish_before": "20210710",
  "start_time": "12:30",
  "end_time": "17:00",
  "locations": [],
  "instructors": [
    "id": 1,
    "href": "https://apitest.api.planaday.nl/v1/instructor/1"
  ],
  "users": {
    "scheduled": 0,
    "options": 0,
    "waitinglist": 0
  },
  "costs": {
    "user": null,
    "vat": 21,
    "vat_code": 2
  },
  "has_code95": 1,
  "code95" : {
      "practice": 12,
      "theory": 5
  },
  "is_elearning": 1,
  "visible": true,
  "labels": [
      "CODE95"
  ],
  "attributes": {
    "Take exam": {
        "code": "{182BF814-FAA4-1C3C-941A-FCD180A78033}",
        "values": [
            "ja": {
              "value": "50",
              "description": "display tekst"
            },
            "nee": {
              "value": "0",
              "description": "display tekst"
            }
        ],
        "is_required": true,
        "multiple_values_allowed": false,
        "is_financial": true,
        "vat": 21,
        "vat_code": 2
    }
  }
}

View Daypart Detail
GET/daypart/{daypart_id}

Use this call to fetch detailed information about one (1) daypart.

Error codes

Code Message
400 Bad Request
401 No Access Right
404 Daypart not found
URI Parameters
HideShow
daypart_id
number (required) 

ID of the Daypart in the form of an integer


Daypart materials

GET https://apitest.api.planaday.net/v1/daypart/daypart_id/materials&offset=offset&limit=limit&label=
Responses200
Headers
Content-Type: application/json
Body
{
  "meta": {
    "page": {
      "offset": 0,
      "limit": 20,
      "total": 1
    }
  },
  "data": [
    {
      "id": 450,
      "code": "b997b",
      "name": "Brandblusser stift",
      "description": "",
      "selling_price": 125,
      "vat": 21,
      "vat_code": 2
    }
  ],
  "links": {
    "self": "https://apitest.api.planaday.net/v1/daypart/1/materials?limit=20&offset=20",
    "first": "https://apitest.api.planaday.net/v1/daypart/1/materials?limit=20&offset=1",
    "last": "https://apitest.api.planaday.net/v1/daypart/1/materials?limit=20&offset=40",
    "next": "https://apitest.api.planaday.net/v1/daypart/1/materials?limit=20&offset=40",
    "previous": "https://apitest.api.planaday.net/v1/daypart/1/materials?limit=20&offset=1"
  }
}

View list of materials of a Daypart
GET/daypart/{daypart_id}/materials&offset={offset}&limit={limit}&label=

Use this call to fetch the materials of one (1) daypart

Error codes

Code Message
401 No Access Right
404 Daypart not found
URI Parameters
HideShow
daypart_id
number (required) 

ID of the Daypart in the form of an integer

offset
number (optional) 

Start offset of materials to show (i.e. 25)

limit
number (optional) 

Amount of materials to show in one response (i.e. 25, limited to 100)


Extrafields

With the extrafields api you can fetch information about extrafields connected to an entity.

Possible types

The following types can be returned:

  • textfield

  • textarea

  • datefield

  • checkbox

  • radiobutton

  • select

Extrafields list

GET https://apitest.api.planaday.net/v1/extrafields/list
Requestsexample 1
Headers
X-Api-Key: <apikey>
+: X-Api-Key: <apikey>Response 200 (application/json)
Responses

Get a list of extrafields
GET/extrafields/list

Use this call to get a list of extrafields per category.

Error codes

Code Message
400 Bad Request
401 No Access Right

Image

With the image api you can fetch image blobs from courses.

Get Image

GET https://apitest.api.planaday.net/v1/image/image_id
Requestsexample 1
Headers
X-Api-Key: <apikey>
Responses200
Headers
Content-Type: application/[imagetype]
Body
image blob

Get image blob
GET/image/{image_id}

Use this call to fetch the image blob.

Error codes

Code Message
400 Bad Request
401 No Access Right
404 Image not found
URI Parameters
HideShow
image_id
string (required) 

ID of the Iamge in the form of an string


Instructor

With the instructor api you can fetch information about instructors and add/remove an instructor to/from a daypart

Get Instructor [instructor/{instructor_id}]

  • Parameters
    • instructor_id (required, number) - ID of the instructor in the form of an integer

View Instructor Detail [GET]

Use this call to fetch detailed information about one (1) instructor.

Error codes

Code Message
400 Bad Request
401 No Access Rights
404 Instructor not found
  • Request

    • Headers

      X-Api-Key: <apikey>
  • Response 200 (application/json)

    {
          "id": 23,
          "last_name": "Kaaskop",
          "first_name": "Kees",
          "initials": null,
          "prefix": null,
          "email": "kees@dezottekaaskop.nl",
          "phonenumber": "+31(0)6-12962699",
          "fields": {
              "Algemeen": "",
              "Website": "",
              "EHBO diplomanummer": "",
              "VCA diplomanummer": "",
              "Categorie": ""
          }
      }

List instructors

GET https://apitest.api.planaday.net/v1/instructor/list/offset=offset&limit=limit&label=
Requestsexample 1
Headers
X-Api-Key: <apikey>
Responses200
Headers
Content-Type: application/json
Body
{
  "meta": {
    "page": {
      "current": 1,
      "offset": 1,
      "limit": 100,
      "total": 1
    },
    "records": 3
  },
  "data": [
    {
      "id": 1,
      "last_name": "Avci",
      "first_name": "Melle",
      "initials": null,
      "prefix": null,
      "href": "https://apitest.api.planaday.net/v1/instructor/287"
    },
    {
      "id": 2,
      "last_name": "Sterkman",
      "first_name": "Bastiaan",
      "initials": null,
      "prefix": null,
      "href": "https://apitest.api.planaday.net/v1/instructor/286"
    },
    {
      "id": 3,
      "last_name": "Zuidweg",
      "first_name": "Mila",
      "initials": null,
      "prefix": null,
      "href": "https://apitest.api.planaday.net/v1/instructor/288"
    }
  ],
  "links": {
    "self": "https://apitest.api.planaday.net/v1/instructor/list?&offset=1",
    "first": "https://apitest.api.planaday.net/v1/instructor/list?&offset=1",
    "last": "https://apitest.api.planaday.net/v1/instructor/list?&offset=1",
    "previous": "",
    "next": ""
  }
}

View list of instructors
GET/instructor/list/offset={offset}&limit={limit}&label=

Use this call to fetch all active instructors

Error codes

Code Message
401 No Access Right
URI Parameters
HideShow
offset
number (optional) 

Start offset of instructors to show (i.e. 25)

limit
number (optional) 

Amount of instructors to show in one response (i.e. 25, limited to 100)


Add/Remove instructor to/from daypart

POST https://apitest.api.planaday.net/v1/instructor/instructor_id/daypart/
Requestsadd instructor to daypart with id 1
Headers
Content-Type: application/json
X-Api-Key: <apikey>
Body
{
  "daypart_id": 1,
  "create_task": true,
  "notify": true,
  "include_ical": true
}
Responses200
Body
{
  "message": "OK"
}

Add/plan an instructor to a specific daypart
POST/instructor/{instructor_id}/daypart/

Use this call to add/plan an instructor to a specific daypart

Error codes

Code Message
401 No Access Right
401 Parameters missing: id
401 Missing or invalid json input
401 No email address known for this instructor
404 Instructor not found
404 Daypart not found
409 Instructor already planned for daypart
URI Parameters
HideShow
instructor_id
number (required) 

ID of the instructor in the form of an integer


DELETE https://apitest.api.planaday.net/v1/instructor/instructor_id/daypart/
Requestsdelete instructor from daypart with id 1
Headers
Content-Type: application/json
X-Api-Key: <apikey>
Body
{
  "daypart_id": 1,
  "notify": true
}
Responses204
This response has no content.

Remove/unplan an instructor from a specific daypart
DELETE/instructor/{instructor_id}/daypart/

Use this call to remove/unplan an instructor from a specific daypart

Error codes

Code Message
401 No Access Right
401 Parameters missing: id
401 Missing or invalid json input
401 No email address known for this instructor
404 Instructor not found
404 Daypart not found
404 Instructor not planned for daypart
URI Parameters
HideShow
instructor_id
number (required) 

ID of the instructor in the form of an integer


Add/remove instructor to/from course

POST https://apitest.api.planaday.net/v1/instructor/instructor_id/course/
Requestsadd instructor to course with id 1
Headers
Content-Type: application/json
X-Api-Key: <apikey>
Body
{
  "course_id": 1,
  "create_task": true,
  "notify": true,
  "include_ical": true
}
Responses200
Body
{
  "message": "OK"
}

Add/plan an instructor to all dayparts in a specific course
POST/instructor/{instructor_id}/course/

Use this call to add/plan an instructor to all dayparts in a specific course

Error codes

Code Message
401 No Access Right
401 Parameters missing: id
401 Missing or invalid json input
401 No email address known for this instructor
404 Instructor not found
404 Course not found
URI Parameters
HideShow
instructor_id
number (required) 

ID of the instructor in the form of an integer


DELETE https://apitest.api.planaday.net/v1/instructor/instructor_id/course/
Requestsdelete instructor from course with id 1
Headers
Content-Type: application/json
X-Api-Key: <apikey>
Body
{
  "course_id": 1,
  "notify": true
}
Responses204
This response has no content.

Remove/unplan an instructor from all dayparts in a specific course
DELETE/instructor/{instructor_id}/course/

Use this call to remove/unplan an instructor from all dayparts in a specific course

Error codes

Code Message
401 No Access Right
401 Parameters missing: id
401 Missing or invalid json input
401 No email address known for this instructor
404 Instructor not found
404 Course not found
404 Instructor not planned for course
URI Parameters
HideShow
instructor_id
number (required) 

ID of the instructor in the form of an integer


Label

With the label api you can fetch information about used labels.

Label list

GET https://apitest.api.planaday.net/v1/label/list
Requestsexample 1
Headers
X-Api-Key: <apikey>
Responses200
Headers
Content-Type: application/json
Body
{
  "labels": [
    {
      "id": 1,
      "name": "EHBO",
      "description": null,
    },            
    {
      "id": 2,
      "name": "CODE95",
      "description": null,
    },
    {
      "id": 3,
      "name": "BHV",
      "description": "Alle BHV gerelateerde items",
    }
  ]
}

Get a list of labels
GET/label/list

Use this call to get a list of label.

Error codes

Code Message
400 Bad Request
401 No Access Right

Location

With the location api you can fetch information about locations.

Get Location

GET https://apitest.api.planaday.net/v1/location/location_id
Requestsexample 1
Headers
X-Api-Key: <apikey>
Responses200
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "name": "Dolores.",
  "code": "65b77",
  "address": {
    "street_1": null,
    "street_2": null,
    "housenumber": 219,
    "housenumber_extension": null,
    "zipcode": "8618WY",
    "city": "Soerendonk",
    "country": "Nederland",
    "lat": 0,
    "lng": 0
  },
  "contact_info": {
    "phonenumber_1": null,
    "email": null,
    "website": "https://dolores.nu/locaties"
  },
  "description": null,
  "capacity": 11,
  "overbookable": false,
  "is_virtual": false,
  "is_external": true,
  "costs": {
    "price": 40,
    "vat": 21,
    "vat_code": 2
  },
  "href": "https://apitest.api.planaday.nl/v1/location/1"
}

View Location Detail
GET/location/{location_id}

Use this call to fetch detailed information about one (1) location.

Error codes

Code Message
400 Bad Request
401 No Access Right
404 Location not found
URI Parameters
HideShow
location_id
number (required) 

ID of the Location in the form of an integer


Ping

With the ping api you can check if the service is available

Ping

GET https://apitest.api.planaday.net/v1/ping
Responses200
Headers
Content-Type: application/json
Body
pong

Ping
GET/ping

Use this call to ping the service.

Error codes

Code Message
400 Bad Request

Changelist

Here you will find a list of changes made to the API.

Symbol Description
+ Added
- Removed
* Bugfix
. General
! Breaking change

11-01-2023

What Changes
! Freefields part in ‘GET /course/{courseId}’ changed to 'extrafields
+ Added new call ‘GET /extrafields/list’

History 2022

Date What Changes
15-11-2022 + Added new calls for instructor
15-11-2022 + Added instructor block in ‘GET /course/{courseId}/dayparts’
15-11-2022 + Added instructor block in ‘GET /daypart/{daypartId}’
10-10-2022 + Added optional ‘has_stap’ & ‘stap_only’ to course block in ‘GET /course/list’
10-10-2022 + Added optional ‘has_stap’ & ‘stap_only’ to course block in ‘GET /course/{courseId}’
10-10-2022 + Added optional ‘has_stap’ & ‘stap_only’ to course block in ‘GET /coursetemplate/list’
10-10-2022 + Added optional ‘has_stap’ & ‘stap_only’ to course block in ‘GET /coursetemplate/{courseTemplateId}’
10-10-2022 + Added optional ‘stap_regulation’ to student block in ‘POST /booking/{courseId}’
11-02-2022 + Added new call for (uptime) monitoring ‘GET ping’
11-02-2022 + Added optional ‘chamber_of_commerce’ to company block in ‘POST /booking/{courseId}’
11-02-2022 + Added optional ‘vat_number’ to company block in ‘POST /booking/{courseId}’
11-02-2022 + Added optional ‘invoice’ block to company block in ‘POST /booking/{courseId}’
11-02-2022 + Added optional ‘mailing’ block to company block in ‘POST /booking/{courseId}’
02-02-2022 + Added optional ‘prefix’ to students block for ‘POST booking/{courseId}’
02-02-2022 + Added optional ‘maiden_name’ to students block for ‘POST booking/{courseId}’

History 2021

Date What Changes
10-12-2021 + Added ’ Added new call to fetch images from course ‘GET /course/{courseId}/images’
10-12-2021 + Added ’ Added new call to serve 1 image ‘GET /image/{id}/{crc}’
21-09-2021 + Added ‘status’ in daypart block to ‘GET /course/{courseId}’
21-09-2021 + Added ‘status’ in daypart block to ‘GET /course/{courseId}/dayparts’
21-09-2021 + Added ‘status’ in daypart block to ‘GET /daypart/{daypartId}’
23-08-2021 + Added optional ‘freefields’ to ‘GET /course/{courseId}’
02-08-2021 + Added ‘visible’ to daypart block call ‘GET /course/list’
02-08-2021 + Added ‘visible’ to daypart block call ‘GET /course/{courseId}’
02-08-2021 + Added ‘visible’ to daypart block call ‘GET /course/dayparts/{courseId}’
02-08-2021 + Added ‘visible’ to daypart block call ‘GET /daypart/{daypartId}’
02-08-2021 + Added optional ‘label’ field to 'POST /course/booking/{courseId}
01-05-2021 + Introduced the Attributes blocks for coursetemplates, courses and dayparts
01-05-2021 + Introduced the Attributes blocks for the ‘POST /booking’ call
01-05-2021 . Added more example requests to several calls
01-05-2021 + Added optional ‘nick_name’ to booking call ‘POST /course/booking/{courseId}’
28-04-2021 + Added optional ‘language’ to booking call ‘POST /course/booking/{courseId}’
28-04-2021 + Added ‘language’ to call ‘GET /course/{courseId}’
28-04-2021 + Added ‘language’ to call ‘GET /course/list’
28-04-2021 + Added ‘language’ to call ‘GET /coursetemplate/{courseId}’
28-04-2021 + Added ‘language’ to call ‘GET /coursetemplate/list’
15-30-2021 + Added optional ‘process_code95’ and ‘process_soob’ in the ‘student’ block to call ‘POST /course/booking/{courseId}’
17-02-2021 + Added ‘vat’ and ‘vat_code’ to call ‘GET /course/{courseId}/materials’
17-02-2021 + Added ‘vat’ and ‘vat_code’ to call ‘GET /daypart/{daypartId}/materials’
17-02-2021 + Added ‘vat_code’ to ‘costs’ block for call ‘GET /course/{courseId}’
17-02-2021 + Added ‘vat_code’ to ‘costs’ block for call ‘GET /course/list’
17-02-2021 + Added ‘vat_code’ to ‘costs’ block for call ‘GET /coursetemplate/{coursetemplateId}’
17-02-2021 + Added ‘vat_code’ to ‘costs’ block for call ‘GET /daypart/{daypartId}’
17-02-2021 + Added ‘vat_code’ to ‘costs’ block for call ‘GET /location/{locationId}’
17-02-2021 + Added ‘options’ to ‘users’ block for call ‘GET /course/list’
17-02-2021 + Added ‘options’ to ‘users’ block for call ‘GET /course/{courseId}’
13-01-2021 . Added information about Ratelimiting

History 2020

Date What Changes
23-11-2020 + Added ‘has_code95’ and ‘has_soob’ to ‘GET /course/list’
23-11-2020 + Added ‘has_code95’ and ‘has_soob’ to GET /coursetemplate/list
23-11-2020 + Added ‘has_code95’ and ‘has_soob’ to GET /coursetemplate/{id}
18-11-2020 + Added ‘labels’ to ‘GET /course/{id}/dayparts’
18-11-2020 + Added ‘labels’ to ‘GET /daypart/{id}’
18-11-2020 + Added ‘labels’ in daypart blocks to ‘GET /course/list’
18-11-2020 + Added ‘labels’ in daypart blocks to ‘GET /coursetemplate/list’
30-10-2020 + Added optional ‘internal_reference’ to student block for call POST /booking/{courseId}
30-10-2020 + Added DELETE call to delete previous create bookings for callDELETE /booking/{id}
30-10-2020 + Added ‘status’ course call (GET /course/{id})
30-10-2020 + Added ‘status’ course list call (GET /course/list)
20-10-2020 + Added ‘has_code95’, ‘code95’ and ‘has_soob’ (GET /course/{id})
20-10-2020 + Added ‘has_code95’ and ‘code95’ (GET /course/dayparts/{id})
20-10-2020 + Added ‘has_code95’ and ‘code95’ (GET /daypart/{id})
27-08-2020 + Added new call to fetch labels (GET label/list)
27-08-2020 + Added label to arguments to fetch courses with have a certain label (GET /course/list)
27-08-2020 + Added ‘labels’ to ‘GET /coursetemplate’
27-08-2020 + Added ‘labels’ to ‘GET /course’ and 'GET /course/list
21-08-2020 + Added ‘payment’ block to ‘POST /booking/{courseId}’
21-08-2020 + Added new call to mark booking as payed (POST /booking/payed/{id})
21-08-2020 + Added ‘is_payed’ to ‘POST booking’
17-08-2020 . It’s now possible to see difference between normal (offline) and e-Learning (online) dayparts
17-08-2020 + Added is_elearning to ‘GET /daypart’
17-08-2020 + Added date_finish_before to ‘GET /daypart’
17-08-2020 + Added has_elearning to ‘GET /coursetemplate’
17-08-2020 + Added has_elearning to ‘GET /coursetemplate/list’
17-08-2020 + Added has_elearning to ‘GET /course’
17-08-2020 + Added has_elearning to ‘GET /course/list’
17-08-2020 + Added is_elearning to ‘GET /course/dayparts’
17-08-2020 + Added date_finish_before to ‘GET /course/dayparts’
31-07-2020 + Added new fields ‘invoice_mail’ and ‘remark’ to ‘create booking call’
31-07-2020 * Updated gender values in ‘create booking call’. Added ‘u’ (unknown) and ‘nr’ (not relevant)
19-05-2020 + Added new call to fetch materials of a course
19-05-2020 + Added new call to fetch materials of a daypart
19-05-2020 + Added an optional block ‘materials’ to the ‘create booking call’
18-05-2020 + Added an optional block ‘dayparts’ to the ‘create booking call’
18-05-2020 * Made the ‘email’ field in ‘student’ section of the ‘create booking call’ optional. May be null
03-02-2020 + Added optional ‘is_student’ to ‘create booking call’ in ‘students’ section. Default value: true
03-02-2020 . New layout (three columns) for API docs
03-02-2020 + Added optional ‘is_contact_person’ to ‘create booking call’ in ‘students’ section. Default value: false
18-10-2019 + Added changelist in documentation
18-10-2019 * Fixed description about offsets in documentation
01-01-2019 . Initial setup of API

Generated by aglio on 02 Feb 2023