tiempoAPI reference
API reference

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

POST/v1/accounts

Adds 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

  • namestringrequired

    Shown in your dashboard; not to customers.

  • timezonestringrequired

    IANA name, for example Europe/London.

  • slot_interval_minutesinteger

    The business’s spacing of start times, 1 to 1440. Defaults to 15. A search can give its own interval_minutes.

  • slot_alignmentstring

    midnight: 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.

  • metadatamap

    Up 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

GET/v1/accounts

Every business on your platform in this mode, newest first.

Query parameters

  • limitinteger

    1 to 100. Defaults to 20.

  • starting_afterstring

    An object id from the previous page; returns the page after it.

  • ending_beforestring

    An object id; returns the page before it.

  • metadata[key]string

    Only objects whose metadata has this key and value. Repeat for several.

Retrieve an account

GET/v1/accounts/{id}

Returns 404 if the account isn’t on your platform.

Path parameters

  • idstringrequired

    The object’s id.

Update an account

POST/v1/accounts/{id}

Path parameters

  • idstringrequired

    The object’s id.

Body parameters

  • namestring

    Shown in your dashboard; not to customers.

  • timezonestring

    IANA name, for example Europe/London.

  • slot_interval_minutesinteger

    The business’s spacing of start times, 1 to 1440. Defaults to 15. A search can give its own interval_minutes.

  • slot_alignmentstring

    midnight: 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.

  • metadatamap

    Up 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

DELETE/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

  • idstringrequired

    The object’s id.

Returns

A deletion confirmation. Sends account.deleted.