رفتن به محتوا

حساب

Who am I — the partner behind the presented credential.

get/v1/account

  • نیازمند احراز هویت

پاسخ‌ها

200OKAccountResponse

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

      0 = unlimited.

    • searchToBookRatioCapinteger (int32)می‌تواند 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
  • baseUrlstringمی‌تواند null باشد

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

  • docsUrlstringمی‌تواند null باشد
  • 404Not Foundجزئیات مشکل RFC 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=''
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"