{"_id":"5866ba578381732d00cc08d3","category":{"_id":"5526e2064a7ac121004c6073","project":"5435693035740020002a1c1c","pages":["5526e2674a7ac121004c6075","5526e439e69c7d0d00047e57"],"__v":2,"version":"5435693035740020002a1c1f","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-04-09T20:33:10.475Z","from_sync":false,"order":6,"slug":"locations","title":"Locations"},"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"},"project":"5435693035740020002a1c1c","parentDoc":null,"user":"543568c135740020002a1c10","__v":0,"githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-12-30T19:49:43.879Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","examples":{"codes":[{"code":"POST /v1.0/locations/10/spaces HTTP/1.1\nHost: api.robinpowered.com\nContent-Type: application/json\nAuthorization: Access-Token :accessToken\n\n{\n\t\"name\": \"Conference Room\",\n\t\"description\": \"The main conference room\",\n\t\"image\": \"https://example.com/conferenceroom.jpg\",\n\t\"capacity\": 12,\n\t\"type\": \"conference\",\n\t\"is_accessible\": true\n}","language":"http"}]},"method":"post","results":{"codes":[{"code":"{\n  \"meta\": {\n    \"status_code\": 201,\n    \"status\": \"CREATED\",\n    \"message\": \"\",\n    \"more_info\": {}\n  },\n  \"data\": {\n    \"id\": 17935,\n    \"location_id\": 10,\n    \"name\": \"Conference Room\",\n    \"description\": \"The main conference room\",\n    \"image\": \"https://example.com/conferenceroom.jpg\",\n    \"discovery_radius\": 5,\n    \"capacity\": 12,\n    \"type\": \"conference\",\n    \"is_accessible\": true,\n    \"is_disabled\": false,\n    \"updated_at\": \"2016-12-30T19:45:16+0000\",\n    \"created_at\": \"2016-12-30T19:45:16+0000\",\n  }\n}","language":"json","status":200,"name":""}]},"auth":"required","params":[{"_id":"5526eae4d7ea1c2300e58a5a","ref":"","in":"path","required":true,"desc":"The ID of the location","default":"","type":"int","name":"id"},{"_id":"5866ba578381732d00cc08d9","ref":"","in":"body","required":true,"desc":"The name of the space.","default":"","type":"string","name":"name"},{"_id":"5866ba578381732d00cc08d8","ref":"","in":"body","required":false,"desc":"The space's description.","default":"","type":"string","name":"description"},{"_id":"5866ba578381732d00cc08d7","ref":"","in":"body","required":false,"desc":"A URL containing a photo of the space.","default":"","type":"string","name":"image"},{"_id":"5866ba578381732d00cc08d6","ref":"","in":"body","required":false,"desc":"The maximum capacity of the space.","default":"","type":"int","name":"capacity"},{"_id":"5866ba578381732d00cc08d5","ref":"","in":"body","required":false,"desc":"The space type. Must be a valid type from the list that can be found on the space resource page.","default":"","type":"string","name":"type"},{"_id":"5866ba578381732d00cc08d4","ref":"","in":"body","required":false,"desc":"Whether the space meets accessibility requirements for the disabled. A `false` value means that it is unspecified, not that it does not meet the criteria.","default":"false","type":"boolean","name":"is_accessible"}],"url":"/locations/:id/spaces"},"isReference":true,"order":3,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Optional Includes\"\n}\n[/block]\nYou can optionally include each space's calendar in the response via `/location/:id/spaces?include=calendar`.\n\nThe space `state` entity is includable as well with `?include=state`:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"availability\\\": \\\"available\\\",\\n  \\\"present\\\": 1,\\n  \\\"next_busy_change\\\": \\\"2016-11-14T11:30:00+0000\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe `next_busy_change` describes the next time when the space will transition from available to busy, or vice versa. If there are no busy changes in the near future, this calue may be `null`.","excerpt":"Create a new space in the location.","slug":"create-space","type":"endpoint","title":"/locations/:id/spaces"}

post/locations/:id/spaces

Create a new space in the location.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
required
integer
The ID of the location

Body Params

name:
required
string
The name of the space.
description:
string
The space's description.
image:
string
A URL containing a photo of the space.
capacity:
integer
The maximum capacity of the space.
type:
string
The space type. Must be a valid type from the list that can be found on the space resource page.
is_accessible:
booleanfalse
Whether the space meets accessibility requirements for the disabled. A `false` value means that it is unspecified, not that it does not meet the criteria.

Examples


Result Format


Documentation

[block:api-header] { "type": "basic", "title": "Optional Includes" } [/block] You can optionally include each space's calendar in the response via `/location/:id/spaces?include=calendar`. The space `state` entity is includable as well with `?include=state`: [block:code] { "codes": [ { "code": "{\n \"availability\": \"available\",\n \"present\": 1,\n \"next_busy_change\": \"2016-11-14T11:30:00+0000\"\n}", "language": "json" } ] } [/block] The `next_busy_change` describes the next time when the space will transition from available to busy, or vice versa. If there are no busy changes in the near future, this calue may be `null`.

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 }}