Status Reminders¶
Current version: 2.0.0
Create¶
- POST /api2/statusherinneringen¶
Create a new status reminder
Example request:
POST /api2/statusherinneringen HTTP/1.1 Host: demo.recras.nl Accept: application/json { "naam": "Example statusreminder", "status": "reservering", // (reservation) "Bedrijven": [ // (Companies) { "id": 1 } ], "termijn_in_dagen": 7, // (term_in_days) "herinnering_termijn_in_dagen": 3, // (reminder_term_in_days) "onderwerp_mail_herinnering": "Email subject", // (subject_email_reminder) "body_mail_herinnering": "Email body" // (body_email_reminder) }
Example response:
HTTP/1.1 201 Created Content-Type: application/json Location: /api2/statusherinneringen/5 { "id": 5, "naam": "Example statusreminder", "status": "reservering", // (reservation) "Bedrijven": [ // (Companies) { "id": 1, "displaynaam": "Example company", // (display_name) } ], "termijn_in_dagen": 7, // (term_in_days) "herinnering_termijn_in_dagen": 3, // (reminder_term_in_days) "onderwerp_mail_herinnering": "Email subject", // (subject_email_reminder) "body_mail_herinnering": "Email body" // (body_email_reminder) }
- JSON Parameters:
naam (string|null) – Name for the status reminder, not communicated to customers. (naam means name)
status (string) – Required The booking status for which to trigger this reminder. Please refer to Booking Statuses (Statussen van boekingen) for information about booking statuses.
termijn_in_dagen (int) – Required Amount of days the booking should be at the specified status, after which this reminder will be triggered. (termijn_in_dagen means term_in_days)
herinnering_termijn_in_dagen (int) – Required Amount of days the booking’s status expiration date should be moved when this status reminder is triggered. (herinnering_termijn_in_dagen means reminder_term_in_days)
onderwerp_mail_herinnering (string) – Required The subject line of the email that should be sent to the customer’s main contact when this status reminder is triggered. (onderwerp_mail_herinnering means subject_email_reminder)
body_mail_herinnering (string) – Required The body of email. (body_mail_herinnering means body_email_reminder)
Bedrijven (array) – A list of the companies (Bedrijven) for which this status reminder should be triggered. Each company is limited to at most one reminder for each booking status.
Bedrijven[].id (int) – Required The
idreference of the company. All other fields for company objects are currently ignored; this may change in the future, API consumers are advised not to send other fields to this endpoint.
- Response Headers:
Location – The URI of the newly created status reminder
- Status Codes:
201 Created – Status reminder successfully created, the body resembles the result of the Read request.
406 Not Acceptable – Error in the input. Please refer to Error codes for information about specific error messages. (Fout in de invoer)
403 Forbidden – The currently authenticated user does not have the editBoekingStatusHerinnering (editBookingStatusReminder) permission.
Read¶
- GET /api2/statusherinneringen¶
A list of all status reminders.
This section should be finished, please contact Recras development for more information
- Request Headers:
Authorization – Required Basic authentication
- Status Codes:
200 OK – no error
- GET /api2/statusherinneringen/(int: id)¶
A status reminder identified by
id.This section should be finished, please contact Recras development for more information
- Request Headers:
Authorization – Required Basic authentication
- Status Codes:
200 OK – OK
404 Not Found – There is no status reminder with this
id
Update¶
- PUT /api2/statusherinneringen/(int: id)¶
This section should be finished, please contact Recras development for more information. This endpoint should resemble the *create action*
Delete¶
- DELETE /api2/statusherinneringen/(int: id)¶
This section should be finished, please contact Recras development for more information
Error codes¶
With the Create or Update actions, these endpoint specific error messages may be encountered:
- ERR_COMPANY_STATUS_REMINDER_TAKEN
A company you’ve tried to add already is linked to another status reminder with the specified
status. Theparamsfield gives information about which company (Bedrijf.id(Company.id)) triggered this error and about the other status reminder identifier (Statusherinnering.id(StatusReminder.id)) and common name (Statusherinnering.naam(StatusReminder.name)).