Skip to main content
POST
/
api
/
apps
/
marketplaceapplications
/
book
{
  "price": {},
  "confirmation": {},
  "available": true,
  "message": "<string>",
  "error_code": "<string>"
}

📆Book resource

Creates a booking for a given resource, start date and duration.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header.

Request Body

marketplace_id
string
required
The unique id of your marketplace application
location_id
string
required
The unique id of a location
resource_id
string
required
The unique id of the location to get the calendar for
start_local
string (date-time)
required
The earliest date to show bookings for. The date and time are parsed in the local time of the passed in location.
desk_id
string
The unique id of a desk defined within a resource.
duration_minutes
integer (int32)
The amount of minutes after the start_local time to show data for. Defaults to 60 minutes.
fullname
string
The full name of the customer making this booking. Required when “email” is provided.
email
string
The email of the customer making this booking. . Required when “fullname” is provided.
customer_notes
string
A note to add alongside the booking. Customers will be able to see this note.
internal_notes
string
A note to add alongside the booking. Only operators will be able to see this note.
visitors
array

Response

200

price
object
confirmation
object
available
boolean
Example: false
message
string
Example: This resource is already booked. Please choose a different start and end times.
error_code
string
Example: BOOKING_CONFLICT
Example Response
{
  "price": {
    "amount": 4.81,
    "currency": "USD"
  },
  "confirmation": {
    "confirmed": false,
    "message": null,
    "booking_id": null
  },
  "available": false,
  "message": "This resource is already booked. Please choose a different start and end times.",
  "error_code": "BOOKING_CONFLICT"
}

Example Request

curl -X POST \
  "https://spaces.nexudus.com/api/apps/marketplaceapplications/book" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'