Caching Availability

Endpoint that uses cache when fetched frequently

This endpoint is improved version of v2/availability . If you are fetching availability for resource frequently without any change in the date range often then this might be a good endpoint for you.

How does it work?

When you request availability for your resource between some day range it would catch the response and next time you hit this endpoint you will get cached availability.

This way you can make more requests per seconds and get improved response time. Cache will be bursted in following scenarios:

  • When resource is updated with new constraints
  • When project is updated with new constraints
  • When new booking is created for specific resource

🚧

Cached TTL

This endpoint is cached for 1 minute of TTL. Cache will be bursted after a minute.

This endpoint will inherit your project settings if some params are not set as a payload.

Modes

Timekit currently operate with three modes to query availability, these only have significance if you're querying availability for more than one resource.

  • Mutual.
  • Exclusive.
  • Round-robin random.
  • Round-robin prioritized.

Mutual Mode Strategy

The mutual mode will ensure that all resources are available in a given time-slot.

Round-robin Strategy

The round-robin modes will choose whichever resource is available at a given time-slot, according to the strategy. The round-robin random strategy chooses resource randomly as the name suggests. The inner workings of Timekit's availability-algorithm dictates that once a resource has been found for a given time-slot, this resource will have precedence for the remainder of the of time-slots.

This means that you will not see random resource-allocation between the produced time-slots, only if a time-slot is found where the first randomly chosen resource is not available, will there be a different resource allocated to that particular time-slot.

The prioritized round-robin strategy works in much the same manner, except that the resource with precedence is chosen based on the sequence given when defining resources.

Exclusive Strategy

The exclusive mode will ensure that if time slot has number of assigned resources for a given time slot, it will show all available resources for that specific time slot.

If time slot has two resources and one of them already booked it will only show single resource available for this time slot. Resources are chosen based on their availability for given slot.

Body Params
string

If you're using our projects model, specify the project ID and all parameters to the endpoint will be retrieved dynamically from the project. Any additional parameters in the request are not required and will override those set in the project.

resources
array of strings

Array of resource IDs that should be included in the availability search

resources
constraints
array

Array of constraint objects that either whitelist or blacklist timespans. These constraints are dynamically applied for each resource. Please ready about constraints for reference

constraints
string
Defaults to 1 hour

How long each available time-slot should be. "Null" simply returns timeslots in dynamic intervals without a fixed length.

string
Defaults to Now

Defines the beginning of the search-space written is human language, eg. "1 day", "2 weeks" or "tomorrow"

string
Defaults to weeks

Defines the end of the search-space written is human language, eg. "1 day", "2 weeks" or "tomorrow" (max 6 months)

string

The amount of buffer time you want to pad around existing events (see note)

string
Defaults to UTC

If you want the outputted time-slots to be formatted to a particular timezone, set it with this parameter. Please note that this parameter will not affect the resource-relative timezones of the constraints. Please see our constraints section for further information.

string

Define at which time increments the time-slots should start. Please se the note

boolean

If you don't want us to round up to nearest hour (for pretty timestamps) you can set this to false

string
Defaults to exclusive

Timekit currently operate with four modes to query availability. mutual, exclusive, roundrobin_random, roundrobin_prioritized

Responses

Language
Credentials
Header
Request
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json