Status Reminders

Current version: 2.0.0

Create

POST /api2/statusherinneringen

Create a new status reminder

Voorbeeld request:

POST /api2/statusherinneringen HTTP/1.1
Host: demo.recras.nl
Accept: application/json

{
   "naam": "Example statusreminder",
   "status": "reservering",
   "Bedrijven": [
      {
         "id": 1
      }
   ],
   "termijn_in_dagen": 7,
   "herinnering_termijn_in_dagen": 3,
   "onderwerp_mail_herinnering": "Email subject",
   "body_mail_herinnering": "Email body"
}

Voorbeeld response:

HTTP/1.1 201 Created
Content-Type: application/json
Location: /api2/statusherinneringen/5

{
   "id": 5,
   "naam": "Example statusreminder",
   "status": "reservering",
   "Bedrijven": [
      {
         "id": 1,
         "displaynaam": "Example company",
      }
   ],
   "termijn_in_dagen": 7,
   "herinnering_termijn_in_dagen": 3,
   "onderwerp_mail_herinnering": "Email subject",
   "body_mail_herinnering": "Email body"
}
JSON Parameters:
  • naam (string|null) – Name for the status reminder, not communicated to customers.

  • status (string) – Required The booking status for which to trigger this reminder. Please refer to 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.

  • herinnering_termijn_in_dagen (int) – Required Amount of days the booking’s status expiration date should be moved when this status reminder is triggered.

  • 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.

  • body_mail_herinnering (string) – Required The body of email.

  • Bedrijven (array) – A list of the companies 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 id reference 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.

  • 403 Forbidden – The currently authenticated user does not have the editBoekingStatusHerinnering 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:
Status Codes:
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:
Status Codes:

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. The params field gives information about which company (Bedrijf.id) triggered this error and about the other status reminder identifier (Statusherinnering.id) and common name (Statusherinnering.naam).