POST/api/events/{slug}/manage/partners/standing
「イベント」の分類の、新しく作る、または操作を実行するために内容を送る API。ブラウザでログインした本人(cookie)として呼ぶ。
- 要約
主以外のイベントのパートナーの段の設定・件数・手動付与/取消を 1 件保存する(理由必須・監査)
- 呼び方と印
ログイン(cookie)・レート制限
短い時間に呼びすぎると断られる API(レート制限)。断られたら Retry-After の秒数を待って呼び直す。
URL に付ける値(パラメータ)
経路の中の波かっこの部分と、URL の ? の後ろに付ける値。「必須」の印があるものは省けない。
slugpath必須string
送るもの(本文)application/json
送る本文の欄。「必須」の印がある欄は省けない。
|1必須objectop必須"settings"expectedRevision必須integer≥0confirmed必須truesettings必須object | nullweights必須objectticketSold必須integer0–1000referralVisitor必須integer0–1000guildJoined必須integer0–1000thresholds必須objectbronze必須integer1–1000000silver必須integer1–1000000gold必須integer1–1000000unlocks必須objectbronze必須array<"logo" | "stage" | "booth">件数 ≤3silver必須array<"logo" | "stage" | "booth">件数 ≤3gold必須array<"logo" | "stage" | "booth">件数 ≤3|2必須objectop必須"inputs"expectedRevision必須integer≥0confirmed必須truetarget必須objectkind必須"guild" | "venture" | "company"id必須string(uuid)referralVisitor必須integer0–1000000guildJoined必須integer0–1000000|3必須objectop必須"override"expectedRevision必須integer≥0confirmed必須truetarget必須objectkind必須"guild" | "venture" | "company"id必須string(uuid)action必須"grant" | "revoke" | "clear"tier任意"bronze" | "silver" | "gold"reason任意string長さ ≤300
返るもの(応答)200 · application/json
成功したときに返る形。入れ子の欄は、その行を押すと開く・閉じる。「任意」の印がある欄は返らないことがある。
oktruerevisioninteger≥0
失敗したとき(エラー)
失敗したときの状態コードと、その意味。本文の error の値で、プログラムが失敗の種類を見分けられる。
- 400HTTP 400(x-bounty-error-codes を参照)
- 401HTTP 401(x-bounty-error-codes を参照)
- 403HTTP 403(x-bounty-error-codes を参照)
- 404HTTP 404(x-bounty-error-codes を参照)
- 409HTTP 409(x-bounty-error-codes を参照)
- 413HTTP 413(x-bounty-error-codes を参照)
- 415HTTP 415(x-bounty-error-codes を参照)
- 428HTTP 428(x-bounty-error-codes を参照)
- 429HTTP 429(x-bounty-error-codes を参照)
- 500HTTP 500(x-bounty-error-codes を参照)
- 503HTTP 503(x-bounty-error-codes を参照)
- forbidden
- not_found
- event_not_found
- manager_reverify_required
- session_required
- invalid_origin
- unsupported_media_type
- invalid_input
- payload_too_large
- subject_not_found
- revision_conflict
- partner_tiers_invalid
- partner_tiers_limit
- consent_required
- rate_limited
- internal_error
呼び出しの見本
そのまま試せる呼び出しの例。curl と fetch をタブで切り替える。ID やトークンは自分の値に置き換える。
curl -X POST "https://bounty.spikes.4s.link/api/events/{slug}/manage/partners/standing" \
-b "bounty_session=$COOKIE_AUTH" \
-H "Content-Type: application/json" \
-d '{
"op": "settings",
"expectedRevision": 0,
"confirmed": true,
"settings": {
"weights": {
"ticketSold": 0,
"referralVisitor": 0,
"guildJoined": 0
},
"thresholds": {
"bronze": 1,
"silver": 1,
"gold": 1
},
"unlocks": {
"bronze": [],
"silver": [],
"gold": []
}
}
}'