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
/v1/blocksMakes 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
resourcestringA resource id.
locationstringA location id.
starttimestampAn ISO-8601 instant.
endtimestampAn ISO-8601 instant, after start.
start_datedateFirst local date, inclusive.
end_datedateLast local date, inclusive.
quantityintegerUnits of capacity to take. Defaults to 1 (for blocks, the whole capacity).
reasonstringYour note, kept on the object and its webhook.
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 blocks
/v1/blocksSend the business’s id in Tiempo-Account.
Query parameters
resourcestringOnly those involving this resource. On the calendar, repeat it for several.
locationstringOnly those at this location.
account_widebooleantrue for blocks that close the whole business.
fromtimestampOnly those ending after this instant.
totimestampOnly those starting before this instant.
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 a block
/v1/blocks/{id}Send the business’s id in Tiempo-Account.
Path parameters
idstringrequiredThe object’s id.
Update a block
/v1/blocks/{id}Send the business’s id in Tiempo-Account.
Path parameters
idstringrequiredThe object’s id.
Body parameters
starttimestampAn ISO-8601 instant.
endtimestampAn ISO-8601 instant, after start.
start_datedateFirst local date, inclusive.
end_datedateLast local date, inclusive.
quantityintegerUnits of capacity to take. Defaults to 1 (for blocks, the whole capacity).
reasonstringYour note, kept on the object and its webhook.
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 a block
/v1/blocks/{id}Send the business’s id in Tiempo-Account.
Path parameters
idstringrequiredThe object’s id.