Skip to main content

API - Inventory Push To Channels


Purpose

ToAegis will call your API to push booking informationinventory to theyour Property Management System (PMS).system.

Request

Method: POST

Headers

  • Authorization: Bearer <token>
  • Content-Type: application/json
Request Body
{
  "reservations"hotelid": "id_of_hotel",
  "room": [
    {
      "customer": {
        "countrycode"id": "0"DLX", 
      "email": "shree@gmail.com",
        "telephone": "9841498215"
      },
      "rooms"date": [
        {
          "arrival_date"from": "2023-5-17"2020-01-01",
          "departure_date"to": "2023-5-19"2020-01-01",
          "specialrequest"roomstosell": "...",
          "guest_name": "Radha Koirala",
          "id": "DLC",
          "numberofguests": "2",
          "numberofchildren": "1",
          "numberofadults": "2",
          "roomstaystatus": "confirmed",
          "roomreservation_id": "B_1_1",
          "price": [
            {
              "date": "2023-5-17",
              "rate_id": "CP",
              "pricebeforetax": "900"3"
        },
        {
          "date"from": "2023-5-18"2020-01-02",
          "rate_id"to": "CP"2020-01-02",
          "pricebeforetax"roomstosell": "950"2"
        }
      ]
    },
    {
      "arrival_date": "2023-5-17",
          "departure_date": "2023-5-18",
          "specialrequest": "...",
          "guest_name": "Ramesh Karki",
          "id": "DLX"STD", 
      "numberofguests": "2",
          "numberofchildren": "1",
          "numberofadults": "2",
          "roomstaystatus": "confirmed",
          "roomreservation_id": "B_1_2",
          "price"date": [
        {
          "date"from": "2023-5-17"2020-01-01",
          "rate_id"to": "BB"2020-01-01",
          "pricebeforetax"roomstosell": "1000"3"
        },
        {
          "from": "2020-01-02",
          "to": "2020-01-02",
          "roomstosell": "2"
        }
      ]
    }
  ],
      "id": "B_1"
}
]
}

Response

Success
{
  "error_code": "0",
  "status_code": "200",
  "message": ""
}
Error
{
  "error_code": "1",
  "status_code": "200",
  "message": ""
}

Key
  • Aegis Componentswill ofrepeatedly call your API to until it gets success in response. Success is determined by error_code = 0 in the Request

  • reservations: An array of reservations. Each reservation contains the following:
    • customer: Details about the customer.
      • countrycode: Country code of the customer based on country_code.csv file.
      • email: Email address of the customer.
      • telephone: Telephone number of the customer.response.
    • rooms: An array of rooms that are reserved. Each room contains detailed booking information.
      • arrival_date: Arrival date of the reservation.
      • departure_date: Departure date of the reservation.
      • specialrequest: Any special request made by the guest. Max 500 character
      • guest_name: Name of the guest. Max 100 chatacter
      • id: Code of the room that is booked (e.g., DLX, SDLX). Mapped with PMS.
      • numberofguests: Total number of guests.
      • numberofchildren: Number of children.
      • numberofadults: Number of adults.
      • roomstaystatus: Status of the booking (e.g., confirmed, modified, cancelled).
      • roomreservation_id: ID of the booking in your system. If it already exists, the booking is updated; otherwise, it is inserted. This is id associated to each booking of the reservation.
      • price: An array containing the rate for each day of the booking. It must contains data from arrival to 1 day before departure date.
        • date: Date of the rate.
        • rate_id: Code for the plan associated with the rate (e.g., BB, MAP).
        • pricebeforetax: Price before tax.
        • childrate: Rate for children.
    • id: ID of the booking in your system. A single reservation can have multiple rooms. This ID is for the group of rooms, and roomreservation_id is for individual rooms. Both are mandatory.