Offers API Documentation¶
Overview¶
The Offers API provides endpoints for managing hotel offers, inquiries, and reservations. These endpoints allow clients to retrieve available room types, create customized offers, generate email templates, and process reservation requests.
Base URL¶
1 |
|
Environment URLs:
- Production: https://bookingservice.apps.gustaffo.com
- UAT: https://bookingservice.uat.apps.gustaffo.com
- Development: https://bookingservice.dev.apps.gustaffo.com
Authentication¶
Most API endpoints require authentication via OAuth2/JWT tokens. The following roles are used for access control:
- ROLE_reservationmanager
: Hotel reservation managers
- ROLE_admin
: System administrators
- ROLE_web
: Web application access
Some public endpoints are available without authentication for customer-facing applications.
Endpoints¶
List Enabled Hotels¶
Returns a list of hotels that are enabled in the system and that the authenticated user has access to.
1 |
|
Authorization¶
Requires ROLE_reservationmanager
or ROLE_admin
Response¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
Preview Offer Template¶
Generates a preview of an offer email template based on reservation details.
1 |
|
Authorization¶
Requires ROLE_reservationmanager
or ROLE_admin
Request Body¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
Response¶
Returns an array of EmailTemplate objects with rendered templates:
1 2 3 4 5 6 7 8 |
|
Submit Reservation Offer¶
Processes a reservation offer request and sends email confirmations.
1 |
|
Authorization¶
Requires ROLE_reservationmanager
or ROLE_admin
Request Headers¶
Header | Required | Description |
---|---|---|
referer | No | Referring URL |
Request Parameters¶
Parameter | Required | Description |
---|---|---|
asm-ticket | No | ASM ticket ID for tracking |
Request Body¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
Response¶
1 2 3 4 |
|
Submit Customer Offer Request¶
Endpoint for customers to submit offer requests directly.
1 |
|
Request Body¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Response¶
Returns the request object if successful:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Submit Widget Offer Request¶
Endpoint for embedded widgets to submit offer requests.
1 |
|
Cross-Origin Access¶
This endpoint supports CORS with wildcard origins and headers.
Request Headers¶
Header | Required | Description |
---|---|---|
referer | No | Referring URL |
Request Body¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Response¶
Returns the request object if successful.
Submit Customized Reservation¶
Creates and sends a customized reservation offer.
1 |
|
Authorization¶
Requires ROLE_reservationmanager
or ROLE_admin
Request Headers¶
Header | Required | Description |
---|---|---|
referer | No | Referring URL |
Request Parameters¶
Parameter | Required | Description |
---|---|---|
asm-ticket | No | ASM ticket ID for tracking |
Request Body¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
Response¶
1 2 3 4 |
|
Get Customized Email Template¶
Generates a preview of a customized offer email template.
1 |
|
Authorization¶
Requires ROLE_reservationmanager
or ROLE_admin
Request Body¶
Same as the request body for /customReservation/customizedReservation
Response¶
Returns the HTML content of the email template or an error response:
1 2 3 4 |
|
Make IBE Call for Customized Offer¶
Makes a call to the IBE (Internet Booking Engine) to get offer details.
1 |
|
Authorization¶
Requires ROLE_reservationmanager
or ROLE_admin
Request Body¶
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Response¶
Returns an Offer object with available rooms and rate plans.
Get Available Room Types¶
Retrieves available room types and rate plans for specified hotels and dates.
1 |
|
Authorization¶
Requires ROLE_reservationmanager
, ROLE_admin
, or ROLE_web
Request Parameters¶
Parameter | Required | Default | Description |
---|---|---|---|
custom | No | false | Flag for customized offers |
Request Body¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Response¶
Returns a map of hotel IDs to available rate plans and room types:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
Get Available Rooms Only¶
Retrieves only available rooms for specified hotels and dates.
1 |
|
Authorization¶
Requires ROLE_reservationmanager
, ROLE_admin
, or ROLE_web
Request Body¶
Same as the request body for /availableRoomTypes
Response¶
Similar to the response for /availableRoomTypes
, but only includes rooms that are available.
Get Offline Available Room Types¶
Retrieves room types from the database when IBE connection is not available.
1 |
|
Authorization¶
Requires ROLE_reservationmanager
or ROLE_admin
Request Body¶
Same as the request body for /availableRoomTypes
Response¶
Similar to the response for /availableRoomTypes
, but data comes from the local database rather than the IBE.
Get Email Template¶
Retrieves a specific email template by inquiry ID and timestamp.
1 |
|
Path Parameters¶
Parameter | Required | Description |
---|---|---|
inquiryId | Yes | ID of the inquiry |
timeStamp | Yes | Timestamp of the inquiry creation |
Response¶
Returns the HTML content of the email template or an error response:
1 2 3 4 |
|
Show Offer Request¶
Returns an empty inquiry object for form initialization.
1 |
|
Request Parameters¶
Parameter | Required | Description |
---|---|---|
inquiryId | Yes | ID of the inquiry to show |
Response¶
Returns an empty Inquiry object.
Error Responses¶
Common Error Codes¶
Status Code | Description |
---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Authentication required |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource does not exist |
500 | Internal Server Error |
Error Response Format¶
1 2 3 4 |
|
Data Models¶
ReservationOffer¶
Represents a reservation offer request.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
CustomizedReservation¶
Represents a customized reservation offer.
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Room¶
Represents a hotel room with its details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
CustomIBECall¶
Represents a request to the Internet Booking Engine.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Rate Limiting¶
API endpoints are subject to rate limiting to prevent abuse:
- 100 requests per minute per client for authenticated endpoints
- 300 requests per minute for public endpoints
Webhook Integration¶
When offers are created or updated, webhooks can be triggered to external systems. To configure webhook destinations, use the webhook management API.
Payment Integration¶
The Offers API integrates with the Payment Processing system to handle deposits and payments for reservations. When a reservation is confirmed, the system can automatically initiate payment requests based on the hotel's deposit policy.
Payment Flow¶
- Guest receives and accepts an offer
- System creates a reservation in the PMS
- If deposit is required, system initiates a payment request
- Guest completes payment through the payment gateway
- System receives confirmation and updates reservation status
- If configured, system posts the deposit to the PMS (e.g., Apaleo)
Payment Methods¶
The following payment methods are supported for reservation deposits:
- Credit Cards (Visa, Mastercard, American Express, Diners Club)
- Debit Cards
- PayPal
- Bank Transfers (offline processing)
Payment methods available for a specific reservation may vary based on the hotel's configuration and the guest's location.
For detailed information about payment processing, refer to the Payment Processing API Documentation.
Batch Operations¶
For bulk operations with large volumes of offers, it's recommended to process them in batches and implement appropriate error handling and retry mechanisms.