Hoppa till innehållet

Konto

Who am I — the partner behind the presented credential.

get/v1/account

  • Kräver autentisering

Svar

200OKAccountResponse

  • partnerIdstring
  • companyNamestring
  • statusstring
  • environmentstring
  • keyIdstring
  • authMethodstring
  • scopesstring[]
  • LimitsDto
    • requestsPerSecondinteger (int32)
    • burstinteger (int32)
    • dailyQuotainteger (int32)

      0 = unlimited.

    • searchToBookRatioCapinteger (int32)kan vara null

      Searches allowed per booking over the look-to-book window; null = not capped. Over it: 429 `look_to_book_exceeded`.

  • BalanceDto
    • amountstring

      Office deposit balance, expressed in `currency`.

    • creditLimitstring
    • currencystring
  • baseUrlstringkan vara null

    The ONE base URL for both environments (the key selects the environment).

  • docsUrlstringkan vara null
  • 404Not FoundProblemdetaljer enligt RFC 7807

Kodexempel

Kompletta program som signerar anropet på det sätt som gatewayen verifierar det. Ersätt YOUR_KEY_ID och 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/account\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/account" \
  -H "X-API-Key: $KEY_ID" \
  -H "X-Timestamp: $TS" \
  -H "X-Nonce: $NONCE" \
  -H "X-Signature: $SIG" \
  -H "Accept: application/json"