{"_id":"5bfc0692638e4600568da54a","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":"5bfc066d8342500013783e0c","project":"5435693035740020002a1c1c","version":"5435693035740020002a1c1f","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-11-26T14:42:53.016Z","from_sync":false,"order":9,"slug":"desks","title":"Desks"},"user":"543568c135740020002a1c10","__v":4,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-11-26T14:43:30.481Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[{"code":"POST /v1.0/seats/1/reservations HTTP/1.1\nHost: api.robinpowered.com\nContent-Type: application/json\nAuthorization: Access-Token :accessToken\n\n{\n\t\"type\": \"assigned\",\n  \"start\": {\n  \t\"date_time\": \"2019-01-01T00:00:00Z\",\n  \t\"time_zone\": \"America/New_York\"\n  },\n  \"end\": {\n  \t\"date_time\": \"2019-03-01T00:00:00Z\",\n  \t\"time_zone\": \"America/New_York\"\n  },\n  \"reservee\": {\n  \t\"email\": \"john.doe:::at:::robinpowered.com\"\n \t},\n  \"reserver_id\": 42\n}","language":"http"}]},"settings":"","results":{"codes":[{"name":"","code":"{\n  \"meta\": {\n    \"status_code\": 201,\n    \"status\": \"CREATED\",\n    \"message\": \"\",\n    \"more_info\": {}\n  },\n  \"data\": {\n    \"id\": \"1087747058636424289\",\n    \"group_seat_reservation_id\": null,\n    \"seat_id\": 1,\n    \"reserver_id\": 42,\n    \"type\": \"assigned\",\n    \"title\": null,\n    \"start\": {\n      \"date_time\": \"2019-01-01T00:00:00Z\",\n      \"time_zone\": \"America/New_York\"\n    },\n    \"end\": {\n      \"date_time\": \"2019-03-01T00:00:00Z\",\n      \"time_zone\": \"America/New_York\"\n    },\n    \"recurrence\": null,\n    \"series_id\": null,\n    \"recurrence_id\": null,\n    \"created_at\": \"2018-11-23T19:19:14+0000\",\n    \"updated_at\": \"2018-11-23T19:19:14+0000\",\n    \"reservee\": {\n      \"email\": \"john.doe@robinpowered.com\",\n      \"user_id\": 42\n    },\n    \"confirmation\": null\n  }\n}","language":"json","status":200}]},"auth":"required","params":[{"_id":"551c0ce223a1ee190034d100","ref":"","in":"path","required":true,"desc":"The ID of the seat (desk)","default":"","type":"int","name":"id"},{"_id":"551cb06448564a2f0024d8a1","ref":"","in":"body","required":false,"desc":"A title for the reservation.","default":"","type":"string","name":"title"},{"_id":"5bfc0b0be2bbba001896c4d1","ref":"","in":"body","required":true,"desc":"The type of reservation, either `assigned`, `hot`, or `hoteled`.","default":"","type":"string","name":"type"},{"_id":"551ca58035f9812f008ccd33","ref":"","in":"body","required":true,"desc":"A composite datetime / timezone object that represents the start of the reservation.","default":"","type":"object","name":"start"},{"_id":"5866bee13e21a72d0029a29c","ref":"","in":"body","required":true,"desc":"An ISO-8601 timestamp representing the start of the reservation.","default":"","type":"datetime","name":"start.date_time"},{"_id":"5866c023619bb21900445196","ref":"","in":"body","required":true,"desc":"A valid IANA timezone identifier, such as `America/New_York`.","default":"","type":"string","name":"start.time_zone"},{"_id":"551ca58035f9812f008ccd32","ref":"","in":"body","required":false,"desc":"A composite datetime / timezone object that represents the start of the reservation. When not given, the reservation is considered to have no end date. This is required for `hot` and `hoteled` reservations.","default":"","type":"object","name":"end"},{"_id":"5866c023619bb21900445195","ref":"","in":"body","required":true,"desc":"An ISO-8601 timestamp representing the end of the reservation.","default":"","type":"datetime","name":"end.date_time"},{"_id":"5866c023619bb21900445194","ref":"","in":"body","required":true,"desc":"A valid IANA timezone identifier, such as `America/New_York`.","default":"","type":"string","name":"end.time_zone"},{"_id":"5866c0c9a2cbb31900f6f1a4","ref":"","in":"body","required":true,"desc":"The person that the reservation is for.","default":"","type":"object","name":"reservee"},{"_id":"5866c2483e21a72d0029a2a1","ref":"","in":"body","required":false,"desc":"The email address of the reservee. Required if `user_id` is not given.","default":"","type":"string","name":"reservee.email"},{"_id":"5866c2483e21a72d0029a2a0","ref":"","in":"body","required":false,"desc":"The user ID of the reservee. Required if `email` is not given.","default":"","type":"int","name":"reservee.user_id"},{"_id":"5bfc0b0be2bbba001896c4d0","ref":"","in":"body","required":false,"desc":"The ID of the user reserving the seat. Required when authenticating as a non-user (eg. when using an organization token).","default":"","type":"int","name":"reserver_id"}],"url":"/seats/:id/reservations"},"isReference":false,"order":0,"body":"Creates a reservation for a desk (seat). Reservations may not overlap with existing reservations for the same seat. Each reservation type has different use-cases and rules:\n\n`assigned` An assigned seat. Optionally may have no end date, representing a permanent assignment. \n`hot` An ad-hoc, single-day booking. Must have an end time that is the same calendar day as the start time. \n`hoteled` A reservation booked in advance that can be multi-day. Must have an end time.","excerpt":"Reserve a seat","slug":"reserve-desks","type":"endpoint","title":"/seats/:id/reservations"}

post/seats/:id/reservations

Reserve a seat

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
required
integer
The ID of the seat (desk)

Body Params

title:
string
A title for the reservation.
type:
required
string
The type of reservation, either `assigned`, `hot`, or `hoteled`.
start:
required
object
A composite datetime / timezone object that represents the start of the reservation.
start.date_time:
required
datetime
An ISO-8601 timestamp representing the start of the reservation.
start.time_zone:
required
string
A valid IANA timezone identifier, such as `America/New_York`.
end:
object
A composite datetime / timezone object that represents the start of the reservation. When not given, the reservation is considered to have no end date. This is required for `hot` and `hoteled` reservations.
end.date_time:
required
datetime
An ISO-8601 timestamp representing the end of the reservation.
end.time_zone:
required
string
A valid IANA timezone identifier, such as `America/New_York`.
reservee:
required
object
The person that the reservation is for.
reservee.email:
string
The email address of the reservee. Required if `user_id` is not given.
reservee.user_id:
integer
The user ID of the reservee. Required if `email` is not given.
reserver_id:
integer
The ID of the user reserving the seat. Required when authenticating as a non-user (eg. when using an organization token).

Examples


Result Format


Documentation

Creates a reservation for a desk (seat). Reservations may not overlap with existing reservations for the same seat. Each reservation type has different use-cases and rules: `assigned` An assigned seat. Optionally may have no end date, representing a permanent assignment. `hot` An ad-hoc, single-day booking. Must have an end time that is the same calendar day as the start time. `hoteled` A reservation booked in advance that can be multi-day. Must have an end time.

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