API การเดินทาง · v1
สร้างบนทุกส่วนของการเดินทาง
การเชื่อมต่อเดียว สองผลิตภัณฑ์: API เที่ยวบิน (ปฏิทินค่าโดยสาร ค้นหา คิดราคา บริการเสริม คำสั่งซื้อ ออกตั๋ว ยกเลิก) และ API โรงแรม (ค้นหาตามเมืองหรือรหัสโรงแรม ห้องพัก ตรวจสอบราคา จอง ยกเลิก) พร้อมข้อมูลคงที่ JSON ที่สะอาดผ่าน HTTPS คำขอที่ลงนาม และ URL หลักเดียวสำหรับแซนด์บ็อกซ์และระบบใช้งานจริง
URL หลัก
https://api.dubaitrip.com/v1URL เดียวสำหรับแซนด์บ็อกซ์และระบบใช้งานจริง — คีย์เป็นตัวกำหนด: คีย์ dt_sbx_ เข้าถึงระบบทดสอบของซัพพลายเออร์ของเรา คีย์ dt_live_ เข้าถึงสินค้าจริง
คู่มือ
- เริ่มต้นใช้งานอย่างรวดเร็วตั้งแต่สมัครจนถึงจองเที่ยวบินในแซนด์บ็อกซ์ได้ในห้าขั้นตอน
- การยืนยันตัวตนยืนยันตัวตนได้สองวิธี ทั้งคู่ผูกกับ ID คีย์ของคุณ: คำขอที่ลงนาม (แนะนำ) หรือโทเค็น Bearer แบบ OAuth 2 client-credentials
- สภาพแวดล้อม ขีดจำกัด และการกำหนดเวอร์ชันURL หลักเดียวสำหรับแซนด์บ็อกซ์และระบบใช้งานจริง คีย์ที่คุณใช้ลงนามเป็นตัวเลือกสภาพแวดล้อม
- ข้อผิดพลาดทุกความล้มเหลวคือเอกสารปัญหาตาม RFC 7807 พร้อมรหัสที่คงที่และเครื่องอ่านได้
- API เที่ยวบินปฏิทินค่าโดยสาร ค้นหาจากสายการบิน 900+ แห่ง คิดราคาข้อเสนอ เพิ่มบริการเสริม สร้างคำสั่งซื้อ ออกตั๋ว ขอใบเสนอราคาและดำเนินการคืนเงิน
- API โรงแรมค้นหาที่พัก 1.5M+ แห่งด้วยรหัสเมือง (แบบ IATA เช่น DXB) หรือด้วยรหัสโรงแรมที่คุณเก็บไว้จากแค็ตตาล็อกของเรา อ่านราคาระดับห้องพร้อมประเภทอาหารและนโยบายการยกเลิก ตรวจสอบและจอง และยกเลิกตามนโยบาย
- ข้อมูลคงที่ข้อมูลอ้างอิงสำหรับสร้าง UI การค้นหาและสำหรับจัดเก็บแคตตาล็อกโรงแรมของเราตามเมือง: สนามบิน สายการบิน เมือง และโรงแรม
- บันทึกการเปลี่ยนแปลงทุกการเปลี่ยนแปลงของ API การเดินทาง เรียงจากใหม่ไปเก่า
เอนด์พอยต์
การยืนยันตัวตน
บัญชี
เที่ยวบิน
- get
/v1/flights/price-calendarCheapest fare per day for a route over a date window, from our price cache — instant and never a live supplier call. Draw a fare calendar before searching. Omit the return window for one-way prices. - post
/v1/flights/searchSearch flights. Returns a session to poll, or the complete result when `wait` is true. - get
/v1/flights/search/{searchId}Read the next page of a running search. `status` becomes `complete` when every supplier answered. - post
/v1/flights/offers/{offerId}/priceRe-price an offer right before booking. `priceChanged` tells you the total moved. - get
/v1/flights/offers/{offerId}/fare-rulesFare rules and conditions of an offer. - get
/v1/flights/offers/{offerId}/ancillariesChargeable extras available for an offer — today extra checked-baggage allowances, priced by the airline per passenger. Add them to the order via `ancillaries[]` on POST /v1/flights/orders. - post
/v1/flights/ordersCreate an order (hold) from an offer. Requires an `Idempotency-Key` header. - get
/v1/flights/orders/{orderId}Read an order: status, time limit, tickets. - post
/v1/flights/orders/{orderId}/issueIssue the tickets of a held order (charges your deposit balance). - get
/v1/flights/orders/{orderId}/refund-quoteWhat a cancellation would refund, before you commit. - post
/v1/flights/orders/{orderId}/cancelCancel: a held order is released; a ticketed order is voided inside the void window, else refunded. - get
/v1/flights/scheduleTimetable for a route on one day: which flights operate, with local times and equipment — no fares. Query: `origin`, `destination` (IATA), `date` (yyyy-MM-dd). - post
/v1/flights/orders/{orderId}/exchange/searchExchange step 1: search replacement itineraries for a ticketed order. Offers come back in the search shape and expire the same way. - post
/v1/flights/orders/{orderId}/exchange/quoteExchange step 2: what exchanging the listed tickets onto an offer would cost. No side effects. - post
/v1/flights/orders/{orderId}/exchangeExchange step 3: re-issue the listed tickets onto the offer (charges your deposit balance). Requires an `Idempotency-Key` header.
โรงแรม
- post
/v1/hotels/searchSearch hotels by city code (IATA-style, e.g. DXB — see /v1/content/cities), by hotel codes from your stored catalogue, or by a geo circle. Returns a session to poll, or the complete result when `wait` is true. - get
/v1/hotels/search/{searchId}Read the next page of a running search. Pass the same dates and room count as the search so rate keys stay bookable. - get
/v1/hotels/{hotelCode}/roomsRoom types of a hotel. Pass any `rateKey` from the same search so the right supplier answers. - post
/v1/hotels/rates/{rateKey}/checkPre-book check: confirms the rate is still bookable and its price. - post
/v1/hotels/bookingsBook a rate. Requires an `Idempotency-Key` header. - get
/v1/hotels/bookings/{bookingId}Read a booking (voucher). - get
/v1/hotels/bookings/{bookingId}/cancellation-quoteWhat a cancellation would refund, before you commit. - post
/v1/hotels/bookings/{bookingId}/cancelCancel a booking under its cancellation policy.
เนื้อหา
- get
/v1/content/airportsAirports (IATA), optionally filtered by a free-text term or a country. - get
/v1/content/citiesCities usable as a hotel search destination, optionally filtered by term or country. - get
/v1/content/airlinesAirlines (IATA two-letter codes). - get
/v1/content/hotelsLook up hotels by city and/or name — a lookup, not a catalogue export: a cityCode or a name of 3+ characters is required, 50 per page, 20 pages per query. Store the codes you need: availability is searched by `cityCode` or `hotelCodes`.