The tutorials on these pages assumes that you have at least an idea of what a RESTful
First of all you need to sign up before you can start consuming the API. You sign up here https://admin.timekit.io/login.
You also need to create an App, since all requests to the API are made in the context of an app, defined by the App-Token that you use for authentication.
All code examples use the cURL command line tool which is a simple and common tool for communicating via HTTP and perfect for consuming RESTful APIs. We've tried our best to make the code examples copy-pastable, so you should basically just replace ID's if you're taking these tutorials for a spin.
Timekit uses JSON as data-format so all data to and from Timekit must be and will be formatted in JSON. You need to set an HTTP header like this: "Content-Type: application/json" when requesting Timekits API. All our cURL examples have this header included.
The standard timestamp format we use is RFC3339, which is a subset of ISO8601 but RFC3339 is more narrowly defined and thus more to the point. Some programming languages will not have an RFC3339 format but will then have an ISO8601 format that in most cases is RFC3339 compatible.
An RFC3339 timestamp will look like this: 2017-11-24T08:46:01+02:00
We use Basic Authentication over HTTPS
App-Token authentication is slightly different from traditional basic authentication, in that there is no email or user-name value for the App-Token and so the authentication only uses the token value as you would normally use the password, like so:
curl --request GET \
--url https://api.timekit.io/v2/bookings \
--header 'Content-Type: application/json' \
Notice that there is a prefixing colon on the token-value. That cURL example will respond with all the bookings for the app, identified by the App-Token.
The easiest way to retrieve the App-Token is through our admin-interface. If you for some reason need to obtain the App-Token through the API, please read this tutorial on how to obtain the App-Token