Accounts
An account is one business on your platform: a salon, a padel club. Create one as each business signs up to your product and keep its id next to your own record. Platform-level: no Tiempo-Account header.
Create an account
/v1/accountsAdds a business to your platform. Its timezone is the clock its rotas and recurring bookings follow unless a resource or location says otherwise. Its slot grid (slot_interval_minutes, slot_alignment) is what availability searches use when they don’t give their own.
Body parameters
namestringrequiredShown in your dashboard; not to customers.
timezonestringrequiredIANA name, for example Europe/London.
slot_interval_minutesintegerThe business’s spacing of start times, 1 to 1440. Defaults to 15. A search can give its own interval_minutes.
slot_alignmentstringmidnight: starts every interval from local midnight. opening: from the start of each stretch of working hours, so a 09:20 opening offers 09:20. A business defaults to midnight; a search, to its business’s.
metadatamapUp to 50 keys of your own (strings, keys up to 40 characters, values up to 500). Returned on every read and webhook. On update, an empty string removes a key.
List accounts
/v1/accountsEvery business on your platform in this mode, newest first.
Query parameters
limitinteger1 to 100. Defaults to 20.
starting_afterstringAn object id from the previous page; returns the page after it.
ending_beforestringAn object id; returns the page before it.
metadata[key]stringOnly objects whose metadata has this key and value. Repeat for several.
Retrieve an account
/v1/accounts/{id}Returns 404 if the account isn’t on your platform.
Path parameters
idstringrequiredThe object’s id.
Update an account
/v1/accounts/{id}Path parameters
idstringrequiredThe object’s id.
Body parameters
namestringShown in your dashboard; not to customers.
timezonestringIANA name, for example Europe/London.
slot_interval_minutesintegerThe business’s spacing of start times, 1 to 1440. Defaults to 15. A search can give its own interval_minutes.
slot_alignmentstringmidnight: starts every interval from local midnight. opening: from the start of each stretch of working hours, so a 09:20 opening offers 09:20. A business defaults to midnight; a search, to its business’s.
metadatamapUp to 50 keys of your own (strings, keys up to 40 characters, values up to 500). Returned on every read and webhook. On update, an empty string removes a key.
Delete an account
/v1/accounts/{id}For a business leaving your platform. It disappears from the API and its id stops working in Tiempo-Account; its past bookings, events and usage are kept for your records and invoices. Refused (409 account_has_bookings or account_has_series) while it has holds, upcoming confirmed bookings or active series: cancel those first.
Path parameters
idstringrequiredThe object’s id.
Returns
A deletion confirmation. Sends account.deleted.