本文へ移動
Bounty Developer

GET/api/me/referral

「紹介」の分類の、情報を読み出す API。ログインした本人として呼ぶ。

要約

自分の紹介の状況(参加登録・保存済みの紹介コード)

呼び方と印

ログイン

返るもの(応答)200 · application/json

成功したときに返る形。入れ子の欄は、その行を押すと開く・閉じる。「任意」の印がある欄は返らないことがある。

  • eventIdstring
  • entriesarray<object>
    • entryIdstring
    • statestring
    • treeUrlstring
    • totalCountinteger | null
  • codesarray<object>
    • entryIdstring
    • codestring
    • maxRedemptionsinteger
    • redeemedCountinteger
    • remaininginteger
    • targetTicketobject
      • idstring
      • namestring
    • invitationLimitConfiguredboolean
    • invitationUrl任意string
    • checkedAt任意string
    • validation任意"valid" | "invalid" | "unavailable"
  • codeStatus"ready" | "requires_request" | "unavailable"
  • codeFailuresarray<object>
    • entryIdstring
    • reason"permission_denied" | "auth_required" | "unavailable"
  • summaryobject | null
    • eventIdstring | null
    • availableboolean
    • asOfstring | null
    • source"saved_all_time_aggregates"
    • directInviteCountinteger | null
    • indirectInviteCountinteger | null
    • descendantCountinteger | null
    • checkedInInviteCountinteger | null
  • rankingUrlstring
  • countCoverage"event_all_time"

失敗したとき(エラー)

失敗したときの状態コードと、その意味。本文の error の値で、プログラムが失敗の種類を見分けられる。

  • 400入力の誤り(error = invalid_input など)
  • 401未ログイン(unauthorized)/ Bearer が無効(invalid_token。WWW-Authenticate 付き)
  • 403権限が無い
  • 502HTTP 502(x-bounty-error-codes を参照)
  • 503HTTP 503(x-bounty-error-codes を参照)
  • referral_not_configured
  • fours_reconnect_required
  • referral_unavailable

呼び出しの見本

そのまま試せる呼び出しの例。curl と fetch をタブで切り替える。ID やトークンは自分の値に置き換える。

curl "https://bounty.spikes.4s.link/api/me/referral" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET /api/me/referral | Bounty Developer