Resources API
Table of Contents
- Overview
- Data Structure
- Reservable Object
- Endpoints
- List Resources
- Get Single Resource
- Create Resource
- Update Resource
Overview
Resources in QReserve are known at the API level as "reservables" and represent anything in QReserve you can reserve, request, register for, or search for within a site. Resources have a plethora of options and fields that can be viewed and modified.
In most situations, try performing the action in the QReserve UI and observing the generated JSON request and responses in your browser's developer tools to determine how fields are used and accessed. This documentation is a partial representation that will be continually updated.
Data Structure
Reservable Object
{
"reservable_id": "string",
"name": "string",
...
}
Note: The full reservable object has many more fields, which can be viewed by using the GET single reservable endpoint with the
dump=true
parameter.
Endpoints
List Resources
GET /reservables
Retrieves a list of resources (reservables) for a site.
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
site_id |
string | Required | ID of the site to retrieve resources from |
limit |
integer | null |
Number of results to return |
offset |
integer | null |
Offset row to start at |
attribs |
string | null |
Return specific attributes separated by + symbols (e.g., name+disclaimer ) |
alltag[] |
string | null |
Can be added more than once to filter on all tags provided |
Examples
Retrieve all resources for a site:
GET /reservables?site_id={site_id}
Retrieve specific properties (faster):
GET /reservables?site_id={site_id}&attribs=name+disclaimer
Response
Success Response (200 OK)
Returns a list of reservable objects matching the query parameters.
Error Responses
400 Bad Request
: Invalid request or validation error401 Unauthorized
: Authentication failed
Get Single Resource
GET /reservables/{reservable_id}
Retrieves a specific resource by its ID.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
reservable_id |
string | Yes | ID of the resource to retrieve |
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
dump |
boolean | false |
When set to true , returns all properties of the resource |
Example
Retrieve all properties of a resource:
GET /reservables/{reservable_id}?dump=true
Response
Success Response (200 OK)
Returns a reservable object.
Error Responses
400 Bad Request
: Invalid request or validation error401 Unauthorized
: Authentication failed404 Not Found
: Resource with the specified ID does not exist
Create Resource
POST /reservables
Creates a new resource.
Request Body
Refer to the Update Resource section for field details. Must include a site_id
value when creating.
Response
Success Response (200 OK)
Returns the newly created reservable object.
Error Responses
400 Bad Request
: Invalid request or validation error401 Unauthorized
: Authentication failed403 Forbidden
: User does not have permission to create resources
Update Resource
POST /reservables/{reservable_id}/modify
Updates an existing resource. All fields are optional when updating a reservable and any unspecified field will remain unchanged.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
reservable_id |
string | Yes | ID of the resource to update |
Request Body
Main Fields
Field | Type | Description |
---|---|---|
site_id |
string | ID of the site this resource belongs to |
units_consumable |
boolean | Whether the resource units are consumable |
name |
string | Name of the resource |
reservable_type |
string | Type of reservable |
description |
string | Description of the resource |
disclaimer |
string | Disclaimer text for the resource |
grant_agency |
string | Grant agency associated with the resource |
tracking_number |
string | Tracking number for the resource |
units |
integer | Number of units available |
units_name |
string | Name for the units |
units_mode |
string | Mode for units. Allowed values: 'numbered', 'named' |
reservation_unit_limit |
integer | Minimum value: 1 |
anonymous_reservations |
boolean | Whether anonymous reservations are allowed |
imageurl |
string | URL for the resource image |
user_visible_reservation_details |
boolean | Whether reservation details are visible to users |
hidden_to_cannot_reserve_users |
boolean | Whether hidden to users who cannot reserve |
nolist_to_cannot_reserve_users |
boolean | Whether not listed to users who cannot reserve |
nolist_to_everyone |
boolean | Whether not listed to everyone |
altnames |
array of strings | Alternative names for the resource |
class |
string | Resource class |
auto_checkin |
boolean | Whether auto check-in is enabled |
auto_checkout_delay |
integer | Delay for auto checkout |
enable_admin_checkin |
boolean | Whether admin check-in is enabled |
enable_app_checkin |
boolean | Whether app check-in is enabled |
enable_late_checkin |
boolean | Whether late check-in is enabled |
guest_only_checkin |
boolean | Whether only guests can check in |
enable_end_early |
boolean | Whether ending early is enabled |
checkin_before_window |
integer | Window for checking in before reservation |
checkout_after_window |
integer | Window for checking out after reservation |
default_reservation_duration |
integer | Default duration for reservations |
exclude_from_activity_report |
boolean | Whether to exclude from activity reports |
exclude_from_site_calendar |
boolean | Whether to exclude from site calendar |
keywords |
string or array | Keywords for the resource |
sku |
string | SKU for the resource |
qrcode_booking |
boolean | Whether QR code booking is enabled |
qrcode_custom |
string | Custom QR code |
usergroups |
array of integers | User group IDs |
usergroups_by_name |
array of strings | User group names |
tags |
array of strings | Tags for the resource |
training |
array of strings | Training requirements |
for_sale |
boolean | Whether the resource is for sale |
searchable |
boolean | Whether the resource is searchable |
website |
string | Website URL |
externalbookingwebsite |
string | External booking website URL |
barcode |
string | Barcode for the resource |
anyapprovers |
boolean | Whether any approvers can approve |
hide_approvals |
boolean | Whether to hide approvals |
hide_availability_on_site_page |
boolean | Whether to hide availability on site page |
hide_availability_units_on_site_page |
boolean | Whether to hide availability units on site page |
auto_new_reservation |
boolean | Whether to auto create new reservations |
loanable |
boolean | Whether the resource is loanable |
weekly_blocks_mode |
string | Mode for weekly blocks |
autocancel_window |
integer | Window for auto-cancellation |
autocancel_invoiced_automatically_window |
integer | Window for auto-cancellation of invoiced reservations |
autodeny_window |
integer | Window for auto-denial |
future_loans |
boolean | Whether future loans are allowed |
recurring_reservations |
integer | Setting for recurring reservations |
overdue_notice_delay |
integer | Delay for overdue notices |
returnable |
boolean | Whether the resource is returnable |
reservation_email_message |
string | Email message for reservations |
reservation_denied_email_message |
string | Email message for denied reservations |
reservation_approved_email_message |
string | Email message for approved reservations |
reservation_cancelled_email_message |
string | Email message for cancelled reservations |
reservation_returned_email_message |
string | Email message for returned reservations |
loan_duration_num |
integer | Duration number for loans |
loan_duration_unit |
string | Duration unit for loans |
buffer_before |
integer | Buffer time before reservations |
show_calendar |
boolean | Whether to show calendar |
show_calendar_links_to_all_users_regardless |
boolean | Whether to show calendar links to all users |
custom_reserve_button_text |
string | Custom text for reserve button |
cancel_message |
string | Message for cancellations |
allow_accessory_users |
boolean | Whether to allow accessory users |
default_calendar_view |
string | Default view for calendar |
allow_unauthenticated_actual_usage |
boolean | Whether to allow unauthenticated actual usage |
icalfeedurl |
string | URL for iCal feed |
icalfeed_show_summary |
boolean | Whether to show summary in iCal feed |
can_only_reserve_with_related |
boolean | Whether can only reserve with related resources |
is_addon |
boolean | Whether resource is an addon |
is_addon_by_related |
boolean | Whether is addon by related resources |
enable_embed_reservations |
boolean | Whether to enable embedded reservations |
bgcolor |
string | Background color |
category |
string | Category |
category_sortable |
string | Sortable category |
purchase_price |
string | Purchase price |
purchase_date |
string | Purchase date |
status |
string | Resource status. Allowed values: 'operational', 'non-operational', 'needs minor repair', 'needs major repair', 'broken', 'to be disposed of', 'disposed of', 'transferred', 'sold', 'missing' |
status_detail |
string | Detail for status |
active |
boolean | Whether the resource is active |
archived |
boolean | Whether the resource is archived |
rates |
array | Rate information (see Rates Schema below) |
show_account_number_on_reservations |
boolean | Whether to show account number on reservations |
show_big_button_on_site_page |
boolean | Whether to show big button on site page |
show_purpose_on_reservations |
boolean | Whether to show purpose on reservations |
show_note_on_reservations |
boolean | Whether to show note on reservations |
show_name_override_on_reservations |
boolean | Whether to show name override on reservations |
rate_name_only |
boolean | Whether to show rate name only |
rate_quotes |
boolean | Whether to enable rate quotes |
accounts_debit |
boolean | Whether to enable account debits |
accounts_sufficient_balance_required |
boolean | Whether sufficient balance is required |
reservable |
boolean | Whether the resource is reservable |
contact_user_id |
string | ID of contact user |
secondary_contact_ids |
array of strings | IDs of secondary contacts |
properties |
array | Properties information (see Properties Schema below) |
reservation_max_duration |
integer | Maximum duration for reservations |
reservation_limit |
integer | Limit for reservations |
reservation_minimum |
integer | Minimum for reservations |
historical_edit_window |
integer | Window for historical edits |
historical_cancel_window |
integer | Window for historical cancellations |
restricted_to_templates_only |
boolean | Whether restricted to templates only |
creation_start_time_restriction |
integer | Restriction for creation start time |
creation_start_time_restriction_future |
integer | Future restriction for creation start time |
restrict_start_end_minutes |
integer | Restriction for start/end minutes |
actual_usage_session_alert_duration |
integer | Duration for actual usage session alerts |
actual_usage_session_alert_email |
string | Email for actual usage session alerts |
email_to_send_invitations |
string | Email to send invitations |
capacity_hours |
integer | Capacity hours |
capacity_unit |
string | Capacity unit |
training_requirements_or |
boolean | Whether training requirements are OR (instead of AND) |
return_data |
boolean | Whether to return data |
return_field |
string | Field to return |
blackouts |
array | Blackout information (see Blackouts Schema below) |
weekly_slots |
array | Weekly slot information |
auto_close_event_at |
string | When to auto close event |
auto_open_event_at |
string | When to auto open event |
events |
array | Event information |
Rates Schema
Field | Type | Description |
---|---|---|
rate_id |
integer | ID of the rate |
delete |
boolean | Whether to delete the rate |
public |
boolean | Whether the rate is public |
rate |
number | Rate amount. Max: 99999.99 |
rate_int |
integer | Rate in integer format. Max: 9999999 |
tax_code |
string | Tax code |
tax_rate |
integer | Tax rate |
tax_note |
string | Note for tax |
sku |
string | SKU for the rate |
invoice_automatically |
boolean | Whether to invoice automatically |
blackouts |
array | Blackout information |
currency |
string | Currency symbol |
currency_decimal |
string | Decimal separator for currency |
currency_thousand |
string | Thousands separator for currency |
currency_code |
string | Currency code |
rate_unit |
string | Unit for the rate. Allowed values: 'per hour', 'per use', 'per block', 'per person', 'each', 'per request', 'per session', 'per sample', 'per km', 'per mile', 'per mL', 'per L', 'per day', 'per week', 'per month' |
rate_basis |
string | Basis for the rate. Allowed values: 'per unit', 'per reservable' |
rate_description |
string | Description of the rate. Max length: 127 |
rate_duration_minimum |
integer | Minimum duration for the rate |
rate_duration_maximum |
integer | Maximum duration for the rate |
rate_duration_step |
integer | Step for rate duration |
prorate_half_interval_multiplier |
number | Multiplier for prorating half intervals |
usergroup_id |
integer | ID of the user group |
usergroup_name |
string | Name of the user group |
require_account_number |
boolean | Whether to require account number |
meta_data |
string | Arbitrary JSON object |
site_reservation_script_id |
string | ID of site reservation script |
Blackouts Schema
Field | Type | Required | Description |
---|---|---|---|
blackout_id |
integer | No | ID of the blackout |
end |
string | Yes | End time |
end_with_date |
string | No | End time with date |
reason |
string | No | Reason for blackout |
start |
string | Yes | Start time |
start_with_date |
string | No | Start time with date |
weekday |
integer | Yes | Day of week (0-6, Monday-Sunday) |
Properties Schema
Field | Type | Description |
---|---|---|
property_id |
varies | ID of the property |
value |
varies | Value of the property |
clear |
boolean | Whether to clear the property |
propertydef |
object | Property definition (see Propertydef Schema below) |
Propertydef Schema
Only the propdef_id
is required. Other fields can be provided but are ignored.
Field | Type | Required | Description |
---|---|---|---|
propdef_id |
integer | Yes | ID of the property definition |
name |
string | No | Name of the property |
public |
boolean | No | Whether the property is public |
required |
boolean | No | Whether the property is required |
on_reports |
boolean | No | Whether to include on reports |
show_filter |
boolean | No | Whether to show in filters |
fieldtype |
string | No | Type of field |
options |
array | No | Options for the property |
allow_multiple |
boolean | No | Whether to allow multiple values |
empty_text |
string | No | Text to show when empty |
searchable |
boolean | No | Whether the property is searchable |
source |
string | No | Source of the property |
class |
string | No | Class of the property |
choices |
array | No | Choices for the property |
is_currency |
boolean | No | Whether the property is currency |
is_timestamp |
boolean | No | Whether the property is timestamp |
is_choice |
boolean | No | Whether the property is a choice |
Response
Success Response (200 OK)
Returns the updated reservable object if return_data
is set to true
.
Error Responses
400 Bad Request
: Invalid request or validation error401 Unauthorized
: Authentication failed403 Forbidden
: User does not have permission to update this resource404 Not Found
: Resource with the specified ID does not exist