### Start Booking Process Source: https://docs.emergingtravel.com/docs/integration-guide Starts the booking process by sending the booking request to suppliers and direct hotel partners. The booking status will be 'in progress'. ```APIDOC ## POST /api/b2b/v3/hotel/order/booking/finish/ ### Description Starts the booking process by sending the booking request to suppliers and direct hotel partners. The booking status will be 'in progress'. You are required to implement either 'Check booking process' or 'Receive booking status webhook' to get the final booking status. ### Method POST ### Endpoint - Sandbox: https://api-sandbox.worldota.net/api/b2b/v3/hotel/order/booking/finish/ - Production: https://api.worldota.net/api/b2b/v3/hotel/order/booking/finish/ ### Parameters #### Request Body - **orderId** (string) - Required - The identifier of the order created in the previous step. ### Request Example ```json { "orderId": "ORD112233" } ``` ### Response #### Success Response (200) - **bookingId** (string) - The identifier for the booking process. - **status** (string) - The status of the booking process, typically 'in progress'. #### Response Example ```json { "bookingId": "BOOK456789", "status": "in progress" } ``` ``` -------------------------------- ### Start Booking Process (Affiliate API) Source: https://docs.emergingtravel.com/docs/b2b-api/static-content/retrieve-hotel-content This endpoint starts the actual booking confirmation for affiliate partners. ```HTTP POST /affiliate/booking/start ``` -------------------------------- ### Response Example JSON Source: https://docs.emergingtravel.com/docs/affiliate-api/booking/start-booking-process A typical successful response structure from the Emerging Travel API, including data, debug, error, and status fields. The 'data' and 'debug' fields are null in this example, indicating no specific data or debug information is present. ```json { "data": null, "debug": null, "error": null, "status": "ok" } ``` -------------------------------- ### Start Booking Process (B2B API) Source: https://docs.emergingtravel.com/docs/b2b-api/static-content/retrieve-hotel-content This endpoint starts the actual booking confirmation after initial details and payment tokens have been provided. ```HTTP POST /b2b/booking/start ``` -------------------------------- ### Create Booking Process Request Example (cURL) Source: https://docs.emergingtravel.com/docs/affiliate-api/booking/create-booking-process This section provides cURL examples for making the 'Create booking process' API call. It includes examples for both the sandbox and production environments, demonstrating the necessary headers and the JSON payload structure. The request requires authentication credentials, content type, and a JSON body containing booking details. ```curl curl --user ':' 'https://api-sandbox.worldota.net/api/b2b/v3/hotel/order/booking/form/' \ --header 'Content-Type: application/json' \ --data '{{ "partner_order_id": "asd12399235", "book_hash": "h-372e7fa4-3a85-5a09-9f14-867766abf26c", "language": "en", "user_ip": "82.29.0.86" }}' ``` ```curl curl --user ':' 'https://api.worldota.net/api/b2b/v3/hotel/order/booking/form/' \ --header 'Content-Type: application/json' \ --data '{ "partner_order_id": "asd12399235", "book_hash": "h-372e7fa4-3a85-5a09-9f14-867766abf26c", "language": "en", "user_ip": "82.29.0.86" }' ``` -------------------------------- ### GET Request Example - ETG API V3 Source: https://docs.emergingtravel.com/docs/fundamentals/requests Demonstrates how to send a GET request to the ETG API V3 to retrieve hotel information. This method is used for obtaining data. The request includes authentication credentials and parameters in the URL. ```curl curl -g --user ':' 'https://api.worldota.net/api/b2b/v3/hotel/info/?data={"id":"city_hotel_berlin_east","language":"en"}' ``` -------------------------------- ### Start Booking Process (Affiliate API) Source: https://docs.emergingtravel.com/docs/affiliate-api/hotel-search/search-by-hotel-ids This section describes how to initiate the booking process for a hotel using the Affiliate API. It covers the initial steps required to begin a reservation. ```Affiliate API Start booking process ``` -------------------------------- ### Start Booking Process (B2B API) Source: https://docs.emergingtravel.com/docs/affiliate-api/hotel-search/search-by-hotel-ids This section describes how to initiate the booking process for a hotel using the B2B API. It covers the initial steps required to begin a reservation. ```B2B API Start booking process ``` -------------------------------- ### ETG API V3: Unexpected Method Error Example Source: https://docs.emergingtravel.com/docs/fundamentals/errors This JSON output represents an 'unexpected_method' error, which occurs when an unsupported HTTP method is used. The API expects POST and GET methods for this endpoint. ```json { "data": null, "debug": { "api_key_id": 1304, "real_ip": "52.29.104.100", "request_id": "19925f65c2763212bbe37294178b6fa6", "utcnow": "2018-08-23T09:56:37.677774" }, "error": "unexpected_method", "status": "error" } ``` -------------------------------- ### ETG Affiliate API - Start Booking Process Source: https://docs.emergingtravel.com/docs/b2b-api/hotel-search/search-by-geo-coordinates Shows how to initiate the booking process after initial details have been provided, potentially including payment information. ```http POST /affiliate/v1/booking/start ``` -------------------------------- ### Retrieve Hotel Content Request Example (cURL) Source: https://docs.emergingtravel.com/docs/affiliate-api/static-content/retrieve-hotel-content Example cURL commands to retrieve hotel content using the ETG API V3. These examples demonstrate how to authenticate and send a request with a hotel ID and language parameter. They cover both sandbox and production environments. ```curl curl --user ':' 'https://api-sandbox.worldota.net/api/b2b/v3/hotel/info/' \ --header 'Content-Type: application/json' \ --data '{ "hid": "10004834", "language": "en" }' ``` ```curl curl --user ':' 'https://api.worldota.net/api/b2b/v3/hotel/info/' \ --header 'Content-Type: application/json' \ --data '{ "hid": "10004834", "language": "en" }' ``` -------------------------------- ### Start Booking Process Request Sample (JSON) Source: https://docs.emergingtravel.com/docs/best-practices-for-apiv3 This JSON object represents a sample request body for the 'Start booking process' endpoint in the ETG v3 API. It includes user details, partner information, room and guest data, upsell options, payment details with `pay_uuid` and `init_uuid`, and the `return_path` for card payments. ```json { "user": { "email": "asdfds@foo.com", "comment": "comment", "phone": "12312321" }, "partner": { "partner_order_id": "asd123", "comment": "partner_comment", "amount_sell_b2b2c": "10" }, "language": "en", "rooms": [ { "guests": [ { "first_name": "Marty", "last_name": "Quatro" }, { "first_name": "Marta", "last_name": "Quatro" } ] } ], "upsell_data": [ { "name": "early_checkin", "uid": "d7b56e81-b874-40ee-b195-e2f73d1ec714" }, { "name": "late_checkout", "uid": "c4013ea8-3ffd-4eee-bbbc-37693670031e" } ], "payment_type": { "type": "now", "amount": "8", "currency_code": "EUR", "pay_uuid": "797870e3-e1f0-470a-87b3-38694f58bed1", "init_uuid": "c44ef1ba-595b-437f-ad14-74ce39a0f9ad" }, "return_path": "https//api.hotel.com/return_path/v1/hotel-booking/3ds" } ``` -------------------------------- ### Create Order Group - Response Example Source: https://docs.emergingtravel.com/docs/b2b-api/order-groups/create-order-group This is an example of a successful response when creating an order group. It includes the unique invoice_id for the newly created group. ```json { "data": { "invoice_id": "12980-00259" }, "debug": null, "error": null, "status": "ok" } ``` -------------------------------- ### Step 1: Provide Access and Required Materials Source: https://docs.emergingtravel.com/docs/certification Details the information and access required for the first step of the certification process, depending on whether the partner is using a website/mobile app or the API. ```APIDOC ## Step 1: Provide Access and Required Materials ### Description Partners must provide necessary access and documentation based on their integration type (Website/Mobile App or API). #### Website or Mobile App Provide access to test search and booking functionality where ETG is activated as a Provider. Options include: - Direct website access. - Video recording or screenshots covering the full flow (search → booking → cancellation) if direct access cannot be granted. - Installation file of the mobile application. #### API Applicable for partners activated as a Provider for third-party integrations. Provide: - API documentation used by partner’s clients. - Logs for completed test bookings, including Partner API request/response and ETG API request/response (preferably in JSON format). ``` -------------------------------- ### Create Order Group - cURL Example Source: https://docs.emergingtravel.com/docs/b2b-api/order-groups/create-order-group Example using cURL to create an order group. This demonstrates how to authenticate and pass the necessary order data in the request. ```curl curl --user ':' 'https://api.worldota.net/api/b2b/v3/ordergroup/create/?data={%22orders%22%3A[{%22order_id%22%3A197205577%2C%22order_type%22%3A%22hotel%22}]}' ``` -------------------------------- ### Multi-room Booking Guest Configuration Source: https://docs.emergingtravel.com/docs/best-practices-for-apiv3 This example demonstrates how to configure the 'guests' parameter for multi-room bookings. It shows an array of room configurations, each specifying the number of adults and children, including age for children. ```json "guests": [ { "adults": 2, "children": [] }, { "adults": 2, "children": [7] } ] ``` -------------------------------- ### Dump File Structure Example Source: https://docs.emergingtravel.com/docs/affiliate-api/static-content/retrieve-hotel-dump An example illustrating the line-by-line JSON object structure within the Zstd compressed dump file. Each object represents a hotel with its details. ```json { "address": "Gabriele-Tergit-Promenade 19, Berlin", "amenity_groups": [ { "amenities": [ "Common kitchen", "Kitchen" ] } ] }, { "address": "Passeig De Gracia, 68, Barcelona", "amenity_groups": [ { "amenities": [ "Common kitchen", "Kitchen" ] } ] }, { "address": "Great Cumberland Place, London", "amenity_groups": [ { "amenities": [ "Cable TV", "Locker" ] } ] } ``` -------------------------------- ### Create Booking Process (Affiliate API) Source: https://docs.emergingtravel.com/docs/affiliate-api/hotel-search/search-by-hotel-ids This section covers the process of creating a new booking using the Affiliate API. It details the steps and parameters required to initiate and confirm a hotel reservation. ```Affiliate API Create booking process ``` -------------------------------- ### Start Booking Process API Call (cURL) Source: https://docs.emergingtravel.com/docs/affiliate-api/booking/start-booking-process This snippet demonstrates how to initiate the booking process using the ETG Affiliate API V3. It requires authentication with API keys and sends a JSON payload containing user, supplier, partner, language, room, and payment details. This call should be made immediately after the 'Create booking process' call. ```cURL curl --user ':' 'https://api-sandbox.worldota.net/api/b2b/v3/hotel/order/booking/finish/' \ --header 'Content-Type: application/json' \ --data '{ \ "user": { \ "email": "john.smith@example.com", \ "comment": "The user comment.", \ "phone": "12124567899" \ }, \ "supplier_data": { \ "first_name_original": "Peter", \ "last_name_original": "Collins", \ "phone": "12124567880", \ "email": "peter.collins@example.com" \ }, \ "partner": { \ "partner_order_id": "0b370500-5321-4046-92c5-5982f1a64fc6", \ "comment": "The partner comment.", \ "amount_sell_b2b2c": "10" \ }, \ "language": "en", \ "rooms": [ \ { \ "guests": [ \ { \ "first_name": "Martin", \ "last_name": "Smith" \ }, \ { \ "first_name": "Eliot", \ "last_name": "Smith" \ } \ ] \ } \ ], \ "payment_type": { \ "type": "deposit", \ "amount": "9", \ "currency_code": "EUR" \ }, \ "return_path": "https://example.com" \ }' ``` ```cURL curl --user ':' 'https://api.worldota.net/api/b2b/v3/hotel/order/booking/finish/' \ --header 'Content-Type: application/json' \ --data '{ \ "user": { \ "email": "john.smith@example.com", \ "comment": "The user comment.", \ "phone": "12124567899" \ }, \ "supplier_data": { \ "first_name_original": "Peter", \ "last_name_original": "Collins", \ "phone": "12124567880", \ "email": "peter.collins@example.com" \ }, \ "partner": { \ "partner_order_id": "0b370500-5321-4046-92c5-5982f1a64fc6", \ "comment": "The partner comment.", \ "amount_sell_b2b2c": "10" \ }, \ "language": "en", \ "rooms": [ \ { \ "guests": [ \ { \ "first_name": "Martin", \ "last_name": "Smith" \ }, \ { \ "first_name": "Eliot", \ "last_name": "Smith" \ } \ ] \ } \ ], \ "payment_type": { \ "type": "deposit", \ "amount": "9", \ "currency_code": "EUR" \ }, \ "return_path": "https://example.com" \ }' ``` -------------------------------- ### ETG API V3: Overdue Debt Error Example Source: https://docs.emergingtravel.com/docs/fundamentals/errors This JSON example shows an 'overdue_debt' error, which is triggered when there is an outstanding debt. Users are advised to contact their account manager in this situation. ```json { "data": null, "debug": { "real_ip": "52.29.104.100", "request_id": "36f4a2ae479cc0eba8e3ddf7d09bba14", "utcnow": "2018-08-23T10:11:08.045023" }, "error": "overdue_debt", "status": "error" } ``` -------------------------------- ### Step 2: Complete the Pre-Certification Checklist Source: https://docs.emergingtravel.com/docs/certification Information regarding the mandatory pre-certification checklist that partners must complete before starting the certification. ```APIDOC ## Step 2: Complete the Pre-Certification Checklist ### Description Partners must complete the relevant Pre-certification Checklist. Submission is a mandatory requirement to begin the certification process. The checklist format may differ based on integration type. ### Requirements - Completed by the partner. - Mandatory for starting certification. - Contact API support team for the relevant checklist. ``` -------------------------------- ### Retrieve Hotel Dump - Response Example Source: https://docs.emergingtravel.com/docs/affiliate-api/static-content/retrieve-hotel-dump Example of a successful response from the 'Retrieve hotel dump' endpoint. It contains the URL to download the Zstd archive and the last update timestamp. ```json { "data": { "last_update": "2024-07-01T00:38:13Z", "url": "https://example.com/feed/dump_en.json.zst" }, "debug": null, "error": null, "status": "ok" } ``` -------------------------------- ### Incomplete Dump Content Example Source: https://docs.emergingtravel.com/docs/glossary This example shows the structure of an incomplete dump file, where each line represents a hotel object in JSON format. The ETG forms archives in the Zstd format, and each archive should be processed. ```json {"address": "Gabriele-Tergit-Promenade 19, Berlin", "amenity_groups": [{"amenities": ...} {"address": "Passeig De Gracia, 68, Barcelona", "amenity_groups": [{"amenities": ...} ... ``` -------------------------------- ### ETG Affiliate API - Create Booking Process Source: https://docs.emergingtravel.com/docs/b2b-api/hotel-search/search-by-geo-coordinates Shows the initial step in creating a booking. This typically involves sending guest and room details to the API. ```http POST /affiliate/v1/booking/create ``` -------------------------------- ### Create Booking Process Source: https://docs.emergingtravel.com/docs/integration-guide Creates a booking on the ETG end and links it with the order in your system. This is a required step in the booking flow. ```APIDOC ## POST /api/b2b/v3/hotel/order/booking/form/ ### Description Creates a booking on the ETG end and links that order with the order in your system. This endpoint is required to initiate the booking process. ### Method POST ### Endpoint - Sandbox: https://api-sandbox.worldota.net/api/b2b/v3/hotel/order/booking/form/ - Production: https://api.worldota.net/api/b2b/v3/hotel/order/booking/form/ ### Parameters #### Request Body - **prebookId** (string) - Required - The identifier obtained from the prebook step. - **customerDetails** (object) - Required - Information about the customer. - **firstName** (string) - Required - Customer's first name. - **lastName** (string) - Required - Customer's last name. - **email** (string) - Required - Customer's email address. - **paymentDetails** (object) - Required - Information for payment processing. ### Request Example ```json { "prebookId": "PB789", "customerDetails": { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com" }, "paymentDetails": { "method": "credit_card", "cardNumber": "...", "expiryDate": "..." } } ``` ### Response #### Success Response (200) - **orderId** (string) - The unique identifier for the created order. - **bookingStatus** (string) - The initial status of the booking (e.g., 'pending'). #### Response Example ```json { "orderId": "ORD112233", "bookingStatus": "pending" } ``` ``` -------------------------------- ### API Response Example Source: https://docs.emergingtravel.com/docs/b2b-api/order-groups/retrieve-order-groups An example of a successful API response for fetching booking data. It includes pagination information, group details, and a list of orders with their respective financial and status information. ```json { "data":{ "current_page_number":1, "groups":[ { "agreement_number":"B2B-12980/1", "amount_commission": { "amount":"0.73", "currency_code":"EUR" }, "amount_commission_vat":{ "amount":"0", "currency_code":"EUR" }, "amount_payable":{ "amount":"7.27", "currency_code":"EUR" }, "amount_payable_vat":{ "amount":"0", "currency_code":"EUR" }, "created_at":"2018-12-04T08:51:10.254781", "invoice_id":"12980-00260", "orders":[ { "amount_commission":{ "amount":"0.73", "currency_code":"EUR" }, "amount_commission_vat":{ "amount":"0", "currency_code":"EUR" }, "amount_payable":{ "amount":"7.27", "currency_code":"EUR" }, "amount_payable_vat":{ "amount":"0", "currency_code":"EUR" }, "created_at":"2018-12-04T08:49:36.129298", "order_id":863255831, "order_type":"hotel", "payment_due":"2018-12-14", "status":"completed" } ], "payment_due":"2018-12-14" } ], "total_groups":1, "total_pages":1 }, "debug":null, "error":null, "status":"ok" } ``` -------------------------------- ### Create Booking Process (Affiliate API) Source: https://docs.emergingtravel.com/docs/b2b-api/static-content/retrieve-hotel-content This endpoint initiates the booking process for affiliate partners. ```HTTP POST /affiliate/booking/create ``` -------------------------------- ### Response Example Source: https://docs.emergingtravel.com/docs/affiliate-api/static-content/retrieve-hotel-incremental-dump This is an example of the JSON response received when successfully requesting an incremental hotel dump. It includes the 'data' object containing the 'url' for the dump file and the 'last_update' timestamp. ```json { "data": { "last_update": "2020-07-01T00:38:13Z", "url": "https://example.com/feed/dump_en.json.zst" }, "debug": null, "error": null, "status": "ok" } ``` -------------------------------- ### Hotel Sort API Request Example (cURL) Source: https://docs.emergingtravel.com/docs/affiliate-api/hotel-search/sort-hotels Demonstrates how to call the Hotel Sort API using cURL, including authentication and request body payload. This example applies to both sandbox and production environments. ```curl curl --user ':' 'https://api-sandbox.worldota.net/api/b2b/v3/search/hotelsort/' \ --header 'Content-Type: application/json' \ --data '{ "region_id": 536, "sort_type": "b2b", "hotels_limit": 5 }' ``` ```curl curl --user ':' 'https://api.worldota.net/api/b2b/v3/search/hotelsort/' \ --header 'Content-Type: application/json' \ --data '{ "region_id": 536, "sort_type": "b2b", "hotels_limit": 5 }' ``` -------------------------------- ### Start Booking Process API Source: https://docs.emergingtravel.com/docs/fundamentals/sandbox This endpoint initiates the booking process. It handles various potential errors that can occur during the booking form stage. ```APIDOC ## POST /websites/emergingtravel/book ### Description Initiates the booking process and handles potential errors during the booking form stage. ### Method POST ### Endpoint /websites/emergingtravel/book ### Parameters #### Query Parameters - **partner_order_id** (string) - Required - Unique identifier for the partner's order. ### Request Example ```json { "partner_order_id": "example_order_id" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the booking process. #### Error Responses - **book_hash_not_found**: Unable to find the booking hash. - **booking_form_expired**: The booking form has expired. - **chosen_payment_type_was_not_available_on_booking_form**: The selected payment type was not available on the booking form. - **credit_card_required**: Credit card information is required but not provided. - **double_booking_finish**: Attempted to finish booking twice for the same order. - **email**: An issue related to email processing occurred. - **incorrect_chosen_payment_type**: The chosen payment type is incorrect. - **incorrect_guests_number**: The number of guests provided is incorrect. - **incorrect_children_data**: The data for children is incorrect. - **incorrect_rooms_number**: The number of rooms provided is incorrect. - **insufficient_b2b_balance**: Insufficient balance for B2B booking. - **order_not_found**: The specified order was not found. - **rate_not_found**: The specified rate was not found. - **return_path_required**: A return path is required. - **unauthorized_group_booking**: Unauthorized group booking attempt. - **arrival_date_differs_from_checkin_date**: The arrival date differs from the check-in date. - **not_enough_credit_card_data**: Insufficient credit card data provided. - **incorrect_init_uuid_format**: Incorrect format for initialization UUID. - **incorrect_pay_uuid_format**: Incorrect format for payment UUID. - **sandbox_restriction**: Restriction encountered in sandbox environment. - **supplier_data_required**: Supplier data is required. - **unknown**: An unknown error occurred. ### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Cancel Booking Request Example (cURL) Source: https://docs.emergingtravel.com/docs/affiliate-api/post-booking/cancel-booking This example demonstrates how to cancel a booking using cURL. It includes authentication with API keys, setting the Content-Type header to application/json, and providing the booking details in the request body. ```cURL curl --user ':' 'https://api-sandbox.worldota.net/api/b2b/v3/hotel/order/cancel/' \ --header 'Content-Type: application/json' \ --data '{ "partner_order_id": "0b370500-5321-4046-92c5-5982f1a64fc6" }' ``` ```cURL curl --user ':' 'https://api.worldota.net/api/b2b/v3/hotel/order/cancel/' \ --header 'Content-Type: application/json' \ --data '{ "partner_order_id": "0b370500-5321-4046-92c5-5982f1a64fc6" }' ```