Skip to content

Get Reservations

The following is the method to get the reservations.

Request URL

url
GET https://api.zerva.app/api/v1/reservation

Request Headers

NameTypeRequiredDescription
AuthorizationStringThe access token received from Issue Access Token.
Accept-LanguageStringThe language to be used in the response.

Request Query Parameters

NameTypeRequiredDescription
page_idStringFilter reservations by page ID.
payment_statusStringFilter reservations by payment status.
booking_statusStringFilter reservations by booking status.
start_dateStringFilter reservations from this start date (inclusive).
end_dateStringFilter reservations to this end date (inclusive).
offsetStringNumber of reservations to skip before returning results.
limitStringMaximum number of reservations to return.

Request Example

sh
curl -X GET 'https://api.zerva.app/api/v1/reservation?offset=0&limit=10' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept-Language: th,en'

Response

NameTypeDescription
totalNumberThe total number of reservations
reservationsArrayThe reservations

Reservation

NameTypeDescription
idStringThe reservation ID
seq_booking_noStringThe sequence booking number
first_nameStringThe first name of the customer
last_nameStringThe last name of the customer
telephone_noStringThe telephone number of the customer
emailStringThe email of the customer
noteStringThe note of the reservation
reserve_detailsArrayThe reservation details
payment_statusStringThe payment status
user_refStringThe user reference
customer_langStringThe customer language
created_atStringThe date and time when the reservation was created
last_updated_atStringThe date and time when the reservation was last updated
detailsArrayThe details

Details

NameTypeDescription
quantityNumberThe quantity
start_atStringThe start time of the reservation
end_atStringThe end time of the reservation
booking_statusStringThe booking status
reserve_detailsArrayThe reservation details
serviceObjectThe service
sub_serviceObjectThe sub service

Service

NameTypeDescription
idStringThe service ID
nameStringThe service name
descriptionStringThe service description
noteStringThe service note

Sub Service

NameTypeDescription
idStringThe sub service ID
nameStringThe sub service name
is_display_start_timeBooleanWhether the start time should be shown to the customer during reservation.
is_display_end_timeBooleanWhether the end time should be shown to the customer during reservation.
service_detailsStringThe sub service details
reservation_notesStringThe sub service reservation notes

Example

json
{
    "total": 1000,
    "reservations": [
        {
            "id": "f78b290b-a9d8-41cc-8c83-b169aa0a64ad",
            "seq_booking_no": "1",
            "first_name": "John",
            "last_name": "Doe",
            "telephone_no": "+66123456789",
            "email": "john.doe@example.com",
            "note": "อาจไปสายหน่อยนะครับ",
            "reserve_details": [
                {
                    "key": "Hello",
                    "value": "World"
                }
            ],
            "payment_status": "PAID",
            "user_ref": "88badaeb-2170-4ce9-9a88-86c8c489f1b0",
            "customer_lang": "th",
            "created_at": "2025-05-27T07:39:31.856Z",
            "last_updated_at": "2025-05-27T07:55:00.316Z",
            "details": [
                {
                    "quantity": 1,
                    "start_at": "2025-05-28T04:00:00.000Z",
                    "end_at": "2025-05-28T05:00:00.000Z",
                    "booking_status": "ACCEPTED",
                    "reserve_details": [
                        {
                            "key": "Hello",
                            "value": "World"
                        }
                    ],
                    "service": {
                        "id": "da93acea-a2ba-4cbc-acfb-c2ec845e2ed3",
                        "name": "Backend Development Course",
                        "description": "คอร์สเรียนพัฒนา Backend",
                        "note": "สำหรับผู้เริ่มต้นเท่านั้น"
                    },
                    "sub_service": {
                        "id": "084b3ce4-da7d-44ba-ad6b-e0d0125dc933",
                        "name": "NodeJS Zero to Hero",
                        "is_display_start_time": true,
                        "is_display_end_time": true,
                        "service_details": "คอร์สเรียนพัฒนา Backend สำหรับมือใหม่",
                        "reservation_notes": "1. ต้องมาก่อน 10 นาที\n2. หากไม่มาตามวัน-เวลาที่จองไว้ทางร้านขออนุญาติยกเลิกคิวและยึดค่ามัดจำ\n3. ทางร้านไม่อนุญาติให้ยกเลิกคิวได้ก่อนหน้า 2 วัน"
                    }
                }
            ]
        }
    ]
}