API - Planyo Web Services - reservation_search

Jesteś tutaj: Planyo » Pomoc » API » reservation_search

reservation_search

Description:

Finds all reservations containing text specified in the query parameter (this works in the same was as the Search tab in the admin panel). You can search for one or more of the following: first and/or last name, login name, user ID, reservation ID, email address, phone number, resource name.

Input:

query string required
Search query. Specifying more than one word narrows down the search results.
detail_level int optional
Sum of one or more of the following integers (ORed value): 8=custom resource properties, 16=site properties, 32=user properties. Default value is 0.
sort string optional
Optional sort field. One of: user, user_id, email, phone, resource_id, resource, reservation_id, duration
method string required
must be set to reservation_search
language string optional
by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned
api_key string required
your API key - Click here to get your key. If your API key uses a hash key, you must also include the parameters hash_key and hash_timestamp.

Output:

results array
Array whose items are named arrays with the following keys: rental_id (this is the reservation ID), start_time, end_time, user_notes, admin_notes, custom_color, night_reservation, first_name, last_name, login, user_id, email, phone, phone_country_code, resource_id, name (resource name). In case detail_level is set, this can also include named arrays for: resource_properties, site_properties or user_properties.

API playground:

Click here to test this function in the API playground.