GET/api/me/referral
「紹介」の分類の、情報を読み出す API。ログインした本人として呼ぶ。
- 要約
自分の紹介の状況(参加登録・保存済みの紹介コード)
- 呼び方と印
ログイン
返るもの(応答)200 · application/json
成功したときに返る形。入れ子の欄は、その行を押すと開く・閉じる。「任意」の印がある欄は返らないことがある。
eventIdstringentriesarray<object>entryIdstringstatestringtreeUrlstringtotalCountinteger | null
codesarray<object>entryIdstringcodestringmaxRedemptionsintegerredeemedCountintegerremainingintegertargetTicketobjectidstringnamestring
invitationLimitConfiguredbooleaninvitationUrl任意stringcheckedAt任意stringvalidation任意"valid" | "invalid" | "unavailable"
codeStatus"ready" | "requires_request" | "unavailable"codeFailuresarray<object>entryIdstringreason"permission_denied" | "auth_required" | "unavailable"
summaryobject | nulleventIdstring | nullavailablebooleanasOfstring | nullsource"saved_all_time_aggregates"directInviteCountinteger | nullindirectInviteCountinteger | nulldescendantCountinteger | nullcheckedInInviteCountinteger | null
rankingUrlstringcountCoverage"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"