Skip to main content

Ohmyhotel OTA API v2.0

Ohmyhotel APIs are comprised of 4 categories:

  • Hotels
  • Reservation
  • Reservations
  • Static

Ohmyhotel APIs are delivered via HTTPS POST, GET, PUT and DELETE requests.
Request and response messages are returnd in JSON allowing you to easily build requests and parse responses in a standard way by using the tools included with most of the modern languages.

Authentication

Ohmyhotel of authentication:

  • authorization (API key)
  • signature
  • date format(UTC Time Stamp in seconds)

To authenticate, you must send both the authorization and the signature,
a SHA256 hash in Hex format calculated from your API key and your secret plus current date format

code_block:

  #!/bin/bash 
  apiKey="yourApiKey"
  secret="yourSecret"
  curl -i \
  -X GET \
  -H 'Accept:application/json' \
  -H 'Authorization:'$apiKey'' \
  -H 'Signature:'$(echo -n ${authorization}${secret}$(date +%s)|sha256sum|awk '{ print $1}')'' \          
  https://dev-api-ota-v2.ohmyhotel.com/channel/ota/v2.0/status

ErrorCodes


Error Code and Description
  • Related to Search Request
  • E00101: No data search results.
  • E00102: Parameter not available. :: {0}
  • E00103: Selectable check-out date is up to 30 days from check-in. :: [from {0} to {1}]
  • E00104: The number of rooms cannot exceed 5, and the number of adults cannot exceed 9. Please check and try again.
  • E00105: This parameter is required. :: {0}
  • E00106: The {0} should be selected out of [{1}].
  • E00107: This parameter should be number type. :: {0}
  • E00108: This parameter should be array type. :: {0}
  • E00109: This parameter should be string type. :: {0}
  • E00110: The type of date parameter should be 'YYYY-MM-DD' :: {0}
  • E00111: The check-in date has passed.
  • E00112: The number of childCount and the number of childAges entered do not match. Please check and try again.
  • E00113: Please set a stay date of more than one day. :: [from {0} to {1}]
  • E00114: Check-out cannot be faster than check-in. :: [from {0} to {1}]
  • Pre-booking Errors
  • E00201: The channel Booking Code is duplicated.
  • E00202: The amount has changed, so the requested amount cannot be booked. Please try other conditions
  • E00203: Please check the planCode, roomTypeCode, amount.
  • E00204: This room/plan is no longer available. Please choose another plan.
  • E00205: Please double-check your reservation number.
  • Account and System Errors
  • E00901: Authentication key not found. Please check the authentication key.
  • E00902: You do not have permission to use this API. Please contact the person in charge.
  • E00903: The expected operation could not be executed.
  • E00904: Insufficient data {0} to proceed with the requested operation. Please contact your administrator.
  • E00905: This account is unavailable, please contact your administrator.
  • Errors During Booking
  • E99999: Booking Failed

hotels availability

Search by region code or hotel codes

Region codes can be obtained by 'static region' API and hotel codes can be obtained by 'static hotels'

Authorizations:
Authorization Header
Request Body schema: application/json

request description

nationalityCode
required
string^[A-Z]{2}$

traveler's nationality. ISO3166 2 letter code

language
required
string
Enum: "EN" "KO" "JA" "VI" "ZH"

language. default is "EN"
EN - English
KO - Korean
JA - Japanese
VI - Vietamese
ZH - Chinese(simplified)

checkInDate
required
string^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-...

Check-in date, in ISO 8601 format (YYYY-MM-DD)

checkOutDate
required
string^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-...

Check-out date, in ISO 8601 format (YYYY-MM-DD)

required
Array of objects (availabilityRQ_Room)

You can send maximum 5 rooms or maximum 9 adults. The number of rooms cannot exceed 5, and the number of adults cannot exceed 9.

rateType
required
string
Enum: "standard_rate" "package_rate"

'standard_rate' is default. The 'package rate' is a discounted rate provided by the hotel and should not be exposed to the web or direct customers.
It must be sold together with the air tickets or sold as a package.
If you would like to receive a 'package rate', please contact your sales representative.

hotelCodes
required
Array of integers <int> [ 1 .. 50 ] items [ items <int > ]

ohmyhotel hotel codes. You can request up to 50 at a time.
The hotel code can be obtained through the 'static hotel' api.

Responses

Request samples

Content type
application/json
Example

ExampleObject 1

{
  • "nationalityCode": "KR",
  • "language": "KO",
  • "checkInDate": "2023-09-01",
  • "checkOutDate": "2023-09-03",
  • "rooms": [
    ],
  • "rateType": "standard_rate",
  • "hotelCodes": [
    ]
}

Response samples

Content type
application/json

ExampleObject 1

{
  • "transactionSetId": "96FEDBD47DF940E9BCC7E2A83586F7D7",
  • "hotels": [
    ],
  • "errors": [
    ]
}

hotels rooms availability

Search room rates by selected 1 hotel

Requests must be send with the hotel code received from the previous api, and available all rooms and rates of the selected hotel will be returned.

Authorizations:
Authorization Header
Request Body schema: application/json

request description

nationalityCode
required
string^[A-Z]{2}$

traveler's nationality. ISO3166 2 letter code

language
required
string
Enum: "EN" "KO" "JA" "VI" "ZH"

language. default is "EN"
EN - English
KO - Korean
JA - Japanese
VI - Vietamese
ZH - Chinese(simplified)

hotelCode
required
integer

ohmyhotel hotel code

checkInDate
required
string^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-...

Check-in date, in ISO 8601 format (YYYY-MM-DD)

checkOutDate
required
string^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-...

Check-out date, in ISO 8601 format (YYYY-MM-DD)

required
Array of objects (Room)
rateType
required
string
Enum: "standard_rate" "package_rate"

'standard_rate' is default. The 'package rate' is a discounted rate provided by the hotel and should not be exposed to the web or direct customers.
It must be sold together with the air tickets or sold as a package.
If you would like to receive a 'package rate', please contact your sales representative.

Responses

Request samples

Content type
application/json

ExampleObject 1

{
  • "nationalityCode": "KR",
  • "language": "KO",
  • "hotelCode": 590053,
  • "checkInDate": "2023-09-01",
  • "checkOutDate": "2023-09-03",
  • "rooms": [
    ],
  • "rateType": "standard_rate"
}

Response samples

Content type
application/json

ExampleObject 1

{
  • "transactionSetId": "A5053AC7FDAD45D2BAEB222E336467EF",
  • "rooms": [
    ],
  • "errors": [
    ]
}

hotels rooms information

Rooms information

Receive room information for directly contracted hotels

Authorizations:
Authorization Header
Request Body schema: application/json

request description

language
required
string
Enum: "EN" "KO" "JA" "VI" "ZH"

language. default is "EN"
EN - English
KO - Korean
JA - Japanese
VI - Vietamese
ZH - Chinese(simplified)

hotelCode
required
integer <int>

ohmyhotel hotel code

roomTypeCode
required
string [ 1 .. 50 ] characters

room type code (but room type code begins 'D' only)

ratePlanCode
required
string [ 1 .. 100 ] characters

rate plan code

Responses

Request samples

Content type
application/json

ExampleObject 1

{
  • "language": "KO",
  • "hotelCode": 590053,
  • "roomTypeCode": "D_114426",
  • "ratePlanCode": "273972^345926|2^1"
}

Response samples

Content type
application/json

ExampleObject 1

{}

reservation precheck

Precheck before real booking

You must run the precheck service right before the actual booking to check availability

Authorizations:
Authorization Header
Request Body schema: application/json

request description

nationalityCode
required
string^[A-Z]{2}$

traveler's nationality. ISO3166 2 letter code

language
required
string
Enum: "EN" "KO" "JA" "VI" "ZH"

language. default is "EN"
EN - English
KO - Korean
JA - Japanese
VI - Vietamese
ZH - Chinese(simplified)

hotelCode
required
integer <int>

ohmyhotel hotel code

checkInDate
required
string^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-...

Check-in date, in ISO 8601 format (YYYY-MM-DD)

checkOutDate
required
string^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-...

Check-out date, in ISO 8601 format (YYYY-MM-DD)

roomTypeCode
required
string [ 1 .. 50 ] characters

room type code

roomToken
string [ 1 .. 500 ] characters

It's from room availability response. If it is returned on room availability response, It's mandatory on precheck

ratePlanCode
required
string [ 1 .. 100 ] characters

rate plan code

required
Array of objects (precheck_Room)

You can send maximum 5 rooms or maximum 9 adults. The number of rooms cannot exceed 5, and the number of adults cannot exceed 9.

rateType
required
string
Enum: "standard_rate" "package_rate"

default is "standard_rate". "package_rate" should not be shown on web page or direct customers. it should be sold with air tickets and packages.
Please contact to Sales(sales@ohmyhotel.com) to get "dynamic_rate"

totalNetAmount
required
number <double(15,2)>

should submit latest "totalNetAmount" in order to check if price changed

Responses

Request samples

Content type
application/json

ExampleObject 1

{
  • "nationalityCode": "KR",
  • "language": "KO",
  • "hotelCode": 590053,
  • "checkInDate": "2023-09-01",
  • "checkOutDate": "2023-09-03",
  • "roomTypeCode": "D_114426",
  • "ratePlanCode": "273972^345926|2^1",
  • "rooms": [
    ],
  • "rateType": "standard_rate",
  • "totalNetAmount": 171578
}

Response samples

Content type
application/json

ExampleObject 1

{
  • "transactionSetId": "75D06FE0B6154CFFBDECAAEABB49E462",
  • "status": "available",
  • "occupancy": {
    },
  • "amount": {
    },
  • "nightly": [
    ],
  • "cancellationPolicy": {
    },
  • "messageFromHotel": "From 2023-08-01 to 2023-09-15, part of the underground parking lot is under renovation. Parking may be difficult due to the lack of parking spaces.<br/>If you inquire at the front desk, we will guide you to nearby parking lots. We apologize for any inconvenience caused.",
  • "errors": [
    ]
}

reservation book

Create booking

Create an actual reservation. You must check the status of your reservation.

Authorizations:
Authorization Header
Request Body schema: application/json

request description

nationalityCode
required
string^[A-Z]{2}$

traveler's nationality. ISO3166 2 letter code

language
required
string
Enum: "EN" "KO" "JA" "VI" "ZH"

language. default is "EN"
EN - English
KO - Korean
JA - Japanese
VI - Vietamese
ZH - Chinese(simplified)

channelBookingCode
required
string [ 1 .. 100 ] characters

partner's booking code. it should be unique

required
object (book_ContactPerson)

contact person information which hotel can contact to on emergency

hotelCode
required
integer <int>

ohmyhotel hotel code

checkInDate
required
string^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-...

Check-in date, in ISO 8601 format (YYYY-MM-DD)

checkOutDate
required
string^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-...

Check-out date, in ISO 8601 format (YYYY-MM-DD)

roomTypeCode
required
string [ 1 .. 50 ] characters

room type code

roomToken
string [ 1 .. 500 ] characters

It's from room availability response. If it is returned on room availability response, It's mandatory on booking.

ratePlanCode
required
string [ 1 .. 100 ] characters

rate plan code

freeBreakfastName
string [ 1 .. 100 ] characters

free breakfast name in english, if any

required
Array of objects (book_Room)

room information to book

Array of objects (book_Request)

client's request which delivered to hotel, but it's not guaranteed

rateType
required
string
Enum: "standard_rate" "package_rate"

'standard_rate' is default. The 'package rate' is a discounted rate provided by the hotel and should not be exposed to the web or direct customers.
It must be sold together with the air tickets or sold as a package.
If you would like to receive a 'package rate', please contact your sales representative.

totalNetAmount
required
number <double(15,2)>

total amount received on "preBook" API

Responses

Request samples

Content type
application/json

ExampleObject 1

{
  • "nationalityCode": "KR",
  • "language": "KO",
  • "channelBookingCode": "T20230512001",
  • "contactPerson": {
    },
  • "hotelCode": 590053,
  • "checkInDate": "2023-09-01",
  • "checkOutDate": "2023-09-03",
  • "roomTypeCode": "D_114426",
  • "ratePlanCode": "273972^345926|2^1",
  • "freeBreakfastName": null,
  • "rooms": [
    ],
  • "requests": [
    ],
  • "rateType": "standard_rate",
  • "totalNetAmount": 171578
}

Response samples

Content type
application/json

ExampleObject 1

{
  • "transactionSetId": "11923677E2534020AD68C773B8FA7AF8",
  • "channelBookingCode": "T20230512001",
  • "ohMyBookingCode": "J23051210002H01",
  • "errors": [
    ]
}

reservation channelBookingCode

Booking detail by channel booking code

Retrieve reservation details with channel booking code.

Authorizations:
Authorization Header
path Parameters
channelBookingCode
required
string

Partner's booking code used on booking creation

Responses

Response samples

Content type
application/json

ExampleObject 1

{
  • "transactionSetId": "8D86198B8B274738AD81E814FA1EAB33",
  • "status": "Confirmed",
  • "bookingCodes": {
    },
  • "contactPerson": {
    },
  • "hotelCode": 590053,
  • "hotelName": "Ark Hotel Osaka Shinsaibashi",
  • "hotelNameByLanguage": "아크 호텔 오사카 신사이바시",
  • "regionCode": 102156,
  • "regionName": "Osaka",
  • "checkInDate": "2023-09-01",
  • "checkOutDate": "2023-09-03",
  • "roomTypeCode": "D_114426",
  • "roomTypeName": "Single C Non Smoking",
  • "roomTypeNameByLanguage": null,
  • "ratePlanCode": "273972^345926|2^1",
  • "ratePlanName": "Single Use No Meal Min 2 Nights",
  • "mealBasisCode": "B",
  • "mealBasisName": "Breakfast included",
  • "freeBreakfastName": "Japanese Breakfast",
  • "rooms": [
    ],
  • "amount": {
    },
  • "cancellationPolicy": {
    },
  • "requests": [
    ],
  • "dynamicRateYn": false,
  • "payableBy": "Ohmyhotel&Co",
  • "emergencyContact": "+82 2-733-0550",
  • "errors": [
    ]
}

reservation channelBookingCode cancel

Cancel booking

Cancel booking with the channel booking code

Authorizations:
Authorization Header
path Parameters
channelBookingCode
required
string

Partner's booking code used on booking creation

Responses

Response samples

Content type
application/json

ExampleObject 1

{
  • "transactionSetId": "8D86198B8B274738AD81E814FA1EAB33",
  • "cancelConfirmNo": "CJ23051210002H01",
  • "currencyCode": "KRW",
  • "cancelPenaltyAmount": 171578,
  • "errors": [
    ]
}

reservations fromDate toDate

summary

Search bookings

Authorizations:
Authorization Header
path Parameters
fromDate
required
string

Start date to search based on booked date. format "YYYY-MM-DD"

toDate
required
string

End date to search based on booked date. format "YYYY-MM-DD"

Responses

Response samples

Content type
application/json

ExampleObject 1

{
  • "reservations": [
    ],
  • "errors": [
    ]
}

static region

Static region list

10000 regions are returned at once, and you can continue to request them in units of page numbers

Authorizations:
Authorization Header
path Parameters
lastUpdateDate
required
string

Search for regions updated on or after the requested date in UTC+09:00, in ISO 8601 format (YYYY-MM-DD)

regionCode
integer

It is not entered at the first request and omit "/". From the second time, you must request the last 'regionCode' of the previous step.

Responses

Response samples

Content type
application/json

ExampleObject 1

{
  • "transactionSetId": "B3DAD805FA3F4C8FBD1E878AD03D6E6D",
  • "regions": [
    ],
  • "errors": [
    ]
}

static hotel

Static hotel list

10000 hotels are returned at once, and you can continue to request them in units of page numbers

Authorizations:
Authorization Header
path Parameters
lastUpdateDate
required
string

Search for hotels updated on or after the requested date in UTC+09:00, in ISO 8601 format (YYYY-MM-DD)

hotelCode
integer

It is not entered at the first request and omit "/". From the second time, you must request the last 'hotelCode' of the previous step.

Responses

Response samples

Content type
application/json

ExampleObject 1

{
  • "transactionSetId": "7C6BCC6645EA4EE8999D4BC7BD50748B",
  • "hotelCount": 2095,
  • "hotels": [
    ],
  • "errors": [
    ]
}

static information

Hotel information

Static hotel information

Authorizations:
Authorization Header
Request Body schema: application/json

request description

language
required
string
Enum: "EN" "KO" "JA" "VI" "ZH"

language. default is "EN"
EN - English
KO - Korean
JA - Japanese
VI - Vietamese
ZH - Chinese(simplified)

hotelCodes
required
Array of integers <int> [ 1 .. 100 ] items [ items <int > ]

ohmyhotel hotel codes. You can request up to 100 at a time.
The hotel code can be obtained through the 'static hotel' api.

lastUpdateDate
required
string^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-...

search for hotels updated on or after the requested date in UTC+09:00, in ISO 8601 format (YYYY-MM-DD)

Responses

Request samples

Content type
application/json

ExampleObject 1

{
  • "language": "EN",
  • "hotelCodes": [
    ],
  • "lastUpdateDate": "2023-04-01"
}

Response samples

Content type
application/json

ExampleObject 1

{
  • "transactionSetId": "D1659246B7CE4C418D4BF86C1CEC1CDD",
  • "hotels": [
    ],
  • "errors": [
    ]
}