Documentation
Difficulty level:
API - Hook - POST hook/booking/
Incoming hook to create or update booking
POST hook/booking/
Used for
Inkomende hook om een reservering te maken of bij te werken.
Authentication
Beheerders toegang met recht entity_booking_update
Parameters
The table here only shows a view of the core variables. A full overview of variables can be found here.
| Parameter | Description | Mandatory | Location | Example |
|---|---|---|---|---|
| id | The booking ID | No * | Body | 15492 |
| object_id | Het object ID | No * | Body | 17 |
| date_from | Date from in ISO | No * | Body | 2018-02-13T11:30:00+0100 |
| date_till | Date till in ISO | No * | Body | 2018-02-13T11:30:00+0100 |
| number | number of places | No * | Body | |
| remarks | Remarks | No | Body | |
| subchannel | Booked channel, for report purpose | No | Body | hook |
| cust_id | Customer ID | No | Body | |
| If supplied, the customer is searched via the supplied email address | No | Body | ||
| external_id | If supplied the booking is searched via the external id | No | Body | |
| status_code | If supplied, a status change is performed where the supplied status code is the target | No | Body | 30 |
* None of the variable is mandatory by itself. A correct combination of variables is mandatory and will determine the action which will be executed
- If "id" is supplied, the booking will be updated with the supplied fields
- If "id" is not supplied, but "external_id" is supplied, then the booking will be updated which contains that external id.
- If "id" and "external_id" are not supplied or cannot be found, a new booking is created.
- For creation of a new booking the core attributes are mandatory: "object_id", "date_from", "date_till", "number"
Example
Maken reservering.
POST api/rest/hook/booking/
Request
{
"object_id": 10,
"date_till": "2018-02-13T11:30:00+0100",
"date_from": "2018-02-13T09:30:00+0100",
"remarks": "",
"email": "info@teqa.nl",
"external_id": "3114hqq4rqsvlhgr8s66msvju9"
}
Response:
{
"id": "1126",
"object_id": 10,
"object": "Catharinadal",
"object_desc": "Catharinadal",
"date_from": "2018-02-13T09:30:00+0100",
"date_till": "2018-02-13T11:30:00+0100",
"number": 1,
"remarks": "",
"mainobject_desc": "Stats",
"mainobject_id": 5,
"fromtime": "09:30",
"tilltime": "11:30",
"status_code": "11",
"status": "In optie",
"customer_id": "460",
"customer": "Dhr. T. Ester",
"email": "info@teqa.nl",
"event_id": null,
"price": 0,
"currency": "EUR",
"custom06": "",
"custom07": "0",
"custom12_raw": null,
"custom12": ""
}
Booking fields are described here.





