Using the You'reOnTime API
The You'reOnTime API lets other software talk to your You'reOnTime account. It is mainly used to build your own custom online booking experience (for example a booking page designed to match your website, or a booking feature inside your own app), and to connect You'reOnTime to other systems, for example to pull exports of your clients, appointments or invoices into another tool.
Using the API needs a web developer. As the business owner, your part is to give your developer your API key and keep it safe. This article explains where to find the key, how to replace it, and where your developer can find the technical documentation.
What the API can do
The API covers the full online booking process and some account data, including:
- your business details and locations
- services, staff and available appointment times
- making, viewing and cancelling bookings
- looking up and saving clients and client notes
- gift vouchers
- exporting clients, appointments, online bookings, invoices and new clients
The API documentation lists every request and what it returns.
How to find your API key
- Click Settings in the left menu.
- Under Business Details, click Business Settings.
- Scroll down to the API section.
- Your key is shown in the API Key box. It is a long code made of letters and numbers in five groups separated by dashes, for example
1a2b3c4d-1234-5678-9abc-1a2b3c4d5e6f. - Select the key and copy it to give to your developer.
The key box is read-only. You cannot type your own key.
If the box is empty, or shows only zeros (00000000-0000-0000-0000-000000000000), your account has not been given a key yet. Click Reset API Key to create one.
How to reset your API key
Reset your key if you think someone who should not have it has seen it, if a developer you no longer work with had it, or if you have never been issued one.
- Click Settings in the left menu.
- Under Business Details, click Business Settings.
- In the API section, click Reset API Key.
A new key appears in the API Key box straight away. There is no confirmation message and you do not need to click Save. The change takes effect immediately.
Important: as soon as you reset the key, the old key stops working. Any website, app or integration using the old key will fail until your developer updates it with the new key. Let them know before you reset it if you can.
Information for your developer
- API documentation: https://api2.youreontime.com/1/doc
- Base address for requests: https://api2.youreontime.com/1/api
- Authentication: every request must include the API key in a request header named
APIKey. Requests without a valid key are rejected with an "Invalid API Key" error. - Sample app: the documentation links to a working sample application that shows each step of the booking process.
Keeping your API key safe
Treat your API key like a password. Anyone who has it can read and change data in your account through the API, including making bookings and looking up client details.
- Only give it to developers or services you trust.
- Do not email it to people who do not need it, or post it anywhere public.
- Your developer should never put the key in code that runs in a visitor's web browser, such as JavaScript on a web page, because anyone can view that code. Requests should go through your developer's own server, which adds the key.
- If you think the key has been exposed, reset it straight away.
Things to know
- Who can see the API key. The API section is on the Business Settings page, so you need a security level that can access the business settings. In a franchise, Business Settings is managed by head office and is not shown at franchise locations. One key covers the whole business, including all locations.
- Do I need the API for my normal online booking? No. The standard You'reOnTime online booking site and booking widget work without an API key. See "Getting started with Online Bookings" and "How to integrate the online booking into your website".
- The integration has suddenly stopped working. Check whether someone has clicked Reset API Key recently. If so, give the new key to your developer.
- Some older documentation says to contact support for a key. You can now find and reset your key yourself in Business Settings as described above.