Date Text
A table of dates, with a text value.
You can use this for your door code or for the lodge captain (or both).
The text is assumed to apply until the next date, or forever if there is no later date.
You can use it for door codes, or anything date related that you would like to appear in scheduled reminder emails. There is also the static #DOOR_CODE# configuration item you can use if your door code doesn’t change on a schedule.
Include it in an email template that relates to a booking with %DATE_TEXT% and all dates included in the booking will be covered.
If you previously used #DOOR_CODE# in an email, steps to migrate to this feature are:
- Create DateText records via admin menu <strong>→</strong> bookings <strong>→</strong> date text. Note the date is the day when the new text comes into effect
- Find email(s) containing #DOOR_CODE# in Site Config. Here is a link that uses the value filter.
- replace #DOOR_CODE# in the email template with %DATE_TEXT%
Room Occupation Display
You can include Date Text information in the Room Occupation Kiosk display.
How to automate Date Text
If your door codes are programmed automatically by software, your software may be capable of updating the Booking Service to match, or vice versa.
Steps to do this:
- Get yourself an API key via admin menu → admin → API keys
- Note you can put the API key into request headers, see API keys.
- Give the API key the role DATE_TEXT
- Use our REST API GET /api/index.php?r=apiactive/dateText&page=-1&apikey={your API key} to get all entries.
- To create an entry POST /api/index.php?r=apiactive/dateText&apikey={your API key} with POST parameters {id: null, date: "2020-08-01", text: "test text"}
- To delete an entry (thanks for deleting entries in the past) use DELETE /api/index.php?r=apiactive/dateText&id=4&apikey={your API key}
- To delete all older entries use GET /api/index.php?r=datetext/deletepast&apikey={your API key}. this will retain one past entry if it is still active.