Search reservations
This endpoint allows for the efficient searching and filtering of reservation records based on specified query parameters such as email, first name, last name and other fields. It is designed to support operations that require accessing detailed reservation information quickly and effectively.
Endpoint and Usage:
Endpoint: GET
/api/reservations/search/Base URL:
https://api.vomevolunteer.com
Query Parameters:
Core Filters
• id (uuid): Filters reservations by the ID.
• arrival_time: (string): Filters reservations by arrival_time.
• depature_time: (string): Filters reservations by the departure_time.
• status: (string): Filters reservations by the status.
Reservation Statuses
0: Shift request pending1: Reserved2: Shift request declined3: Attendance confirmed4: Absent5: Checked-in6: Hours logged7: Hour claim pending
Sample Requests
# id
GET /api/reservations/search/?id=a31a7f99-87c2-4f13-af1e-502a724634d7
# arrival_time
GET /api/reservations/search/?arrival_time=2021-02-03T18:00:00Z
# departure_time
GET /api/reservations/search/?user.last_name=2021-02-03T19:00:00Z
# status
GET /api/reservations/search/?status=0
User Filters:
• user.email (string): Filters reservations by the email associated with the user who made the reservation.
• user.first_name (string): Filters reservations by the first name of the user.
• user.last_name (string): Filters reservations by the last name of the user.
Sample Requests
# enail
GET /api/reservations/search/[email protected]
# first_name
GET /api/reservations/search/?user.first_name=Astra
# last_name
GET /api/reservations/search/?user.last_name=Yuno
Shift Filters:
• shift.id (uuid): Filters reservations by the ID of the associated shift.
• shift.shift_title (string): Filters reservations by the name of the associated shift.
Example Requests:
# id
GET /api/reservations/search/?shift.id=a31a7f99-87c2-4f13-af1e-502a724634d7
# shift_title
GET /api/reservations/search/?shift.shift_title=title
# shift_start_at
GET /api/reservations/search/?shift.shift_start_at=2024-08-15T18:00:00Z
# shift_end_at
GET /api/reservations/search/?shift.shift_end_at=2024-10-15T18:00:00Z
# shift_start_at and shift_end_at
GET /api/reservations/search/?shift.shift_start_at=2024-08-15T18:00:00Z&shift.shift_end_at=2024-10-15T18:00:00Z
Opportunity Filters
Search by opportunity filters:
• opportunity.id (uuid): Filters reservations by the ID of the associated opportunity.
• opportunity.title (string): Filters reservations by the Title of the associated opportunity.
# id
GET /ap i/reservations/search/?opportunity.id=a31a7f99-87c2-4f13-af1e-502a724634d7
# title
GET /api/reservations/search/?opportunity.title=SampleTitleA
Authorization:
Requests to this endpoint require an API-KEY in the header for authentication.
headers = {
"API-KEY": "your_unique_api_key_here"
}
response = requests.get("https://api.vomevolunteer.com/api/reservations/search/[email protected]", headers=headers)Response Structure:
The response from this endpoint returns a list of reservations that match the query parameters, including detailed information about each reservation's associated shift and enrollment info.
Example Response Object:
{
"count": 284,
"next": "https://api.vomevolunteer.com/api/reservations/search/?email=sample_volunteer_01%domain.com&page=2",
"previous": null,
"results":
[
{
"id": "8941d173-6909-45bd-a4d8-c13b11e170af",
"shift": {
"id": "c2e41a8a-c6fe-4468-bc86-8ec1af71ad12",
"created_at": "2020-10-27T10:17:52.450538Z",
"shift_start_at": "2020-11-05T13:00:00Z",
"shift_end_at": "2020-11-05T17:00:00Z",
"spots": 10,
"shift_title": null,
"shift_description": null
},
"created_at": "2020-11-05T02:55:28.030935Z",
"status": 0,
"logged_hours": 2.0,
"arrival_time": "2020-11-05T13:00:00Z",
"departure_time": "2020-11-05T14:00:00Z",
"hours_approved_by": null,
"user": {
"id": "874976ad-3bcc-456c-ad52-e54132b88571",
"first_name": "Daniel",
"last_name": "Smithkern",
"email": "[email protected]",
"gender": 0,
"address": "3949 Decarie Boulevard, Montreal, QC, Canada",
"phone_number": "1235474630",
"date_of_birth": "1975-02-08",
"timezone": "America/Detroit",
"address_coordinates": [
"45.4772493",
"-73.61535169999999"
]
},
"opportunity": {
"id": "c3d92fa3-d904-4f9d-bb50-ec342a085931",
"category": {
"id": "b24e49fd-2b04-4b80-bf4f-871a4dc6ad3e",
"title": "Winter Food Program",
"description": "This program works to help alleviate hunger and the stigma of food insecurity in our students. By providing Weekends and More hampers to participating schools, staff and teachers can support students who are struggling with access to nutritious food on weekends. These hampers contain easy to prepare meals to meet the needs of students who would otherwise go without food when they are away from school meal programs."
},
"title": "Server",
"description": "We need help and looking for someone to serve food to homeless people!"
}
},
]
}To format the JSON response structure without altering any content, organize it with clear headings and subheadings for each part. Here's a suggested format:
Example Response Structure
Summary Information
Count: 284
Next Page URL: URL for Page 2
Previous Page URL: null
For a complete description of each field in this response object, you can visit: Reservations
Last updated