tiempoAPI reference
API reference

Blocks

Time off, closures, maintenance, lunch. A block targets a resource, a location, or the whole business, for a period or for whole local dates.

Create a block

POST/v1/blocks

Makes time unavailable. Give start and end instants, or start_date and end_date for whole local days. With no resource or location it closes the whole business.

Send the business’s id in Tiempo-Account.

Body parameters

  • resourcestring

    A resource id.

  • locationstring

    A location id.

  • starttimestamp

    An ISO-8601 instant.

  • endtimestamp

    An ISO-8601 instant, after start.

  • start_datedate

    First local date, inclusive.

  • end_datedate

    Last local date, inclusive.

  • quantityinteger

    Units of capacity to take. Defaults to 1 (for blocks, the whole capacity).

  • reasonstring

    Your note, kept on the object and its webhook.

  • 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 blocks

GET/v1/blocks

Send the business’s id in Tiempo-Account.

Query parameters

  • resourcestring

    Only those involving this resource. On the calendar, repeat it for several.

  • locationstring

    Only those at this location.

  • account_wideboolean

    true for blocks that close the whole business.

  • fromtimestamp

    Only those ending after this instant.

  • totimestamp

    Only those starting before this instant.

  • 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 a block

GET/v1/blocks/{id}

Send the business’s id in Tiempo-Account.

Path parameters

  • idstringrequired

    The object’s id.

Update a block

POST/v1/blocks/{id}

Send the business’s id in Tiempo-Account.

Path parameters

  • idstringrequired

    The object’s id.

Body parameters

  • starttimestamp

    An ISO-8601 instant.

  • endtimestamp

    An ISO-8601 instant, after start.

  • start_datedate

    First local date, inclusive.

  • end_datedate

    Last local date, inclusive.

  • quantityinteger

    Units of capacity to take. Defaults to 1 (for blocks, the whole capacity).

  • reasonstring

    Your note, kept on the object and its webhook.

  • 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 a block

DELETE/v1/blocks/{id}

Send the business’s id in Tiempo-Account.

Path parameters

  • idstringrequired

    The object’s id.