پروازیں
Exchange 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/search
- تصدیقِ شناخت ضروری ہے
پیرامیٹرز
| نام | مقام | قسم | تفصیل |
|---|---|---|---|
| orderId* | پاتھ | string |
درخواست کی باڈیExchangeSearchRequest
- FlightSlice[]
- originstring
IATA airport or city code.
- destinationstring
- departureDatestring
yyyy-MM-dd.
- PassengerCounts
- adultsinteger (int32)
- childreninteger (int32)
- infantsinteger (int32)
- couponNointeger (int32)null ہو سکتا ہے
Coupon of the ticket being replaced (1-based). Default 1.
مثال
{
"slices": [
{
"origin": "string",
"destination": "string",
"departureDate": "string"
}
],
"passengers": {
"adults": 1,
"children": 1,
"infants": 1
},
"couponNo": 1
}جوابات
200OKFlightSearchResponse
- searchIdstring
- statusstring
in_progress | complete.
- cursorinteger (int32)
- suppliersDoneinteger (int32)
- supplierCountinteger (int32)
- FlightOffer[]
- offerIdstring
- expiresAtstring (date-time)
UTC ISO-8601; the offer must be priced/booked before this.
- validatingCarrierstringnull ہو سکتا ہے
- Slice[]
- PassengerPricing[]
- Money
Money on the wire: decimal string (never a float) + ISO 4217.
- Money
Money on the wire: decimal string (never a float) + ISO 4217.
- Money
Money on the wire: decimal string (never a float) + ISO 4217.
- refundablebooleannull ہو سکتا ہے
- passportRequiredboolean
- selfTransferboolean
- charterboolean
- tripTypestringnull ہو سکتا ہے
- 400Bad RequestRFC 7807 مسئلے کی تفصیلات
- 404Not FoundRFC 7807 مسئلے کی تفصیلات
کوڈ کی مثالیں
مکمل پروگرام جو درخواست پر بالکل اسی طرح دستخط کرتے ہیں جیسے گیٹ وے اس کی تصدیق کرتا ہے۔ YOUR_KEY_ID اور YOUR_SECRET کو تبدیل کریں۔
# Sign the request: METHOD \n path+query \n unix time \n nonce \n sha256(body)
KEY_ID="YOUR_KEY_ID"
SECRET="YOUR_SECRET"
BODY='{
"slices": [
{
"origin": "string",
"destination": "string",
"departureDate": "string"
}
],
"passengers": {
"adults": 1,
"children": 1,
"infants": 1
},
"couponNo": 1
}'
TS=$(date +%s)
NONCE=$(openssl rand -hex 16)
BODY_HASH=$(printf '%s' "$BODY" | openssl dgst -sha256 | sed 's/^.* //')
CANON=$(printf 'POST\n/v1/flights/orders/ZnVWRmFQNlNQQlE5V0N2bHZnPT0/exchange/search\n%s\n%s\n%s' "$TS" "$NONCE" "$BODY_HASH")
SIG=$(printf '%s' "$CANON" | openssl dgst -sha256 -hmac "$SECRET" | sed 's/^.* //')
curl -X POST "https://api.dubaitrip.com/v1/flights/orders/ZnVWRmFQNlNQQlE5V0N2bHZnPT0/exchange/search" \
-H "X-API-Key: $KEY_ID" \
-H "X-Timestamp: $TS" \
-H "X-Nonce: $NONCE" \
-H "X-Signature: $SIG" \
-H "Content-Type: application/json" \
-d "$BODY"