Cookies help us deliver our services. By using our services, you agree to our use of cookies.
GET https://:subdomain.cobot.me/api/bookings

This returns a list of all bookings for a space overlapping the given time period.

Authentication required:
yes, additionally user must be a space member or admin
Scope required
read_bookings
Parameter required
from and to – the time period to retrieve the bookings for
Optional Parameters
Pass limit to limit the no. of returned bookings.
GET https://co-up.cobot.me/api/bookings?from=2012-04-12 12:00 +0000&to=2012-04-18 18:00 +0000

Response:

[{
  "from": "2012/01/01 12:00:00 +0000",
  "to": "2012/01/01 14:00:00 +0000",
  "tax_rate": "20.0",
  "title": "test booking",
  "resource": {"name": "Meeting Room", "id": "123"},
  "price": 10.0,
  "currency": "EUR",
  "accounting_code": "B1",
  "membership": {
    "id": "123498y452346",
    "name": "John Doe"},
  "url": "https://co-up.cobot.me/api/bookings/20723075",
  "id": "20723075",
  "can_change": true,
  "comments": "coffee please",
  "units": 1
}]

Please note that members can only see their own comments, admins can see all comments.

GET https://:subdomain.cobot.me/api/resources/:resource_id/bookings

This returns a list of all bookings for a space and a resource overlapping the given time period.

Authentication required:
yes, additionally user must be a space member or admin
Scope required
read_bookings
Parameter required
from and to – the time period to retrieve the bookings for
GET https://co-up.cobot.me/api/resources/12345/bookings?from=2012-04-12 12:00 +0000&to=2012-04-18 18:00 +0000

Response:

[{
  "id": "d58b612aaa62619aae546dd336587eb2",
  "from": "2012/04/12 12:00:00 +0000",
  "to": "2012/04/12 18:00:00 +0000",
  "tax_rate": "20.0",
  "title": "test booking",
  "resource": {"name": "Meeting Room", "id": "12345"},
  "price": 10.0,
  "currency": "EUR",
  "accounting_code": "B1",
  "membership": {
    "id": "123498y452346",
    "name": "John Doe"},
  "url": "https://co-up.cobot.me/api/bookings/20723075",
  "id": "20723075",
  "can_change": true,
  "comments": "coffee please",
  "units": 1
}]
GET https://:subdomain.cobot.me/api/membership/bookings

This returns a list of all bookings for a space and a membership overlapping the given time period.

Authentication required:
yes, additionally user must be a member
Scope required
read_bookings
Parameter required
from and to – the time period to retrieve the bookings for
GET https://co-up.cobot.me/api/memberships/bookings?from=2012-04-12 12:00 +0000&to=2012-04-18 18:00 +0000

Response:

[{
  "id": "d58b612aaa62619aae546dd336587eb2",
  "from": "2012/04/12 12:00:00 +0000",
  "to": "2012/04/12 18:00:00 +0000",
  "tax_rate": "20.0",
  "title": "test booking",
  "resource": {"name": "Meeting Room", "id": "12345"},
  "price": 10.0,
  "currency": "EUR",
  "accounting_code": "B1",
  "membership": {
    "id": "123498y452346",
    "name": "John Doe"},
  "url": "https://co-up.cobot.me/api/bookings/20723075",
  "id": "20723075",
  "can_change": true,
  "comments": "coffee please",
  "units": 1
}]
GET https://:subdomain.cobot.me/api/memberships/:membership_id/bookings

This returns a list of all bookings for a space and a membership overlapping the given time period.

Authentication required:
yes, additionally user must be a space admin
Scope required
read_bookings
Parameter required
from and to – the time period to retrieve the bookings for
GET https://co-up.cobot.me/api/memberships/123498y452346/bookings?from=2012-04-12 12:00 +0000&to=2012-04-18 18:00 +0000

Response:

[{
  "id": "d58b612aaa62619aae546dd336587eb2",
  "from": "2012/04/12 12:00:00 +0000",
  "to": "2012/04/12 18:00:00 +0000",
  "tax_rate": "20.0",
  "title": "test booking",
  "resource": {"name": "Meeting Room", "id": "12345"},
  "price": 10.0,
  "currency": "EUR",
  "accounting_code": "B1",
  "membership": {
    "id": "123498y452346",
    "name": "John Doe"},
  "url": "https://co-up.cobot.me/api/bookings/20723075",
  "id": "20723075",
  "can_change": true,
  "comments": "coffee please",
  "units": 1
}]
GET https://:subdomain.cobot.me/api/membership/bookings/recent

This returns a list of not yet invoiced bookings for a member (does not include free bookings).

Authentication required:
yes, additionally user must be a space member
Scope required
read_bookings
GET https://co-up.cobot.me/api/membership/bookings/recent

Response:

[{
  "from": "2012/01/01 12:00:00 +0000",
  "to": "2012/01/01 14:00:00 +0000",
  "tax_rate": "20.0",
  "title": "test booking",
  "resource": {"name": "Meeting Room", "id": "123"},
  "price": 10.0,
  "currency": "EUR",
  "accounting_code": "B1",
  "membership": {
    "id": "123498y452346",
    "name": "John Doe"},
  "url": "https://co-up.cobot.me/api/bookings/20723075",
  "id": "20723075",
  "can_change": false,
  "comments": "tea please",
  "units": 1
}]
GET https://:subdomain.cobot.me/api/membership/bookings/upcoming

This returns a list of upcoming bookings for a member.

Authentication required:
yes, additionally user must be a space member
Scope required
read_bookings
GET https://co-up.cobot.me/api/membership/bookings/upcoming

Response:

[{
  "from": "2012/01/01 12:00:00 +0000",
  "to": "2012/01/01 14:00:00 +0000",
  "tax_rate": "20.0",
  "title": "test booking",
  "resource": {"name": "Meeting Room", "id": "123"},
  "price": 10.0,
  "currency": "EUR",
  "accounting_code": "B1",
  "membership": {
    "id": "123498y452346",
    "name": "John Doe"},
  "url": "https://co-up.cobot.me/api/bookings/20723075",
  "id": "20723075",
  "can_change": true,
  "comments": "tea please",
  "units": 1
}]

GET https://:subdomain.cobot.me/api/bookings/:booking_id

This returns a single booking.

Authentication required:
yes, additionally user must be a space member or admin
Scope required
read_bookings
GET https://co-up.cobot.me/api/bookings/20723075

Response:

{
  "from": "2012/01/01 12:00:00 +0000",
  "to": "2012/01/01 14:00:00 +0000",
  "tax_rate": "20.0",
  "title": "test booking",
  "resource": {"name": "Meeting Room", "id": "123"},
  "price": 10.0,
  "currency": "EUR",
  "accounting_code": "B1",
  "membership": {
    "id": "123498y452346",
    "name": "John Doe"},
  "url": "https://co-up.cobot.me/api/bookings/20723075",
  "id": "20723075",
  "can_change": true,
  "comments": "tea please",
  "units": 1
}
POST https://:subdomain.cobot.me/api/resources/:resource_id/bookings

This books a resource. Obtain the URL from the list of resources (see resources section).

Authentication required:
yes, additionally user must be a space member or admin
Scope required
write_bookings
POST https://co-up.cobot.me/api/resources/230847/bookings

Body:

{
  "from": "2012-01-01 12:00 +0000",
  "to": "2012-01-01 14:00 +0000",
  "title": "test booking",
  "membership_id": "123498y452346",
  "comments": "tea please",
  "units": 1
}

Response:

{
  "from": "2012/01/01 12:00:00 +0000",
  "to": "2012/01/01 14:00:00 +0000",
  "tax_rate": "20.0",
  "title": "test booking",
  "resource": {"name": "Meeting Room", "id": "123"},
  "price": 10.0,
  "currency": "EUR",
  "accounting_code": null,
  "membership": {
    "id": "123498y452346",
    "name": "John Doe"},
  "url": "https://co-up.cobot.me/api/bookings/20723075",
  "id": "20723075",
  "can_change": true,
  "comments": "tea please",
  "units": 1
}
title
optional
membership_id
The id of the member to book for – only applicable when booking as space admin, optional
url
The URL of the booking – used to update/delete the booking
price
Admins can optionally pass in a price if they want to override the automatically calculated price
validate_times_for_admin
Admins can usually create bookings for any time. When setting `validate_times_for_admin` to `true`, the booking is checked against the min/max `booking_duration`, `booking_times` attribute and cannot be in the past.
units
If a resource has more than one unit you can say how many to book here. Price or Booking Credit usage is multiplied by the number of booked units.

Returns 201 and the booking as JSON on success. Returns 422 and the errors as JSON if the booking was invalid.

PUT https://:subdomain.cobot.me/api/bookings/:booking_id

This updates a booking. Obtain the URL from the list of bookings or when creating the booking.

Authentication required:
yes, additionally user must be a space member or admin. Members can only update their own bookings and only those in the future.
Scope required
write_bookings

URL: PUT https://co-up.cobot.me/bookings/23048762375

Body:

{
  "from": "2012-01-1 12:00 +0000",
  "to": "2012-01-01 14:00 +0000",
  "title": "test booking",
  "membership_id": "123498y452346",
  "resource_id": "12345",
  "comments": "tea please",
  "units": 1
}

Response:

{
  "from": "2012/01/01 12:00:00 +0000",
  "to": "2012/01/01 14:00:00 +0000",
  "tax_rate": "20.0",
  "title": "test booking",
  "resource": {
    "name": "Meeting Room",
    "id": "123"
  },
  "price": 10.0,
  "currency": "EUR",
  "accounting_code": "B1",
  "membership":
    {
      "id": "123498y452346",
      "name": "John Doe"
    },
  "url": "https://co-up.cobot.me/api/bookings/23048762375",
  "id": "20723075",
  "can_change": true,
  "comments": "tea please",
  "units": 1
}
title
optional
membership_id
The id of the member to book for – only applicable when booking as space admin, optional
url
The URL of the booking – used to update/delete the booking
price
Admins can optionally pass in a price if they want to override the automatically calculated price
validate_times_for_admin
Admins can usually create bookings for any time. When setting `validate_times_for_admin` to `true`, the booking is checked against the min/max `booking_duration`, `booking_times` attribute and cannot be in the past.
units
If a resource has more than one unit you can say how many to book here. Price or Booking Credit usage is multiplied by the number of booked units.

Returns 200 and the booking as JSON on success. Returns 422 and the errors as JSON if the booking was invalid.

DELETE https://:subdomain.cobot.me/api/bookings/32947346

This deletes a booking. The URL of a booking can be obtained either from the response when creating it or from listing all bookings.

Authentication required:
yes, additionally user must be a space member or admin. Members can only delete their own bookings and only those in the future.
Scope required
write_bookings
DELETE https://co-up.cobot.me/api/bookings/32947346

Returns an empty 204 response.

back to index