# Booking

<details>

<summary><a href="https://api.minical.io/v2/booking/receive_booking">https://api.minical.io/v2/booking/receive_booking</a>                                                                   Create Booking</summary>

This endpoint allows you to create booking.

**Parameter**

**Header**

X-API-KEY                            string         API key&#x20;

**Body**

booking/booking\_notes       string         Extra facilities like Tea/Coffee maker, Shower etc.

booking/source                   string         Booking source (like booking\_dot\_com OR expedia etc.)

booking/card/cvc               number       Customer's card cvc number

booking/card/name            string         Customer's card holder name

&#x20;booking/card/exp\_year      integer      Customer's card expiry year (yy)

booking/card/exp\_month   integer      Customer's card expiry month (mm)

booking/card/number         number     Customer's card number

booking/rate\_plan/currency/currency\_code    string     Currency code (like USD)

booking/rate\_plan/rates/base\_rate                  integer   charge rate for 1 day

booking/rate\_plan/rates/date                           string      End date of rate (check out date - 1 day)

booking/rate\_plan/rates/date\_end                   string      End date of rate (check out date - 1 day)

booking/rate\_plan/rates/date\_start                 string      start date of rate (check in date)

booking/rate\_plan/pms\_rate\_plan\_id               integer    PMS Rate plan ID

booking/rate\_plan/description                         string     description about booking

booking/rate\_plan/number\_of\_adults\_included\_for\_base\_rate     integer   Number of adults

booking/staying\_guest                                     string      staying guest with customer

booking/booking\_customer/country               string      customer's country name

booking/booking\_customer/postal\_code       string      customer's zip/postal code

booking/booking\_customer/city                     string      customer's city name

booking/booking\_customer/address             string     customer's address

booking/booking\_*customer/email                  string      customer's email id*

booking/booking\_*customer/phone*                 number    *customer's phone  number*

booking/booking\_*customer/customer\_name  string      customer's name*

booking/booking\_customer/company\_id        number    PMS property ID

booking/children\_count                                   *string*      Number of children

booking/adult\_count                                       integer    Number of adults

booking/check\_out\_date                               string      Booking check out date

booking/check\_in\_date                                 string      Booking check in date

booking/ota\_type                                          string      Booking source &#x20;

booking/pms\_room\_type\_id                         integer    PMS Room Type ID

booking/company\_id                                    integer    PMS property ID

booking/booking\_type                                 string      Type of booking new / modified /                 cancelled&#x20;

booking/ota\_booking\_id                             integer     Booking  ID

company\_id                                                 integer    PMS property ID

</details>

#### Responses

<details>

<summary><strong>200</strong>                                                                  Booking successfully created.</summary>

```html
{
    "ota_booking_id": "76732432325",
    "pms_booking_id": "482",
    "booking_type": "new"
}
```

</details>

<details>

<summary><strong>404</strong>  Could not find a booking matching this query.</summary>

```
{
    "status": false,
    "error": "Unknown method."
}
```

</details>

#### Request Body

```
{
   "booking":{
      "ota_booking_id": "7673212325",
      "booking_type": "new",
      "company_id": "8490006340",
      "pms_room_type_id": "8490020098",
      "ota_type": "booking_dot_com",
      "source": "2",
      "check_in_date": "2020-07-25",
      "check_out_date": "2020-07-28",
      "adult_count": "3",
      "children_count": "2",
      "booking_notes": "created via Booking.com. Booking ID: 76732432325\nEarlyCheckIn, HighFloor",
      "booking_customer": {
         "company_id": "8490006340",
         "customer_name": "Pk Patidar",
         "phone": "+91 7878765456",
         "email": "abcd@gmail.com",
         "address": "",
         "city": "",
         "postal_code": "",
         "country": ""
      },
      "staying_guest": {
         "guest_name": ""
      },
      "card": {
         "number": "4242424242424242",
         "exp_month": "08",
         "exp_year": "23",
         "name": "Pankaj Patidar",
         "cvc": "123"
      },
      "rate_plan": {
         "rate_plan_name": "booking_dot_com #76732432325",
         "number_of_adults_included_for_base_rate": "3",
         "description": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.",
         "pms_rate_plan_id": "131335",
         "rates": [
            {
               "date_start": "2020-07-25",
               "date_end": "2020-07-27",
               "date": "2020-07-27",
               "base_rate": "50.00"
            }
         ],
         "currency": {
            "currency_code": "USD"
         }
      }
   },
   "company_id":"8490006340"
}
```

<details>

<summary><a href="#https-api.minical.io-v2-booking-receive_booking-create-booking">https://api.minical.io/v2/booking/get_booking_detail</a>                                                               Get Booking detail (last 15 minute interval)</summary>

This endpoint allows you to get booking detail.

**Parameter**

**Header**

X-API-KEY                            string         API key&#x20;

**Body**

company\_id                          string         Property ID

</details>

#### Responses

<details>

<summary><strong>200</strong>                                                                  Booking successfully retrieved.</summary>

```
[
    {
        "booking_id": "345",
        "arrival_date": "2022-07-28 00:00:00",
        "departure_date": "2022-07-30 00:00:00",
        "customer_name": "Eeshan Jain",
        "email": "mradul.jain90@gmail.com",
        "booking_source": "Owner",
        "rate": "333",
        "booking_date": "2022-08-18 16:50:18",
        "room_type": "New Room Type",
        "rate_plan": "New Rate Plan #345",
        "customer_type": "VIP"
    },
    {
        "booking_id": "344",
        "arrival_date": "2022-07-29 00:00:00",
        "departure_date": "2022-08-01 00:00:00",
        "customer_name": null,
        "email": null,
        "booking_source": "Walk-in / Telephone",
        "rate": "0",
        "booking_date": "2022-08-18 16:50:14",
        "room_type": "Double Customer",
        "rate_plan": null,
        "customer_type": null
    }
]
```

</details>

<details>

<summary><strong>404</strong>                                                                 Could not find to matching this query.</summary>

```
{
    "status": false,
    "error": "Unknown method."
}
```

</details>

#### Request Body

```
{
   "company_id": "8490006340"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-docs.minical.io/minical-api/booking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
