Usage Instructions
Integrate TwoWay hotel management system into your workflow. Create, modify, cancel, and search bookings. Manage inventory, rate prices, and rate plans.
Actions
twoway_booking_insert
Create a new booking in TWO WAY hotel management system
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenClient | string | Yes | Client authentication token |
tokenApplication | string | Yes | Application authentication token |
hotelCode | string | Yes | Hotel identification code (sent in header) |
creatorId | string | Yes | Partner system name (e.g., "CRS HIGS") |
sourceOfBusiness | string | Yes | Booking source code, max 7 chars (e.g., "BOOKING") |
idHotel | number | Yes | Hotel ID number in HIGS |
checkin | string | Yes | Check-in date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss) |
checkout | string | Yes | Check-out date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss) |
dateTimeInclusion | string | Yes | Booking creation datetime (YYYY-MM-DDTHH:mm:ss) |
guestCount | number | Yes | Total number of adult guests |
mainGuestGivenName | string | Yes | Main guest first name (max 30 chars) |
mainGuestSurename | string | Yes | Main guest surname (max 30 chars) |
mainGuestEmail | string | Yes | Main guest email (max 50 chars) |
roomTypeCode | string | Yes | Room type identifier code (e.g., "201", "602") |
hotelReservationNumber | string | Yes | Reservation number in integrator system |
typeReservation | number | Yes | Booking type identifier code |
currencyCode | string | Yes | Currency code ISO 4217 (e.g., "BRL", "USD") |
numberChildren | number | No | Number of children (default: 0) |
mainGuestTelephone | string | No | Main guest phone (max 20 chars) |
mainGuestAddressLine | string | No | Main guest address (max 70 chars) |
mainGuestCity | string | No | Main guest city (max 255 chars) |
mainGuestState | string | No | Main guest state/province (max 255 chars) |
mainGuestZipCode | string | No | Main guest postal code (max 12 chars) |
mainGuestCountry | string | No | Main guest country (max 255 chars) |
guests | array | No | Additional guests: [{givenName, lastName, age, ageQualifyingCode}]. AgeQualifyingCode: 10=Adult, 6=ChildZone2, 8=Child |
comment | string | No | Reservation remarks (max 1400 chars) |
ratePlanCode | string | No | Rate plan identifier code |
commission | number | No | Commission value (25 for commissioned, 0 for non-commissioned) |
typePayment | number | No | Payment type: 1=Credit Card, 2=Direct in Hotel, 3=Invoiced |
typeInvoice | string | No | Invoice types as JSON array when typePayment=3 (e.g., ["Ty","Tx"]). Options: Ty, Tt, Tx, An, Di, Cf, Tl, Tu, Bu, Fb, Lv |
creditCardFlag | string | No | Card flag: VI=Visa, IK=Mastercard, DC=Diners, AX=Amex, EL=Elo, DS=Discover |
creditCardName | string | No | Name printed on card (max 30 chars) |
creditCardNumber | string | No | Card number (max 24 chars) |
creditCardSecurityCode | string | No | Card security code/CVV (max 8 chars) |
creditCardExpiration | string | No | Card expiration date (MM/YY) |
companyId | string | No | Company/Agency ID in integrator (max 30 chars) |
companyName | string | No | Company/Agency name (max 60 chars) |
companyAddress | string | No | Company street address (max 60 chars) |
companyAddressNumber | string | No | Company address number (max 20 chars) |
companyComplement | string | No | Company address complement (max 60 chars) |
companyCity | string | No | Company city (max 60 chars) |
companyState | string | No | Company state (max 60 chars) |
companyCountry | string | No | Company country (max 60 chars) |
companyEmail | string | No | Company email (max 100 chars) |
companyPhone | string | No | Company phone (max 30 chars) |
rates | array | No | Daily rates: [{effectiveDate: "YYYY-MM-DD", amount: 150.00}] |
totalAmountBeforeTax | number | No | Total amount without fees and taxes |
taxes | array | No | Taxes: [{codeTax, value, description}]. CodeTax: 1=Service charge, 2=Service Tax, 3=Tourist tax, 4=Ecological, 5=Circulation, 6=Added, 18=Food&Bev, 28=Juiz de Fora |
extraServices | array | No | Extra services: [{date, serviceCode, serviceType, service, place, comment, currency, amountAfterTax, amountBeforeTax, quantity, guestList}] |
Output
| Parameter | Type | Description |
|---|---|---|
data | json | Response data from booking insertion |
status | number | HTTP status code |
headers | json | Response headers |
twoway_booking_modify
Modify an existing booking in TWO WAY hotel management system
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenClient | string | Yes | Client authentication token |
tokenApplication | string | Yes | Application authentication token |
hotelCode | string | Yes | Hotel identification code (sent in header) |
creatorId | string | Yes | Partner system name (e.g., "CRS HIGS") |
sourceOfBusiness | string | Yes | Booking source code, max 7 chars (e.g., "BOOKING") |
idHotel | number | Yes | Hotel ID number in HIGS |
checkin | string | Yes | Check-in date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss) |
checkout | string | Yes | Check-out date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss) |
dateTimeInclusion | string | Yes | Booking creation datetime (YYYY-MM-DDTHH:mm:ss) |
guestCount | number | Yes | Total number of adult guests |
mainGuestGivenName | string | Yes | Main guest first name (max 30 chars) |
mainGuestSurename | string | Yes | Main guest surname (max 30 chars) |
mainGuestEmail | string | Yes | Main guest email (max 50 chars) |
roomTypeCode | string | Yes | Room type identifier code (e.g., "201", "602") |
hotelReservationNumber | string | Yes | Reservation number in integrator system |
typeReservation | number | Yes | Booking type identifier code |
currencyCode | string | Yes | Currency code ISO 4217 (e.g., "BRL", "USD") |
numberChildren | number | No | Number of children (default: 0) |
mainGuestTelephone | string | No | Main guest phone (max 20 chars) |
mainGuestAddressLine | string | No | Main guest address (max 70 chars) |
mainGuestCity | string | No | Main guest city (max 255 chars) |
mainGuestState | string | No | Main guest state/province (max 255 chars) |
mainGuestZipCode | string | No | Main guest postal code (max 12 chars) |
mainGuestCountry | string | No | Main guest country (max 255 chars) |
guests | array | No | Additional guests: [{givenName, lastName, age, ageQualifyingCode}]. AgeQualifyingCode: 10=Adult, 6=ChildZone2, 8=Child |
comment | string | No | Reservation remarks (max 1400 chars) |
ratePlanCode | string | No | Rate plan identifier code |
commission | number | No | Commission value (25 for commissioned, 0 for non-commissioned) |
typePayment | number | No | Payment type: 1=Credit Card, 2=Direct in Hotel, 3=Invoiced |
typeInvoice | string | No | Invoice types as JSON array when typePayment=3 (e.g., ["Ty","Tx"]). Options: Ty, Tt, Tx, An, Di, Cf, Tl, Tu, Bu, Fb, Lv |
creditCardFlag | string | No | Card flag: VI=Visa, IK=Mastercard, DC=Diners, AX=Amex, EL=Elo, DS=Discover |
creditCardName | string | No | Name printed on card (max 30 chars) |
creditCardNumber | string | No | Card number (max 24 chars) |
creditCardSecurityCode | string | No | Card security code/CVV (max 8 chars) |
creditCardExpiration | string | No | Card expiration date (MM/YY) |
companyId | string | No | Company/Agency ID in integrator (max 30 chars) |
companyName | string | No | Company/Agency name (max 60 chars) |
companyAddress | string | No | Company street address (max 60 chars) |
companyAddressNumber | string | No | Company address number (max 20 chars) |
companyComplement | string | No | Company address complement (max 60 chars) |
companyCity | string | No | Company city (max 60 chars) |
companyState | string | No | Company state (max 60 chars) |
companyCountry | string | No | Company country (max 60 chars) |
companyEmail | string | No | Company email (max 100 chars) |
companyPhone | string | No | Company phone (max 30 chars) |
rates | array | No | Daily rates: [{effectiveDate: "YYYY-MM-DD", amount: 150.00}] |
totalAmountBeforeTax | number | No | Total amount without fees and taxes |
taxes | array | No | Taxes: [{codeTax, value, description}]. CodeTax: 1=Service charge, 2=Service Tax, 3=Tourist tax, 4=Ecological, 5=Circulation, 6=Added, 18=Food&Bev, 28=Juiz de Fora |
extraServices | array | No | Extra services: [{date, serviceCode, serviceType, service, place, comment, currency, amountAfterTax, amountBeforeTax, quantity, guestList}] |
Output
| Parameter | Type | Description |
|---|---|---|
data | json | Response data from booking modification |
status | number | HTTP status code |
headers | json | Response headers |
twoway_booking_cancel
Cancel an existing booking in TWO WAY hotel management system
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenClient | string | Yes | Client authentication token |
tokenApplication | string | Yes | Application authentication token |
hotelCode | string | Yes | Hotel identification code |
reservationNumberCmNet | string | Yes | Reservation number to cancel |
Output
| Parameter | Type | Description |
|---|---|---|
data | json | Response data from booking cancellation |
status | number | HTTP status code |
headers | object | Response headers |
twoway_booking_search
Search for a booking by reservation ID in TWO WAY hotel management system
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenClient | string | Yes | Client authentication token |
tokenApplication | string | Yes | Application authentication token |
hotelCode | string | Yes | Hotel identification code |
reservationId | string | Yes | Reservation ID to search for |
Output
| Parameter | Type | Description |
|---|---|---|
data | json | Booking information |
status | number | HTTP status code |
headers | object | Response headers |
twoway_inventory_load
Load inventory data for a hotel in TWO WAY hotel management system
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenClient | string | Yes | Client authentication token |
tokenApplication | string | Yes | Application authentication token |
hotelCode | string | Yes | Hotel identification code |
startDate | string | Yes | Start date for inventory load (YYYY-MM-DD format) |
endDate | string | Yes | End date for inventory load (YYYY-MM-DD format) |
idHotel | number | Yes | Hotel ID number |
propagation | boolean | No | Enable propagation |
Output
| Parameter | Type | Description |
|---|---|---|
data | json | Inventory data for the specified date range |
status | number | HTTP status code |
headers | object | Response headers |
twoway_rate_prices_load
Load rate prices data for a hotel in TWO WAY hotel management system
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenClient | string | Yes | Client authentication token |
tokenApplication | string | Yes | Application authentication token |
hotelCode | string | Yes | Hotel identification code |
startDate | string | Yes | Start date for rate prices (YYYY-MM-DD format) |
endDate | string | Yes | End date for rate prices (YYYY-MM-DD format) |
idHotel | number | Yes | Hotel ID number |
Output
| Parameter | Type | Description |
|---|---|---|
data | json | Rate prices data for the specified date range |
status | number | HTTP status code |
headers | object | Response headers |
twoway_rateplan_list
Download rateplan list for a hotel in TWO WAY hotel management system
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenClient | string | Yes | Client authentication token |
tokenApplication | string | Yes | Application authentication token |
idHotel | number | Yes | Hotel ID number |
typeList | number | No | Type of list (e.g., 2) |
id | string | No | Optional ID parameter |
Output
| Parameter | Type | Description |
|---|---|---|
data | json | List of rateplans for the hotel |
status | number | HTTP status code |
headers | object | Response headers |