PATCH/api/me/profile
「自分」の分類の、対象のうち、送った項目だけを直す API。ログインした本人として呼ぶ。
- 要約
プロフィールを更新する(省いた項目は変えない。充実度の前後と加点を返す)
- 呼び方と印
ログイン・応答の詳細は準備中
送るもの(本文)application/json
送る本文の欄。「必須」の印がある欄は省けない。
title任意string | nullorgName任意string | nullbio任意string | nullcatchphrase任意string | nulllookingFor任意string | nulllinks任意record<string>discoverable任意booleanshareVenueArrival任意booleanwantLabels任意array<string>件数 ≤8professionalOpportunities任意objectversion必須1hiring必須objectauthority必須"decision" | "recommend" | "none"intent必須"interested" | "open" | "none"contracting必須objectauthority必須"decision" | "recommend" | "none"intent必須"interested" | "open" | "none"investment必須objectauthority必須"decision" | "recommend" | "none"intent必須"interested" | "open" | "none"targetLabelKeys必須array<string>件数 ≤40otherByCluster必須record<string>note必須string | nullworkRequests任意array<object>件数 ≤5id必須string(uuid)domainKeys必須array<string>件数 1–4description必須stringprofessionalOpportunitiesPatch任意objecthiring任意object | nullauthority必須"decision" | "recommend" | "none"intent必須"interested" | "open" | "none"investment任意object | nullauthority必須"decision" | "recommend" | "none"intent必須"interested" | "open" | "none"participantCategory任意"student" | "professional"academic任意objectgradYear必須integer | null1950–2100gradMonth任意integer | null1–12enrollmentStatus必須enum(5)- "active"
- "on_leave"
- "graduated"
- "withdrawn"
- "unknown"
schoolCode任意string | null/^[A-Z0-9]{4,16}$/schoolName任意string | null長さ ≤80faculty任意string | nullstanding任意"undergraduate" | "graduate" | "working" | "other" | nullgrade任意string | nullfoursWriteBack任意boolean
返るもの(応答)200 · application/json
応答の詳細は準備中
失敗したとき(エラー)
失敗したときの状態コードと、その意味。本文の error の値で、プログラムが失敗の種類を見分けられる。
- 400入力の誤り(error = invalid_input など)
- 401未ログイン(unauthorized)/ Bearer が無効(invalid_token。WWW-Authenticate 付き)
- 403権限が無い
- 404HTTP 404(x-bounty-error-codes を参照)
- 428HTTP 428(x-bounty-error-codes を参照)
- user_not_found
- academic_required
- unknown_label
- professional_only
- consent_required
呼び出しの見本
そのまま試せる呼び出しの例。curl と fetch をタブで切り替える。ID やトークンは自分の値に置き換える。
curl -X PATCH "https://bounty.spikes.4s.link/api/me/profile" \
-H "Authorization: Bearer $BEARER_AUTH" \
-H "Content-Type: application/json" \
-d '{}'