ফ্লাইট
Exchange step 3: re-issue the listed tickets onto the offer (charges your deposit balance). Requires an `Idempotency-Key` header.
post/v1/flights/orders/{orderId}/exchange
- প্রমাণীকরণ প্রয়োজন
প্যারামিটার
| নাম | অবস্থান | ধরন | বিবরণ |
|---|---|---|---|
| orderId* | path | string |
রিকোয়েস্ট বডিExchangeRequest
- offerIdstring
- ticketNumbersstring[]
E-ticket numbers to exchange. Every ticket listed must belong to the order.
- couponNumbersinteger (int32)[]null হতে পারে
Coupon numbers (1-based) being replaced, one per slice of the new itinerary. Default [1].
- Contact
- emailstring
- phonestring
E.164 or national with dial code.
- remarkstringnull হতে পারে
{
"offerId": "string",
"ticketNumbers": [
"string"
],
"couponNumbers": [
1
],
"contact": {
"email": "string",
"phone": "string"
},
"remark": "string"
}রেসপন্স
200OKFlightOrder
- orderIdstring
- bookingReferencestringnull হতে পারে
- statusstring
held | ticketed | cancelled | voided | refunded | pending | exchanged | expired | unknown.
- ticketTimeLimitstring (date-time)null হতে পারে
- Money
Money on the wire: decimal string (never a float) + ISO 4217.
- amountstring
- currencystring
- PassengerPricing[]
- typestring
ADT | CHD | INF.
- quantityinteger (int32)
- 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.
- Tax[]
- Slice[]
- durationMinutesinteger (int32)
- Segment[]
- OrderPassenger[]
- typestring
- firstNamestring
- lastNamestring
- genderstringnull হতে পারে
- dateOfBirthstringnull হতে পারে
- nationalitystringnull হতে পারে
- Ticket[]
- Contact
- emailstring
- phonestring
E.164 or national with dial code.
- priceChangedboolean
- canCancelbooleannull হতে পারে
- 400Bad RequestRFC 7807 সমস্যার বিবরণ
- 402Payment RequiredRFC 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='{
"offerId": "string",
"ticketNumbers": [
"string"
],
"couponNumbers": [
1
],
"contact": {
"email": "string",
"phone": "string"
},
"remark": "string"
}'
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\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" \
-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"