---
agentTools:
  projectIndex: https://developer-webetechies.readme.io/llms.txt
---

# Booking

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Utility-Payment",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.pay2mobiles.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api-service/hotel/hotelBook": {
      "post": {
        "summary": "Booking",
        "description": "",
        "operationId": "booking",
        "parameters": [
          {
            "name": "tokenId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "resultIndex",
                  "hotelCode",
                  "hotelName",
                  "guestNationality",
                  "noOfRooms",
                  "clientReferenceNo",
                  "isVoucherBooking",
                  "hotelRoomsDetails",
                  "RAW_BODY",
                  "endUserIp",
                  "traceId"
                ],
                "properties": {
                  "resultIndex": {
                    "type": "string"
                  },
                  "hotelCode": {
                    "type": "string"
                  },
                  "hotelName": {
                    "type": "string"
                  },
                  "guestNationality": {
                    "type": "string"
                  },
                  "noOfRooms": {
                    "type": "string"
                  },
                  "clientReferenceNo": {
                    "type": "string"
                  },
                  "isVoucherBooking": {
                    "type": "string"
                  },
                  "hotelRoomsDetails": {
                    "type": "array"
                  },
                  "RAW_BODY": {
                    "type": "string",
                    "description": "pan"
                  },
                  "endUserIp": {
                    "type": "string"
                  },
                  "traceId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"BookResult\": {\n        \"VoucherStatus\": true,\n        \"ResponseStatus\": 1,\n        \"Error\": {\n            \"ErrorCode\": 0,\n            \"ErrorMessage\": \"\"\n        },\n        \"TraceId\": \"86fa7f02-ff4d-4c0a-9cc1-71399a0a1d2b\",\n        \"Status\": 1,\n        \"HotelBookingStatus\": \"Confirmed\",\n        \"InvoiceNumber\": \"SM/2324/7915\",\n        \"ConfirmationNo\": \"TBM073747\",\n        \"BookingRefNo\": \"XYZ121532\",\n        \"BookingId\": 1877666,\n        \"IsPriceChanged\": false,\n        \"IsCancellationPolicyChanged\": false\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "BookResult": {
                      "type": "object",
                      "properties": {
                        "VoucherStatus": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "ResponseStatus": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "Error": {
                          "type": "object",
                          "properties": {
                            "ErrorCode": {
                              "type": "integer",
                              "example": 0,
                              "default": 0
                            },
                            "ErrorMessage": {
                              "type": "string",
                              "example": ""
                            }
                          }
                        },
                        "TraceId": {
                          "type": "string",
                          "example": "86fa7f02-ff4d-4c0a-9cc1-71399a0a1d2b"
                        },
                        "Status": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "HotelBookingStatus": {
                          "type": "string",
                          "example": "Confirmed"
                        },
                        "InvoiceNumber": {
                          "type": "string",
                          "example": "SM/2324/7915"
                        },
                        "ConfirmationNo": {
                          "type": "string",
                          "example": "TBM073747"
                        },
                        "BookingRefNo": {
                          "type": "string",
                          "example": "XYZ121532"
                        },
                        "BookingId": {
                          "type": "integer",
                          "example": 1877666,
                          "default": 0
                        },
                        "IsPriceChanged": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "IsCancellationPolicyChanged": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --location 'http://localhost:8099/api-service/hotel/hotelBook' \\\n--header 'Content-Type: application/json' \\\n--header 'tokenId: 14278d7f-87eb-488b-97be-659deb643bfc' \\\n--header 'api_key: 2xxxxxxxxx6' \\\n--data '{\n    \"resultIndex\": \"1\",\n    \"hotelCode\": \"2876\",\n    \"hotelName\": \"Sheraton Test\",\n    \"guestNationality\": \"IN\",\n    \"noOfRooms\": \"1\",\n    \"clientReferenceNo\": \"0\",\n    \"isVoucherBooking\": \"true\",\n    \"hotelRoomsDetails\": [\n        {\n            \"roomIndex\": \"1\",\n            \"roomTypeCode\": \"46081_abc046081^T12.6000^MT0^OR0^RN0^BB1^M0_1|NonPackage\",\n            \"roomTypeName\": \"Superior-DoubleBed\",\n            \"ratePlanCode\": \"46081_abc046081^T12.6000^MT0^OR0^RN0^BB1^M0_1_\",\n            \"bedTypeCode\": null,\n            \"smokingPreference\": 0,\n            \"supplements\": null,\n            \"price\": {\n                \"currencyCode\": \"INR\",\n                \"roomPrice\": 12.60,\n                \"tax\": 0.0,\n                \"extraGuestCharge\": 0,\n                \"childCharge\": 0,\n                \"otherCharges\": 100.00,\n                \"discount\": 0,\n                \"publishedPrice\": 112.60,\n                \"publishedPriceRoundedOff\": 113,\n                \"offeredPrice\": 112.60,\n                \"offeredPriceRoundedOff\": 113,\n                \"agentCommission\": 0.00,\n                \"agentMarkUp\": 0,\n                \"serviceTax\": 18.00,\n                \"tcs\": 0,\n                \"tds\": 0.00\n            },\n            \"hotelPassenger\": [\n                {\n                    \"title\": \"mr\",\n                    \"firstName\": \"Avinash\",\n                    \"middlename\": null,\n                    \"lastName\": \"Singh\",\n                    \"phoneno\": null,\n                    \"email\": null,\n                    \"paxType\": 1,\n                    \"leadPassenger\": true,\n                    \"age\": 0,\n                    \"passportNo\": null,\n                    \"passportIssueDate\": \"0001-01-01T00:00:00\",\n                    \"passportExpDate\": \"0001-01-01T00:00:00\",\n                    \"pan\": \"IxxxxxxxxF\"\n                }\n            ]\n        }\n    ],\n    \"endUserIp\": \"223.190.84.195\",\n    \n    \"traceId\": \"328d2290-04d3-4c5d-97f4-d94e09224ed9\"\n}'"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "65aa23aea2e9bc005a3efc03:660a8776e4c9ac005646f8fa"
}
```