Vai al contenuto

Voli

Read an order: status, time limit, tickets.

get/v1/flights/orders/{orderId}

  • Richiede autenticazione

Parametri

NomePosizioneTipoDescrizione
orderId*percorsostring

Risposte

200OKFlightOrder

  • orderIdstring
  • bookingReferencestringpuò essere null
  • statusstring

    held | ticketed | cancelled | voided | refunded | pending | exchanged | expired | unknown.

  • ticketTimeLimitstring (date-time)può essere 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
    • genderstringpuò essere null
    • dateOfBirthstringpuò essere null
    • nationalitystringpuò essere null
    • Ticket[]
  • Contact
    • emailstring
    • phonestring

      E.164 or national with dial code.

  • priceChangedboolean
  • canCancelbooleanpuò essere null
  • 404Not FoundDettagli del problema RFC 7807

Esempi di codice

Programmi completi che firmano la richiesta nel modo in cui il gateway la verifica. Sostituisci YOUR_KEY_ID e 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=''
TS=$(date +%s)
NONCE=$(openssl rand -hex 16)
BODY_HASH=$(printf '%s' "$BODY" | openssl dgst -sha256 | sed 's/^.* //')
CANON=$(printf 'GET\n/v1/flights/orders/ZnVWRmFQNlNQQlE5V0N2bHZnPT0\n%s\n%s\n%s' "$TS" "$NONCE" "$BODY_HASH")
SIG=$(printf '%s' "$CANON" | openssl dgst -sha256 -hmac "$SECRET" | sed 's/^.* //')

curl -X GET "https://api.dubaitrip.com/v1/flights/orders/ZnVWRmFQNlNQQlE5V0N2bHZnPT0" \
  -H "X-API-Key: $KEY_ID" \
  -H "X-Timestamp: $TS" \
  -H "X-Nonce: $NONCE" \
  -H "X-Signature: $SIG" \
  -H "Accept: application/json"