Reservations

This endpoint allows you to import reservations.

Import reservations

POST https://api.mobile-calendar.com/get/reservations

This enpoint resturn the reservations for date range as well as for given rooms.

Headers

Request Body

{
    "status": "success",
    "data": [
     {
            "reservation_id": "4753990",
            "reservation_number": "4028",
            "room_id": "5630",
            "room_name": "Room 1",
            "days_of_stay": "4",
            "arrival": "2021-01-28",
            "checkin": "15:00",
            "departure": "2021-02-10",
            "checkout": "11:00",
            "checkin_status": "CHEKCED_IN",
            "adults": "2",
            "children": "1",
            "client_id": "105886",
            "forename": "John",
            "name": "Smith",
            "phone": "+48123456789",
            "email": "john@smith.com",
            "payment_status": "NO_PAYMENT",
            "prepayment": "1400",
            "prepayment_to": "2021-01-10",
            "price_per_stay": "2800",
            "currency": "PLN",
            "additional_informations": "Will arrive with dog",
            "source_id": "3",
            "source": "booking.com",
            "display_color": "#ff0000",
            "add_date": "2022-01-11 11:07:43",
            "edit_date": "2022-01-15 13:00:16"
        }   
    ]
}

Example of request

The request below gets reservations for January 1, 2021, through January 28, 2021 and for rooms with ID 5630 and 5645.

If there is no room_ids parameter, the API will return reservations for all rooms.

{
    "from" : "2021-01-01", 
    "to" : "2021-01-28",
    "room_ids" : [5630, 5645]
}

You can find the room ID in the rooms details form.

The reservation object

Troubleshooting

Informations about errors

An example of a respone with an error

HTTP status 200 OK.

Note that the HTTP 200 OK code does not mean the answer is correct at all!

{
    "status": "error",
    "data": [],
    "errors": [
        "Incorrect format of \"From\" and/or \"To\" fields. Correct format YYYY-MM-DD",
        "Incorrect date \"From\" or \"To\""
    ]
}

Last updated