api.resources.from_id
Fetch a resource based on the reservable_id and optionally include additional details. To improve performance of your scripts, you can choose to only request specific attributes.
Arguments:
def api.resources.from_id(
# Required
reservable_id: str = None, # Resource ID
# Optional
attribs: list[str] | None = None, # A list of attributes to include.
attribs_only: bool = False, # Only include the attributes requested.
check_status: bool = False, # Return the availability status of the resource.
full_training: bool = False, # Return a full training/credential data object.
inc_approvers: bool = False # Return a full list of approvers for this resource.
inc_rates: bool = False # Return a full list of rates for this resource.
inc_user: bool = False # Return the contact user for this resource.
showblocks: bool = False # Return a list of blocks associated with this resource.
):
Returns either a Reservable data dictionary or None if it cannot be found.
Example:
resource = api.resources.from_id(reservable_id="foo", inc_user=True)
Attributes available
These strings can be provided, in combination with attribs_only=True, to only pull select attributes.
accounts_debit: Whether or not to debit accounts when reserved or requested.accounts_sufficient_balance_required: Indicates if a sufficient account balance is required for reservations.active: Denotes if the item is currently active.actual_usage_session_alert_duration: The duration for actual usage session alerts.actual_usage_session_alert_email: The email address for actual usage session alerts.allow_accessory_users: Specifies if accessory users (guests) are allowed.allow_unauthenticated_actual_usage: Determines if unauthenticated actual usage submission is permitted.altnames: Alternative names for the item.anonymous_maintenance: Whether anonymous maintenance is enabled for this item.anonymous_reservations: Whether anonymous reservations are enabled for this item.anyapprovers: Indicates if any approvers are set for the item.approvers: A list of users who can approve reservations for this item.approvers_full: Full details of the approvers for the item.auto_checkin: Whether automatic check-in is enabled.auto_checkout_delay: The delay for automatic checkout.auto_new_reservation: Indicates if new reservations are automatically created.autocancel_invoiced_automatically_window: The window within which automatically invoiced reservations are autocancelled.autocancel_window: The time window for automatic cancellation of reservations.autodeny_window: The time window for automatic denial of reservations.barcode: The barcode associated with the item.bgcolor: The background color setting for the item's display.blackouts: Periods when the item is unavailable.blockedby: Indicates what is blocking the item.blocks: Details about resource blocks on the item's availability.buffer_before: The buffer time required before a reservation starts.can_make_recurring_reservations: Determines if recurring reservations can be made for this item.can_only_reserve_with_related: Specifies if the item can only be reserved with related items.cancel_message: The message displayed upon cancellation.capacity_hours: The capacity of the item in hours.capacity_unit: The unit used to measure the item's capacity.category: The category the item belongs to.category_sortable: A sortable representation of the item's category.checkin_before_window: The time window before a reservation when check-in is allowed.checkout_after_window: The time window after a reservation when checkout is allowed.class: The class of the item.contact_user: The primary contact user for the item.contact_user_slim: A slimmed-down version of the contact user details.contacts: A list of contacts associated with the item.contacts_slim: Slimmed-down details for contacts associated with the item.created: The creation timestamp of the item.creation_start_time_restriction: Restrictions on the start time of new reservations.creation_start_time_restriction_future: Future restrictions on the start time of new reservations.currency: The currency used for pricing and billing.custom_reserve_button_text: Custom text for the reserve button.default_calendar_view: The default calendar view for this item.default_reservation_duration: The default duration for reservations.description: A detailed description of the item.disclaimer: Any disclaimers associated with the item or its reservations.edit_button_in_email: Whether an edit button should be included in reservation emails.email_to_send_invitations: The email address used to send invitations.enable_admin_checkin: Whether administrators can check in the item.enable_app_checkin: Whether check-in via the application is enabled.enable_embed_reservations: Whether reservations can be made from web integrations (web embeds).enable_end_early: Whether users can end reservations early.enable_late_checkin: Whether late check-in is enabled.exclude_from_activity_report: Whether to exclude the item from activity reports.exclude_from_site_calendar: Whether to exclude the item from the site calendar.externalbookingwebsite: The URL of an external booking website, if applicable.files: A list of files associated with the item.for_sale: Whether the item is available for sale.future_loans: Information about future loans of the item.guest_only_checkin: Whether only guests can check in the item.has_weekly_slots: Indicates if the item has defined weekly reservation slots.hidden_to_cannot_reserve_users: Whether the item is hidden from users who cannot reserve it.hide_approvals: Determines if approval processes are hidden.hide_availability_on_site_page: Whether to hide the item's availability on the site page.hide_availability_units_on_site_page: Whether to hide the availability of individual units on the site page.historical_cancel_window: The historical time window for cancelling reservations.historical_edit_window: The historical time window for editing reservations.icalfeed_show_summary: Whether to show the summary in the iCal feed.icalfeedurl: The URL for the iCal feed of the item.icsurl: The URL for the ICS calendar file of the item.image: The primary image associated with the item.image_hq: The high-quality image of the item.image_icon: The icon image of the item.image_is_default: Indicates if the current image is the default image.image_thumb: The thumbnail image of the item.invoice_scripts: Scripts related to invoicing for the item.is_addon: Whether the item is an add-on.is_addon_by_related: Whether the item is an add-on determined by related items.keywords: Keywords associated with the item for search purposes.last_update: The timestamp of the last update to the item's information.loan_duration: The default duration for loans of the item.loan_duration_num: The numerical part of the loan duration.loan_duration_unit: The unit of time for the loan duration (e.g., hours, days).loanable: Whether the item can be loaned out.maintenance_forms: Forms related to maintenance for the item.maintenance_forms_full: Full details of maintenance forms.name: The name of the item.name_on_invoices: The name of the item as it appears on invoices.named_units: Whether the item has individually named units.nolist_to_cannot_reserve_users: Whether the item is not listed to users who cannot reserve it.nolist_to_everyone: Whether the item is not listed to any user.overdue_notice_delay: The delay before an overdue notice is sent.pending_loan_can_be_overdue: Whether a pending loan can become overdue.purchase_date: The date the item was purchased.purchase_price: The price at which the item was purchased.rate_name_only: Whether only the rate name is displayed.rate_quotes: Information related to rate quotes for the item.rate_quotes_require_account_number: Whether rate quotes require an account number.rate_quotes_default_rate_basis: The default basis for rate quotes.rate_quotes_default_rate_unit: The default unit for rate quotes.rates: The various rates applicable to the item.recent_users: A list of recent users who interacted with the item.recurring_reservations: Information about recurring reservations for the item.related_reservables: Other reservable items related to this item.require_purpose: Whether a purpose is required for reservations of this item.reservable: Whether the item is reservable.reservable_id: The ID of the reservable item.reservation_approved_email_message: The email message sent when a reservation is approved.reservation_cancelled_email_message: The email message sent when a reservation is cancelled.reservation_denied_email_message: The email message sent when a reservation is denied.reservation_email_message: The general email message for reservations.reservation_forms: Forms related to reservations for the item.reservation_forms_full: Full details of reservation forms.reservation_limit: The maximum number of reservations allowed for the item.reservation_max_duration: The maximum allowable duration for a single reservation.reservation_minimum: The minimum required duration for a reservation.reservation_returned_email_message: The email message sent when a reservation is returned.reservation_unit_limit: The limit on the number of units that can be reserved simultaneously.restrict_start_end_minutes: Whether start and end times are restricted to specific minute intervals.restricted_to_templates_only: Whether the item can only be reserved using templates.returnable: Whether the item is returnable after being reserved or loaned.searchable: Whether the item is searchable in the system.secondary_contacts: Secondary contact users for the item.secondary_contacts_slim: Slimmed-down details for secondary contacts.show_account_number_on_reservations: Whether to display the account number on reservations.show_big_button_on_site_page: Whether to show a prominent button on the site page for this item.show_calendar: Whether to display a calendar for the item's availability.show_calendar_links_to_all_users_regardless: Whether calendar links are shown to all users, regardless of permissions.show_name_override_on_reservations: Whether to allow overriding the name on reservations.show_note_on_reservations: Whether to display a note field on reservations.show_purpose_on_reservations: Whether to display the purpose field on reservations.site_name: The name of the site where the item is located.skip_global_forms: Whether to skip global forms for this item.sku: The Stock Keeping Unit (SKU) for the item.start_times_common: Common start times available for reservations.status: The current status of the item.status_detail: More detailed information about the item's status.support_reservable: Whether the item supports reservable features.support_button_text: The text for the support button.tags: Tags associated with the item for categorization.tracking_number: The tracking number for the item.training: Information about training required for using the item.training_for_embed: Training information specifically for embedded use.training_requirements_or: Indicates if training requirements are met by any of the specified options.training_slim: A slimmed-down version of training information.units: Details about the individual units of the item.units_account_email_notification: Whether email notifications are sent for unit account activity.units_account_email_notification_custom_message: A custom message for unit account email notifications.units_account_email_notification_threshold: The threshold for sending unit account email notifications.units_mode: The mode of operation for units (e.g., named, numbered).units_name: The name given to the units of the item.user_visible_maintenance_details: Maintenance details visible to users.user_visible_reservation_details: Reservation details visible to users.user_visible_maintenance_form_responses: Responses from maintenance forms that are visible to users.user_visible_reservation_form_responses: Responses from reservation forms that are visible to users.usergroups: User groups this item is restricted to.website: The website associated with the item.weekly_blocks_mode: The mode for weekly blocks.weekly_slots: Defined weekly time slots for reservations.