{"_id":"5aa3f4753d5f4b003b14ef43","project":"5435693035740020002a1c1c","version":{"_id":"5435693035740020002a1c1f","__v":15,"project":"5435693035740020002a1c1c","createdAt":"2014-10-08T16:41:20.702Z","releaseDate":"2014-10-08T16:41:20.702Z","categories":["5435693035740020002a1c20","551c03c1ff892b3700d1c57a","551ca3927405910d00900a59","551cac6448564a2f0024d89e","551cb4d848564a2f0024d8a3","551cb52db7a32b3b00d1ef78","5526e2064a7ac121004c6073","5526e5147d4a4417009516b3","5526e9877d4a4417009516bb","5528362cd9e1db2d00cd924d","5580240ebe698419008f2ba2","5580a7dabe698419008f2db6","568161799de23c0d00c54750","5866c905a2cbb31900f6f1aa","5bfc066d8342500013783e0c"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"568161799de23c0d00c54750","__v":1,"pages":["568161b10ab7e40d0073f531"],"project":"5435693035740020002a1c1c","version":"5435693035740020002a1c1f","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-12-28T16:21:13.387Z","from_sync":false,"order":10,"slug":"free-busy","title":"Free Busy"},"user":"543568c135740020002a1c10","githubsync":"","__v":1,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-03-10T15:06:29.774Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"language":"json","code":"[\n    {\n      \"has_presence\": false,\n      \"space\": {\n        // Space with calendar included\n      },\n      \"busy\": [\n        {\n          \"from\": \"2018-03-10T16:00:00+0000\",\n          \"to\": \"2018-03-10T17:00:00+0000\",\n          \"events\": [\n            {\n              \"id\": \"35655033\",\n              \"series_id\": null,\n              \"recurrence_id\": \"20180310T160000Z\",\n              \"uid\": \"uuid:::at:::google.com\",\n              \"space_id\": 50,\n              \"start\": {\n                \"date_time\": \"2018-03-10T16:00:00+0000\",\n                \"time_zone\": \"America/New_York\"\n              },\n              \"end\": {\n                \"date_time\": \"2018-03-10T17:00:00+0000\",\n                \"time_zone\": \"America/New_York\"\n              },\n              \"started_at\": \"2018-03-10T16:00:00+0000\",\n              \"ended_at\": \"2018-03-10T17:00:00+0000\"\n            },\n            {\n              \"id\": \"35655054_20180310T160000Z\",\n              \"series_id\": \"35655054\",\n              \"recurrence_id\": \"20180310T160000Z\",\n              \"uid\": \"uuid@google.com\",\n              \"space_id\": 50,\n              \"start\": {\n                \"date_time\": \"2018-03-10T11:00:00-0500\",\n                \"time_zone\": \"America/New_York\"\n              },\n              \"end\": {\n                \"date_time\": \"2018-03-10T12:00:00-0500\",\n                \"time_zone\": \"America/New_York\"\n              },\n              \"started_at\": \"2018-03-10T11:00:00-0500\",\n              \"ended_at\": \"2018-03-10T12:00:00-0500\"\n            }\n          ]\n        }\n      ]\n    },\n    // More results...\n  ]","name":"","status":200}]},"method":"post","examples":{"codes":[{"code":"POST /v1.0/free-busy/spaces HTTP/1.1\nHost: api.robinpowered.com\nContent-Type: application/json\nAuthorization: Access-Token :accessToken\n\n{\n  \"scope\": {\n    \"space_ids\": [\n      50\n    ],\n    \"location_ids\": [\n    \t10\n    ]\n  },\n  \"filters\": {\n    \"amenity_ids\": [5],\n    \"include_unbookable\": false,\n    \"min_capacity\": 0,\n    \"max_capacity\": 8\n  },\n  \"view_options\": {\n    \"bounds\": {\n      \"from\": \"2018-03-07T15:30:00Z\",\n      \"to\": \"2018-03-07T17:30:00Z\",\n      \"recurrence\": [\n        \"RRULE:FREQ=DAILY;INTERVAL=3;\"\n      ],\n      \"time_zone\": \"America/New_York\"\n    },\n    \"prioritization_type\": \"flexible_time\",\n    \"merge_threshold\": \"PT30M\",\n    \"included_submodels\": [\"space.space_amenities\"]\n  },\n  \"paging_info\": {\n    \"page\": 1,\n    \"per_page\": 20\n  }\n}","language":"http"}]},"auth":"required","params":[{"_id":"5aa3f4753d5f4b003b14ef54","ref":"","in":"body","required":true,"desc":"The scope of the free busy search","default":"","type":"object","name":"scope"},{"_id":"5aa3f4753d5f4b003b14ef53","ref":"","in":"body","required":false,"desc":"The IDs of locations to include in free busy results.","default":"","type":"array_int","name":"scope.location_ids"},{"_id":"5aa3f4753d5f4b003b14ef52","ref":"","in":"body","required":false,"desc":"The IDs of spaces to include in free busy results.","default":"","type":"array_int","name":"scope.space_ids"},{"_id":"5aa3f4753d5f4b003b14ef51","ref":"","in":"body","required":false,"desc":"The IDs of levels to include in free busy results.","default":"","type":"array_int","name":"scope.level_ids"},{"_id":"5aa3f4753d5f4b003b14ef50","ref":"","in":"body","required":false,"desc":"Used to filter our spaces within the scope based on various criteria.","default":"","type":"object","name":"filters"},{"_id":"5aa3f4753d5f4b003b14ef4f","ref":"","in":"body","required":false,"desc":"A search query to filter the results by.","default":"","type":"string","name":"filters.query"},{"_id":"5aa3f4753d5f4b003b14ef4e","ref":"","in":"body","required":false,"desc":"The minimum capacity of spaces to return.","default":"","type":"int","name":"filters.min_capacity"},{"_id":"5aa3f4753d5f4b003b14ef4d","ref":"","in":"body","required":false,"desc":"The maximum capacity of spaces to return.","default":"","type":"int","name":"filters.max_capacity"},{"_id":"5aa3f4753d5f4b003b14ef4c","ref":"","in":"body","required":false,"desc":"An array of space types to filter by.","default":"","type":"array_string","name":"filters.types"},{"_id":"5aa3f4753d5f4b003b14ef4b","ref":"","in":"body","required":false,"desc":"Filters for spaces that contain all of the given amenities.","default":"","type":"array_int","name":"filters.amenity_ids"},{"_id":"5aa3f4753d5f4b003b14ef4a","ref":"","in":"body","required":false,"desc":"Whether to include on-demand spaces, which cannot be reserved ahead of schedule.","default":"false","type":"boolean","name":"filters.include_in_demand"},{"_id":"5aa3f4753d5f4b003b14ef49","ref":"","in":"body","required":false,"desc":"Filters out spaces that aren't bookable by the current user.","default":"","type":"boolean","name":"filters.include_unbookable"},{"_id":"5aa3f4753d5f4b003b14ef48","ref":"","in":"body","required":true,"desc":"Options that help shape the resulting view, such as the time bounds of the free/busy search and sub-resources that should be included in the result.","default":"","type":"object","name":"view_options"},{"_id":"5aa3f4753d5f4b003b14ef47","ref":"","in":"body","required":true,"desc":"The bounds for the free-busy search.","default":"","type":"object","name":"view_options.bounds"},{"_id":"5aa3f4753d5f4b003b14ef46","ref":"","in":"body","required":true,"desc":"ISO8601 DateTime representing the lower bound for displaying busy information.","default":"","type":"datetime","name":"view_options.bounds.from"},{"_id":"5aa3f4753d5f4b003b14ef45","ref":"","in":"body","required":true,"desc":"ISO8601 DateTime representing the upper bound for displaying busy information.","default":"","type":"datetime","name":"view_options.bounds.to"},{"_id":"5aa3f4753d5f4b003b14ef44","ref":"","in":"body","required":false,"desc":"An array of iCal recurrence values, such as RRULE. Free busy bounds will be expanded for these options for up to 15 recurrences.","default":"","type":"array_string","name":"view_options.bounds.recurrence"},{"_id":"5aa3f72000aee800247030b6","ref":"","in":"body","required":false,"desc":"The IANA time zone to use when expanding recurrence.","default":"","type":"string","name":"view_options.bounds.time_zone"},{"_id":"5aa3f72000aee800247030b5","ref":"","in":"body","required":false,"desc":"Either `specific_time` or `flexible_time`. Specific time orders results by prioritizing spaces available for the exact time window given. Flexible time prioritizes spaces that are available for the requested duration at some point within the time bounds.","default":"\"flexible_time\"","type":"string","name":"view_options.prioritization_type"},{"_id":"5aa3f72000aee800247030b4","ref":"","in":"body","required":false,"desc":"An ISO-8601 duration (eg. `PT30M`) representing a time duration that must be available to create an availability. This may be used alongside `flexible_time`.","default":"PT30M","type":"string","name":"view_options.merge_threshold"},{"_id":"5aa3f72000aee800247030b3","ref":"","in":"body","required":false,"desc":"An array of submodels to include in results, such as `space.calendar` or `space.space_amenities`.","default":"","type":"array_string","name":"view_options.included_submodels"},{"_id":"5aa3f72000aee800247030b2","ref":"","in":"body","required":false,"desc":"","default":"","type":"object","name":"paging_info"},{"_id":"5aa3f72000aee800247030b1","ref":"","in":"body","required":false,"desc":"The page number","default":"1","type":"int","name":"paging_info.page"},{"_id":"5aa3f72000aee800247030b0","ref":"","in":"body","required":false,"desc":"The number of results per page.","default":"10","type":"int","name":"paging_info.per_page"}],"url":"/free-busy/spaces"},"isReference":true,"order":1,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Use this endpoint to get multiple schedules\",\n  \"body\": \"This is the best endpoint for fetching more than one space schedule at a time. It's been built with queries in mind, and will give the best performance for your app.\"\n}\n[/block]\nYou must include either `location_ids` or `space_ids` in your request. Everything else is optional.\n\nThe free-busy endpoint is great for searching schedules between spaces, locations, and associated meta. If you see the word \"filter\" in a parameter above, it implies that non-matching results are omitted entirely, vs. just ordered lower in the results.\n\nBy default, this endpoint will filter out specialty (e.g `kitchen`) [space types](http://docs.robinpowered.com/docs/space#space-types) unless explicitly provided. You can manually override via the `types` param. Types returned by default are:\n\n* `null` (No space type assigned yet)\n* `breakout`\n* `call`\n* `conference`\n* `meeting`\n* `office`\n* `study_room`","excerpt":"Search space availability based on multiple parameters and get back results in a \"Best Fit\" order","slug":"free-busyspaces","type":"endpoint","title":"/free-busy/spaces"}

post/free-busy/spaces

Search space availability based on multiple parameters and get back results in a "Best Fit" order

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

scope:
required
object
The scope of the free busy search
scope.location_ids:
array of integers
The IDs of locations to include in free busy results.
scope.space_ids:
array of integers
The IDs of spaces to include in free busy results.
scope.level_ids:
array of integers
The IDs of levels to include in free busy results.
filters:
object
Used to filter our spaces within the scope based on various criteria.
filters.query:
string
A search query to filter the results by.
filters.min_capacity:
integer
The minimum capacity of spaces to return.
filters.max_capacity:
integer
The maximum capacity of spaces to return.
filters.types:
array of strings
An array of space types to filter by.
filters.amenity_ids:
array of integers
Filters for spaces that contain all of the given amenities.
filters.include_in_demand:
booleanfalse
Whether to include on-demand spaces, which cannot be reserved ahead of schedule.
filters.include_unbookable:
boolean
Filters out spaces that aren't bookable by the current user.
view_options:
required
object
Options that help shape the resulting view, such as the time bounds of the free/busy search and sub-resources that should be included in the result.
view_options.bounds:
required
object
The bounds for the free-busy search.
view_options.bounds.from:
required
datetime
ISO8601 DateTime representing the lower bound for displaying busy information.
view_options.bounds.to:
required
datetime
ISO8601 DateTime representing the upper bound for displaying busy information.
view_options.bounds.recurrence:
array of strings
An array of iCal recurrence values, such as RRULE. Free busy bounds will be expanded for these options for up to 15 recurrences.
view_options.bounds.time_zone:
string
The IANA time zone to use when expanding recurrence.
view_options.prioritization_type:
string"flexible_time"
Either `specific_time` or `flexible_time`. Specific time orders results by prioritizing spaces available for the exact time window given. Flexible time prioritizes spaces that are available for the requested duration at some point within the time bounds.
view_options.merge_threshold:
stringPT30M
An ISO-8601 duration (eg. `PT30M`) representing a time duration that must be available to create an availability. This may be used alongside `flexible_time`.
view_options.included_submodels:
array of strings
An array of submodels to include in results, such as `space.calendar` or `space.space_amenities`.
paging_info:
object
paging_info.page:
integer1
The page number
paging_info.per_page:
integer10
The number of results per page.

Examples


Result Format


Documentation

[block:callout] { "type": "success", "title": "Use this endpoint to get multiple schedules", "body": "This is the best endpoint for fetching more than one space schedule at a time. It's been built with queries in mind, and will give the best performance for your app." } [/block] You must include either `location_ids` or `space_ids` in your request. Everything else is optional. The free-busy endpoint is great for searching schedules between spaces, locations, and associated meta. If you see the word "filter" in a parameter above, it implies that non-matching results are omitted entirely, vs. just ordered lower in the results. By default, this endpoint will filter out specialty (e.g `kitchen`) [space types](http://docs.robinpowered.com/docs/space#space-types) unless explicitly provided. You can manually override via the `types` param. Types returned by default are: * `null` (No space type assigned yet) * `breakout` * `call` * `conference` * `meeting` * `office` * `study_room`

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}