Transaction Flow

Transaction List

The Reseller needs to develop the different transactions in order to get all the information required for creating a reservation that can be successfully sent to the Supplier via the Travel Curious Reseller API.

Info

Please note that the order in which the calls are made is very important. IDs received in the responses are used for the next request which would fail without these IDs.

  1. Suppliers - mandatory

    1. Get one supplier: GET /suppliers/{supplier_id}

    2. Get multiple suppliers: GET /suppliers

  2. Products - mandatory

    1. Get one product: GET /suppliers/{supplierid}/products/{product id}

    2. Get multiple products: GET /suppliers/{supplier_id}/products

  3. Rates - mandatory

    1. Get one rate: GET /suppliers/{supplierid}/products/{product id}/rates/{rate_id}

    2. Get multiple rates: GET /suppliers/{supplier_id}/products/{product_id}/rates

  4. Price Schedule - mandatory

    1. GET/suppliers/{supplier_id}/products/{product_id}/pricing/schedule

  5. Availability - mandatory

    1. Retrieve a single availability: GET /suppliers/{supplierid}/products/{product id}/availability

    2. Retrieve a list of availabilities: GET /suppliers/{supplier_id}/products/{product_id}/availabilities

  6. Create Hold - mandatory

    1. POST/holds

  7. Create booking - mandatory

    1. POST /bookings

  8. Cancel booking - optional

    1. PUT /bookings/cancel/{booking_id}

  9. Retrieve hold - optional

    1. GET /holds/{hold_id}

  10. Release hold - optional

    1. DELETE /holds/{hold_id}

  11. Retrieve booking - optional

    1. GET /bookings/{booking_id}

Transaction Diagram

This diagram shows the transaction dialog between you and Travel Curious. The numbers link the API call names and their link to the API spec to the order in which the call is made.


Transaction Flow Example

This example demonstrates the steps required for a booking using the Travel Curious Reseller API referred to the numbers linking the calls to the diagram above:

1 Get Supplier

Request

curl --request GET \ --url 'https://booking.redeam.io/v1.2/suppliers?partner_id={partner_id}&code={code}' \ --header 'X-Request-ID: {X-Request-ID}' \ --header 'X-API-Key: {X-API-Key}' \ --header 'X-API-Secret: {X-API-Secret}'

Response

{ "meta": { "data": {}, "reqId": "PostmanBookingAPI_9323aaa4-9cca-40fc-bb6d-da0be3c3e8e0" }, "suppliers": [ { "businessType": [], "code": "WWW", "contacts": [], "ext": {}, "id": "1ab0c295-1d16-4b5e-8719-9e7eeb13b3c6", "mainLocation": { "name": "Wisconsin", "notes": "", "website": "" }, "name": "Wisconsin Widget World", "octoID": "1ab0c295-1d16-4b5e-8719-9e7eeb13b3c6", "version": 2 }, { "businessType": [], "code": "9bd156aa-6a83-4f28-8667-bf6f9ec089fb2", "contacts": [ { "email": "members.ny@fotografiska.com", "name": "", "phone": "", "title": "" } ], "ext": {}, "id": "9bd156aa-6a83-4f28-8667-bf6f9ec089fb", "name": "Fotografiska New York", "octoID": "2", "version": 321 }, { "businessType": [], "code": "STA", "contacts": [], "ext": {}, "hours": [ { "dates": [], "daysOfWeek": [], "times": [ { "close": "17:00", "open": "08:00" } ], "timezone": "America/Chicago", "valid": { "from": "2018-10-19T23:37:31Z", "until": "2030-10-19T23:37:31Z" } } ], "id": "fc49b925-6942-4df8-954b-ed7df10adf7e", "mainLocation": { "name": "Wisconsin", "notes": "", "website": "" }, "name": "Sample Tours & Attractions", "version": 3 } ] }

2 Get Product

Request

curl --request GET \ --url 'https://booking.redeam.io/v1.2/suppliers/{supplier_id}/products?limit={limit}&offset={offset}&partner_id={partner_id}&code={code}' \ --header 'X-Request-ID: {X-Request-ID}' \ --header 'X-API-Key: {X-API-Key}' \ --header 'X-API-Secret: {X-API-Secret}'

Response

{ "meta": { "data": {}, "reqId": "PostmanBookingAPI_7806b2af-7c95-4575-8bdf-b2051cdbb841" }, "products": [ { "code": "STAGT", "contacts": [], "description": "", "hours": [ { "dates": [], "daysOfWeek": [], "times": [ { "close": "17:00", "open": "08:00" } ], "timezone": "America/Chicago", "valid": { "from": "2018-10-19T23:37:31Z", "until": "2030-10-19T23:37:31Z" } } ], "id": "02f0c6cb-77ae-4fcc-8f4d-99bc0c3bee18", "location": { "name": "Wisconsin", "notes": "", "website": "" }, "name": "Sample Tours & Attractions - Guided Tour", "otherLocations": [], "supplierId": "fc49b925-6942-4df8-954b-ed7df10adf7e", "title": "Sample Tours & Attractions - Guided Tour", "version": 3 }, { "code": "STAADAP", "contacts": [], "description": "", "hours": [ { "dates": [], "daysOfWeek": [], "times": [ { "close": "17:00", "open": "08:00" } ], "timezone": "America/Chicago", "valid": { "from": "2018-10-19T23:37:31Z", "until": "2030-10-19T23:37:31Z" } } ], "id": "76a26672-96ef-4664-946a-eb3c12127845", "location": { "name": "Wisconsin", "notes": "", "website": "" }, "name": "Sample Tours & Attractions - All Day Attractions Pass", "otherLocations": [], "supplierId": "fc49b925-6942-4df8-954b-ed7df10adf7e", "title": "Sample Tours & Attractions - All Day Attractions Pass", "version": 3 }, { "code": "STAUT", "contacts": [], "description": "", "hours": [ { "dates": [], "daysOfWeek": [], "times": [ { "close": "17:00", "open": "08:00" } ], "timezone": "America/Chicago", "valid": { "from": "2022-07-18T16:35:51Z", "until": "2030-10-19T23:37:31Z" } } ], "id": "f93a79ec-c4b7-4ebb-b14e-cb4b752610f8", "location": { "name": "Wisconsin", "notes": "", "website": "" }, "name": "Sample Tours & Attractions - Unguided Tour", "otherLocations": [], "supplierId": "fc49b925-6942-4df8-954b-ed7df10adf7e", "title": "Sample Tours & Attractions - Unguided Tour", "version": 1 } ] }

3 Get Rate

Request

curl --request GET \ --url 'https://booking.redeam.io/v1.2/suppliers/{supplier_id}/products/{product_id}/rates?valid_during_end={valid_during_end}&valid_during_start={valid_during_start}&valid_from={valid_from}&valid_until={valid_until}&limit={limit}&offset={offset}&option_id={option_id}&partner_id={partner_id}&code={code}' \ --header 'X-Request-ID: {X-Request-ID}' \ --header 'X-API-Key: {X-API-Key}' \ --header 'X-API-Secret: {X-API-Secret}'

Response

{ "meta": { "data": {}, "reqId": "PostmanBookingAPI_696805ca-61bc-49a2-a156-250b4c197912" }, "rates": [ { "cancelable": true, "code": "STASBGT", "cutoff": 1, "ext": { "supplier-id": "fc49b925-6942-4df8-954b-ed7df10adf7e" }, "holdable": true, "holdablePeriod": 86400, "hours": [ { "dates": [], "daysOfWeek": [ 1, 2, 3, 4, 5 ], "times": [ { "close": "20:00", "open": "08:00" } ], "timezone": "America/Chicago", "valid": { "from": "2019-01-01T00:00:00Z", "until": "2030-01-01T00:00:00Z" } } ], "id": "e696402f-7dbf-4ae8-9881-8577665cf9af", "maxTravelers": 10, "minTravelers": 1, "name": "Sample Tours & Attractions - Steamboat Guided Tour", "prices": [ { "id": "58249948-4f2b-4646-9732-89708204b3ee", "includedTaxes": [], "labels": [], "name": "Child", "net": { "amount": 100, "currency": "USD" }, "retail": { "amount": 100, "currency": "USD" }, "status": "ACTIVE", "travelerType": { "ageBand": "CHILD", "maxAge": 17, "minAge": 5, "modifier": "NONE", "name": "Child" } }, { "id": "1256fd2e-7bf3-4248-8720-9740bfa8e406", "includedTaxes": [], "labels": [], "name": "Adult", "net": { "amount": 100, "currency": "USD" }, "retail": { "amount": 100, "currency": "USD" }, "status": "ACTIVE", "travelerType": { "ageBand": "ADULT", "maxAge": 65, "minAge": 18, "modifier": "NONE", "name": "Adult" } } ], "pricingType": "FINAL", "productId": "02f0c6cb-77ae-4fcc-8f4d-99bc0c3bee18", "refundable": false, "title": "Sample Tours & Attractions - Steamboat Guided Tour", "type": "RESERVED", "version": 1 }, { "cancelable": true, "code": "STAVIPGT", "cutoff": 1, "ext": {}, "holdable": true, "holdablePeriod": 86400, "hours": [ { "dates": [], "daysOfWeek": [ 1, 2, 3, 4, 5 ], "times": [ { "close": "20:00", "open": "08:00" } ], "timezone": "America/Chicago", "valid": { "from": "2019-01-01T00:00:00Z", "until": "2030-01-01T00:00:00Z" } } ], "id": "0666f27f-2f16-4eba-91b7-28f08ce095d2", "maxTravelers": 10, "minTravelers": 1, "name": "Sample Tours & Attractions - VIP Guided Tour", "prices": [ { "id": "237e2049-79b3-467e-a789-fd4ab0c7219a", "includedTaxes": [ { "currency": "USD", "id": "b7f2dc71-2197-42ad-9d06-622b3ae9120d", "name": "Taxes", "net": 207, "retail": 258 } ], "labels": [], "name": "Adult", "net": { "amount": 1966, "currency": "USD" }, "retail": { "amount": 2457, "currency": "USD" }, "status": "ACTIVE", "travelerType": { "ageBand": "ADULT", "maxAge": 65, "minAge": 18, "modifier": "NONE", "name": "Adult" } }, { "id": "668da732-8be6-4f10-b997-ae187a90ec25", "includedTaxes": [ { "currency": "USD", "id": "a6710fa6-af3f-4f28-8b00-2d5ecca374d2", "name": "Taxes", "net": 169, "retail": 211 } ], "labels": [], "name": "Child", "net": { "amount": 1609, "currency": "USD" }, "retail": { "amount": 2010, "currency": "USD" }, "status": "ACTIVE", "travelerType": { "ageBand": "CHILD", "maxAge": 17, "minAge": 5, "modifier": "NONE", "name": "Child" } } ], "pricingType": "FINAL", "productId": "02f0c6cb-77ae-4fcc-8f4d-99bc0c3bee18", "refundable": false, "title": "Sample Tours & Attractions - VIP Guided Tour", "type": "RESERVED", "version": 6 }, { "cancelable": true, "code": "STAGT", "cutoff": 1440, "ext": {}, "holdable": true, "holdablePeriod": 86400, "hours": [ { "dates": [], "daysOfWeek": [ 1, 2, 3, 4, 5 ], "times": [ { "close": "17:00", "open": "09:00" } ], "timezone": "America/Chicago", "valid": { "from": "2019-01-01T00:00:00Z", "until": "3000-01-01T00:00:00Z" } } ], "id": "61d2ae81-b0e7-4570-bb26-4b634cbf84dd", "maxTravelers": 10, "minTravelers": 1, "name": "Sample Tours & Attractions - Guided Tour", "prices": [ { "id": "f42b4de7-219c-403f-83ee-4c4800c39b81", "includedTaxes": [], "labels": [], "name": "Adult", "net": { "amount": 4000, "currency": "USD" }, "retail": { "amount": 5000, "currency": "USD" }, "status": "ACTIVE", "travelerType": { "ageBand": "ADULT", "maxAge": 65, "minAge": 18, "modifier": "NONE", "name": "Adult" } }, { "id": "c0aa9b66-5d33-44f7-aa06-b71fc3904a81", "includedTaxes": [], "labels": [], "name": "Child", "net": { "amount": 2000, "currency": "USD" }, "retail": { "amount": 3000, "currency": "USD" }, "status": "ACTIVE", "travelerType": { "ageBand": "CHILD", "maxAge": 17, "minAge": 5, "modifier": "NONE", "name": "Child" } } ], "pricingType": "FINAL", "productId": "02f0c6cb-77ae-4fcc-8f4d-99bc0c3bee18", "refundable": true, "title": "Sample Tours & Attractions - Guided Tour", "type": "RESERVED", "version": 7 } ] }

4 Get Price Schedule

Request

curl --request GET \ --url 'https://booking.redeam.io/v1.2/suppliers/{supplier_id}/products/{product_id}/pricing/schedule?start_date={start_date}&end_date={end_date}&rate_id={rate_id}' \ --header 'X-API-Key: {X-API-Key}' \ --header 'X-API-Secret: {X-API-Secret}'

Response

{ "0666f27f-2f16-4eba-91b7-28f08ce095d2": { "2023-01-22": [ { "id": "cc7eea8c-6896-4ff3-82ff-a4399aea9264", "name": "Adult price for rate '0666f27f-2f16-4eba-91b7-28f08ce095d2' on '2023-01-22'", "net": { "amount": 1739, "currency": "USD" }, "original": { "amount": 1739, "currency": "USD" }, "retail": { "amount": 1739, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "6384a927-6ca7-4a5a-a24f-0c004caaca3f", "name": "Child price for rate '0666f27f-2f16-4eba-91b7-28f08ce095d2' on '2023-01-22'", "net": { "amount": 16277, "currency": "USD" }, "original": { "amount": 16277, "currency": "USD" }, "retail": { "amount": 16277, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ], "2023-01-23": [ { "id": "79ef3abe-5465-4f8c-9910-cf3f7ba41998", "name": "Adult price for rate '0666f27f-2f16-4eba-91b7-28f08ce095d2' on '2023-01-23'", "net": { "amount": 17611, "currency": "USD" }, "original": { "amount": 17611, "currency": "USD" }, "retail": { "amount": 17611, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "8f7524e6-a9e4-4e94-a2f4-778708516c12", "name": "Child price for rate '0666f27f-2f16-4eba-91b7-28f08ce095d2' on '2023-01-23'", "net": { "amount": 16219, "currency": "USD" }, "original": { "amount": 16219, "currency": "USD" }, "retail": { "amount": 16219, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ], "2023-01-24": [ { "id": "1469f86e-d649-45d7-97eb-da02d6ddc523", "name": "Adult price for rate '0666f27f-2f16-4eba-91b7-28f08ce095d2' on '2023-01-24'", "net": { "amount": 17553, "currency": "USD" }, "original": { "amount": 17553, "currency": "USD" }, "retail": { "amount": 17553, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "102efa5a-2957-425a-a0d0-b684e2464b4c", "name": "Child price for rate '0666f27f-2f16-4eba-91b7-28f08ce095d2' on '2023-01-24'", "net": { "amount": 32091, "currency": "USD" }, "original": { "amount": 32091, "currency": "USD" }, "retail": { "amount": 32091, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ], "2023-01-25": [ { "id": "dc62fb22-585e-4894-b67e-89435be5350d", "name": "Adult price for rate '0666f27f-2f16-4eba-91b7-28f08ce095d2' on '2023-01-25'", "net": { "amount": 17495, "currency": "USD" }, "original": { "amount": 17495, "currency": "USD" }, "retail": { "amount": 17495, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "4add6a0c-b3ad-4f45-9db3-1c49c4a6b10e", "name": "Child price for rate '0666f27f-2f16-4eba-91b7-28f08ce095d2' on '2023-01-25'", "net": { "amount": 32033, "currency": "USD" }, "original": { "amount": 32033, "currency": "USD" }, "retail": { "amount": 32033, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ] }, "61d2ae81-b0e7-4570-bb26-4b634cbf84dd": { "2023-01-22": [ { "id": "2ac0e148-ef36-4e39-b241-5ff5b138d6f9", "name": "Adult price for rate '61d2ae81-b0e7-4570-bb26-4b634cbf84dd' on '2023-01-22'", "net": { "amount": 19064, "currency": "USD" }, "original": { "amount": 19064, "currency": "USD" }, "retail": { "amount": 19064, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "482a9f5a-cdcd-43cc-91e1-dd786624bd73", "name": "Child price for rate '61d2ae81-b0e7-4570-bb26-4b634cbf84dd' on '2023-01-22'", "net": { "amount": 17672, "currency": "USD" }, "original": { "amount": 17672, "currency": "USD" }, "retail": { "amount": 17672, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ], "2023-01-23": [ { "id": "afc8f58e-b0f4-4bba-90fd-6a572084b7ce", "name": "Adult price for rate '61d2ae81-b0e7-4570-bb26-4b634cbf84dd' on '2023-01-23'", "net": { "amount": 19006, "currency": "USD" }, "original": { "amount": 19006, "currency": "USD" }, "retail": { "amount": 19006, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "2200e3c1-93bf-4069-a465-379b37000422", "name": "Child price for rate '61d2ae81-b0e7-4570-bb26-4b634cbf84dd' on '2023-01-23'", "net": { "amount": 776, "currency": "USD" }, "original": { "amount": 776, "currency": "USD" }, "retail": { "amount": 776, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ], "2023-01-24": [ { "id": "aa8f0c2a-71fd-4b07-a4de-5a60a44d72f6", "name": "Adult price for rate '61d2ae81-b0e7-4570-bb26-4b634cbf84dd' on '2023-01-24'", "net": { "amount": 18948, "currency": "USD" }, "original": { "amount": 18948, "currency": "USD" }, "retail": { "amount": 18948, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "37fad15b-d08d-4590-b975-88df0eedc218", "name": "Child price for rate '61d2ae81-b0e7-4570-bb26-4b634cbf84dd' on '2023-01-24'", "net": { "amount": 718, "currency": "USD" }, "original": { "amount": 718, "currency": "USD" }, "retail": { "amount": 718, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ], "2023-01-25": [ { "id": "1ece1d24-0fcb-4a23-9117-8b300f24af94", "name": "Adult price for rate '61d2ae81-b0e7-4570-bb26-4b634cbf84dd' on '2023-01-25'", "net": { "amount": 18890, "currency": "USD" }, "original": { "amount": 18890, "currency": "USD" }, "retail": { "amount": 18890, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "064a042f-b8de-4e25-a93d-dad659e89289", "name": "Child price for rate '61d2ae81-b0e7-4570-bb26-4b634cbf84dd' on '2023-01-25'", "net": { "amount": 17498, "currency": "USD" }, "original": { "amount": 17498, "currency": "USD" }, "retail": { "amount": 17498, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ] }, "e696402f-7dbf-4ae8-9881-8577665cf9af": { "2023-01-22": [ { "id": "47433cfe-f578-45ae-bba3-5cdc075b2796", "name": "Adult price for rate 'e696402f-7dbf-4ae8-9881-8577665cf9af' on '2023-01-22'", "net": { "amount": 20940, "currency": "USD" }, "original": { "amount": 20940, "currency": "USD" }, "retail": { "amount": 20940, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "487ae990-08c2-4537-8591-5de202b9f8e9", "name": "Child price for rate 'e696402f-7dbf-4ae8-9881-8577665cf9af' on '2023-01-22'", "net": { "amount": 2710, "currency": "USD" }, "original": { "amount": 2710, "currency": "USD" }, "retail": { "amount": 2710, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ], "2023-01-23": [ { "id": "b763a028-7665-4789-a89d-3457074f5867", "name": "Adult price for rate 'e696402f-7dbf-4ae8-9881-8577665cf9af' on '2023-01-23'", "net": { "amount": 20882, "currency": "USD" }, "original": { "amount": 20882, "currency": "USD" }, "retail": { "amount": 20882, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "bc1f0b92-54da-44ac-b507-cb6a45432dff", "name": "Child price for rate 'e696402f-7dbf-4ae8-9881-8577665cf9af' on '2023-01-23'", "net": { "amount": 3560, "currency": "USD" }, "original": { "amount": 3560, "currency": "USD" }, "retail": { "amount": 3560, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ], "2023-01-24": [ { "id": "8280adb2-5005-4bfe-82e1-637d4cba1f55", "name": "Adult price for rate 'e696402f-7dbf-4ae8-9881-8577665cf9af' on '2023-01-24'", "net": { "amount": 21732, "currency": "USD" }, "original": { "amount": 21732, "currency": "USD" }, "retail": { "amount": 21732, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "dac7c7c2-7ae0-4d41-afca-a14942121613", "name": "Child price for rate 'e696402f-7dbf-4ae8-9881-8577665cf9af' on '2023-01-24'", "net": { "amount": 4411, "currency": "USD" }, "original": { "amount": 4411, "currency": "USD" }, "retail": { "amount": 4411, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ], "2023-01-25": [ { "id": "776505c1-bc94-4112-b57c-097a8dae4d33", "name": "Adult price for rate 'e696402f-7dbf-4ae8-9881-8577665cf9af' on '2023-01-25'", "net": { "amount": 22583, "currency": "USD" }, "original": { "amount": 22583, "currency": "USD" }, "retail": { "amount": 22583, "currency": "USD" }, "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "name": "Adult" } }, { "id": "6eaa5133-2e0f-4be9-8bda-bb275d73e959", "name": "Child price for rate 'e696402f-7dbf-4ae8-9881-8577665cf9af' on '2023-01-25'", "net": { "amount": 4353, "currency": "USD" }, "original": { "amount": 4353, "currency": "USD" }, "retail": { "amount": 4353, "currency": "USD" }, "travelerType": { "ageBand": "CHILD", "maxAge": 99, "minAge": 1, "name": "Child" } } ] } }

5 Get Availability

Request

curl --request GET \ --url 'https://booking.redeam.io/v1.2/suppliers/{supplier_id}/products/{product_id}/availabilities?end={end}&start={start}&rate_id={rate_id}' \ --header 'X-Request-ID: {X-Request-ID}' \ --header 'X-API-Key: {X-API-Key}' \ --header 'X-API-Secret: {X-API-Secret}'

Response

{ "availabilities": { "byProduct": {}, "byRate": { "0666f27f-2f16-4eba-91b7-28f08ce095d2": { "availability": [ { "capacity": 42, "end": "2023-01-22T21:00:00Z", "id": "1eaa8aa3-cbe7-4b1b-ab30-bf65f044a5b2", "maxCapacity": -1, "start": "2023-01-22T20:00:00Z" }, { "capacity": 42, "end": "2023-01-22T23:00:00Z", "id": "e04428ac-dfc4-40d8-ac0b-7bae8adb5ce7", "maxCapacity": -1, "start": "2023-01-22T22:00:00Z" }, { "capacity": 42, "end": "2023-01-23T18:00:00Z", "id": "ea3350cc-7c8a-4022-989c-4b7885e96f97", "maxCapacity": -1, "start": "2023-01-23T17:00:00Z" }, { "capacity": 42, "end": "2023-01-23T21:00:00Z", "id": "560b1b3d-d9fd-48ef-a8f2-fe0316076522", "maxCapacity": -1, "start": "2023-01-23T20:00:00Z" }, { "capacity": 42, "end": "2023-01-24T21:00:00Z", "id": "6bc43439-8f16-4ee7-a489-de0d141e14e2", "maxCapacity": -1, "start": "2023-01-24T20:00:00Z" }, { "capacity": 42, "end": "2023-01-22T18:00:00Z", "id": "d41bf98e-2533-401f-af9a-e2c5f8c9d522", "maxCapacity": -1, "start": "2023-01-22T17:00:00Z" }, { "capacity": 42, "end": "2023-01-23T00:00:00Z", "id": "09766e51-ec82-4db1-b6e2-eb866ceb925f", "maxCapacity": -1, "start": "2023-01-22T23:00:00Z" }, { "capacity": 42, "end": "2023-01-23T17:00:00Z", "id": "380f768a-29ee-4327-aa4a-51b93132acc5", "maxCapacity": -1, "start": "2023-01-23T16:00:00Z" }, { "capacity": 42, "end": "2023-01-23T19:00:00Z", "id": "46ad97c4-1a1d-4e15-ae3c-18781b163e74", "maxCapacity": -1, "start": "2023-01-23T18:00:00Z" }, { "capacity": 42, "end": "2023-01-23T22:00:00Z", "id": "d5cf1ab6-f002-4570-9ab1-88968c279202", "maxCapacity": -1, "start": "2023-01-23T21:00:00Z" }, { "capacity": 42, "end": "2023-01-24T23:00:00Z", "id": "ce0041f1-a793-4bf0-bffd-75638737b0fb", "maxCapacity": -1, "start": "2023-01-24T22:00:00Z" }, { "capacity": 42, "end": "2023-01-25T00:00:00Z", "id": "27b99dab-77d2-4f29-8c1f-885fee7ff50a", "maxCapacity": -1, "start": "2023-01-24T23:00:00Z" }, { "capacity": 42, "end": "2023-01-22T17:00:00Z", "id": "91355d9e-2988-4c34-bbdc-ce74a5febbd3", "maxCapacity": -1, "start": "2023-01-22T16:00:00Z" }, { "capacity": 42, "end": "2023-01-23T20:00:00Z", "id": "e67b444b-d04d-4f76-875a-b8269fbb5a59", "maxCapacity": -1, "start": "2023-01-23T19:00:00Z" }, { "capacity": 42, "end": "2023-01-24T00:00:00Z", "id": "5a96fb37-a5ec-49f3-b2a1-626b334adbfc", "maxCapacity": -1, "start": "2023-01-23T23:00:00Z" }, { "capacity": 42, "end": "2023-01-24T17:00:00Z", "id": "457c80f3-8ff0-4a74-89b6-a1ec91c6789a", "maxCapacity": -1, "start": "2023-01-24T16:00:00Z" }, { "capacity": 42, "end": "2023-01-22T19:00:00Z", "id": "66b74bc0-adce-4648-9b0a-2d8d642e6d0c", "maxCapacity": -1, "start": "2023-01-22T18:00:00Z" }, { "capacity": 42, "end": "2023-01-22T22:00:00Z", "id": "b532cbb7-2d4e-4ecf-b677-bf5ccecbcc4b", "maxCapacity": -1, "start": "2023-01-22T21:00:00Z" }, { "capacity": 42, "end": "2023-01-23T23:00:00Z", "id": "cb21ab58-7ef4-478f-8ebc-f58f155acc17", "maxCapacity": -1, "start": "2023-01-23T22:00:00Z" }, { "capacity": 42, "end": "2023-01-24T18:00:00Z", "id": "c8a062e6-a0ab-413b-8afc-b256fe12c2b6", "maxCapacity": -1, "start": "2023-01-24T17:00:00Z" }, { "capacity": 42, "end": "2023-01-24T19:00:00Z", "id": "95159509-bbff-4dcf-bb7d-1a35aba71fc8", "maxCapacity": -1, "start": "2023-01-24T18:00:00Z" }, { "capacity": 42, "end": "2023-01-24T20:00:00Z", "id": "a9ed12b2-6557-46d4-a51f-2b3802a7bde4", "maxCapacity": -1, "start": "2023-01-24T19:00:00Z" }, { "capacity": 42, "end": "2023-01-24T22:00:00Z", "id": "035260c6-77b3-4e28-ad48-1677b344e301", "maxCapacity": -1, "start": "2023-01-24T21:00:00Z" }, { "capacity": 42, "end": "2023-01-22T20:00:00Z", "id": "79d18dd1-2c86-4c32-b69e-347616f6f8b8", "maxCapacity": -1, "start": "2023-01-22T19:00:00Z" } ] } }, "expires": "2023-01-19T13:01:41Z", "productId": "02f0c6cb-77ae-4fcc-8f4d-99bc0c3bee18", "retrieved": "2023-01-19T12:01:41Z" }, "meta": { "data": {}, "reqId": "PostmanBookingAPI_3cb21111-d5b0-41e3-a95e-a4c9f1d1743c" } }

6 Create Hold

Request

{ "hold": { "ext": { backend":"standard-adapter-mock-res" }, "id": "f7393cf6-097d-443a-919a-ae3ca518e040", "items": [ { "at": "2023-01-22T16:00:00.000Z", "availabilityId": "7894e608-d3e0-4e4a-9f3e-fef07c1ebae4", "ext": { backend":"standard-adapter-mock-res" }, "id": "7b9cb23b-cba2-430f-b513-212a3be90c23" "priceId": "cc7eea8c-6896-4ff3-82ff-a4399aea9264", "productId":"02f0c6cb-77ae-4fcc-8f4d-99bc0c3bee18", "quantity": 1, "rateId": "0666f27f-2f16-4eba-91b7-28f08ce095d2", "supplierId": "fc49b925-6942-4df8-954b-ed7df10adf7e", "travelerType": "ADULT" } ], "partnerId": "p0be" }, "meta": { "reqId": "5fd78809-4700-46d7-8386-3b8738117f4d" } }

Response

{ "hold": { "expires": "2023-01-18T14:03:28Z", "ext": { "backend": "standard-adapter-mock-res" }, "id": "f7393cf6-097d-443a-919a-ae3ca518e040", "items": [ { "at": "2023-01-22T16:00:00.000Z", "availabilityId": "7894e608-d3e0-4e4a-9f3e-fef07c1ebae4", "ext": { "backend": "standard-adapter-mock-res" }, "id": "7b9cb23b-cba2-430f-b513-212a3be90c23", "priceId": "cc7eea8c-6896-4ff3-82ff-a4399aea9264", "productId": "02f0c6cb-77ae-4fcc-8f4d-99bc0c3bee18", "quantity": 1, "rateId": "0666f27f-2f16-4eba-91b7-28f08ce095d2", "supplierId": "fc49b925-6942-4df8-954b-ed7df10adf7e", "travelerType": "ADULT" } ], "status": "PENDING", "timeline": [ { "timestamp": "2023-01-17T14:03:28Z", "typeOf": "PENDING" }, { "timestamp": "2023-01-17T14:03:28Z", "typeOf": "OPEN" } ] }, "meta": { "data": {}, "reqId": "PostmanBookingAPI_c7bc5edf-56f1-48c9-803c-fb91e23a6639" } }

7 Create Booking

Request

{ "booking": { "barcode": { "format": "UNKNOWN", "value": "test" }, "customer": { "email": "daniel@g2rail.com"", "firstName": "Daniel", "lastName": "Teng" "phone":"" }, "holdId": "f7393cf6-097d-443a-919a-ae3ca518e040", "items": [ { "availabilityId": "FHA[35578179]_S[2022-08-28T03:00:00-10:00]", "productId": "{{product_id}}", "priceId": "cc7eea8c-6896-4ff3-82ff-a4399aea9264", "quantity": 1, "rateId": "0666f27f-2f16-4eba-91b7-28f08ce095d2", "startTime": "2023-01-22T16:00:00.000Z", "supplierId": "fc49b925-6942-4df8-954b-ed7df10adf7e", "traveler": { "age": 0, "country": "", "email": "daniel@g2rail.com", "firstName": "Daniel", "gender": "", "isLead": true, "lang": "", "lastName": "Teng", "type": "ADULT" } } ], "partnerId": "p0pg9" } }

Response

{ "booking": { "barcode": { "format": "UNKNOWN", "value": "test" }, "cancelable": true, "customer": { "email": "daniel@g2rail.com", "firstName": "Daniel", "lastName": "Teng", "phone": "" }, "ext": { "backend": "standard-adapter-mock-res", "reseller.ref": "" }, "holdId": "f7393cf6-097d-443a-919a-ae3ca518e040", "id": "68860b43-c7d0-4caa-9926-c579197fc453", "items": [ { "availabilityId": "", "ext": { "backend": "standard-adapter-mock-res" }, "id": "2244f10b-a9c9-4062-8fe6-10f376357419", "priceId": "cc7eea8c-6896-4ff3-82ff-a4399aea9264", "productId": "02f0c6cb-77ae-4fcc-8f4d-99bc0c3bee18", "quantity": 1, "rate": { "cancelable": true, "code": "STAVIPGT", "cutoff": 1, "ext": {}, "holdable": true, "holdablePeriod": 86400, "hours": [ { "dates": [], "daysOfWeek": [ 1, 2, 3, 4, 5 ], "times": [ { "close": "20:00", "open": "08:00" } ], "timezone": "America/Chicago", "valid": { "from": "2019-01-01T00:00:00Z", "until": "2030-01-01T00:00:00Z" } } ], "id": "0666f27f-2f16-4eba-91b7-28f08ce095d2", "maxTravelers": 10, "minTravelers": 1, "name": "Sample Tours & Attractions - VIP Guided Tour", "prices": [ { "id": "237e2049-79b3-467e-a789-fd4ab0c7219a", "includedTaxes": [ { "currency": "USD", "id": "b7f2dc71-2197-42ad-9d06-622b3ae9120d", "name": "Taxes", "net": 207, "retail": 258 } ], "labels": [], "name": "Adult", "net": { "amount": 1966, "currency": "USD" }, "retail": { "amount": 2457, "currency": "USD" }, "status": "ACTIVE", "travelerType": { "ageBand": "ADULT", "maxAge": 65, "minAge": 18, "modifier": "NONE", "name": "Adult" } }, { "id": "668da732-8be6-4f10-b997-ae187a90ec25", "includedTaxes": [ { "currency": "USD", "id": "a6710fa6-af3f-4f28-8b00-2d5ecca374d2", "name": "Taxes", "net": 169, "retail": 211 } ], "labels": [], "name": "Child", "net": { "amount": 1609, "currency": "USD" }, "retail": { "amount": 2010, "currency": "USD" }, "status": "ACTIVE", "travelerType": { "ageBand": "CHILD", "maxAge": 17, "minAge": 5, "modifier": "NONE", "name": "Child" } }, { "id": "cc7eea8c-6896-4ff3-82ff-a4399aea9264", "includedTaxes": [], "labels": [], "name": "Adult price for rate '0666f27f-2f16-4eba-91b7-28f08ce095d2' on '2023-01-22'", "net": { "amount": 1739, "currency": "USD" }, "original": { "amount": 1739, "currency": "USD" }, "retail": { "amount": 1739, "currency": "USD" }, "status": "ACTIVE", "travelerType": { "ageBand": "ADULT", "maxAge": 99, "minAge": 1, "modifier": "NONE", "name": "Adult" } } ], "pricingType": "FINAL", "productId": "02f0c6cb-77ae-4fcc-8f4d-99bc0c3bee18", "refundable": false, "title": "Sample Tours & Attractions - VIP Guided Tour", "type": "RESERVED", "version": 6 }, "rateId": "0666f27f-2f16-4eba-91b7-28f08ce095d2", "startTime": "2023-01-22T16:00:00Z", "status": "OPEN", "supplierId": "fc49b925-6942-4df8-954b-ed7df10adf7e", "traveler": { "age": 0, "country": "", "email": "daniel@g2rail.com", "firstName": "Daniel", "gender": "", "isLead": true, "lang": "", "lastName": "Teng", "phone": "", "type": "ADULT" } } ], "resellerBookingRef": "", "status": "CANCELLED", "tickets": [ { "barcode": { "format": "QR_CODE", "value": "c4057c77-8fa7-41f8-b529-161ab67cf531" }, "bookingItemIds": [ "2244f10b-a9c9-4062-8fe6-10f376357419" ], "guests": [ { "count": 1, "typeCode": "ADULT", "typeModifier": "NONE", "typeName": "ADULT" } ], "leadTraveler": { "age": 0, "country": "", "email": "daniel@g2rail.com", "firstName": "Daniel", "gender": "", "isLead": true, "lang": "", "lastName": "Teng", "phone": "", "type": "ADULT" }, "status": "CANCELLED" } ], "timeline": [ { "timestamp": "2023-01-17T14:09:12Z", "typeOf": "PENDING" }, { "timestamp": "2023-01-17T14:09:12Z", "typeOf": "OPEN" }, { "timestamp": "2023-01-17T14:11:37Z", "typeOf": "CANCELLED" } ], "version": 3 }, "meta": { "data": {}, "reqId": "PostmanBookingAPI_33cfa6c9-db11-40bd-a7d2-53e9a6ec3470" } }

8 Cancel Booking

Request

curl --request PUT \ --url 'https://booking.redeam.io/v1.2/bookings/cancel/{booking_id}' \ --header 'X-Request-ID: {X-Request-ID}' \ --header 'X-API-Key: {X-API-Key}' \ --header 'X-API-Secret: {X-API-Secret}'

Response

No response body, only 200 or other errors