本文へ移動
Bounty Developer

PATCH/api/me/profile

「自分」の分類の、対象のうち、送った項目だけを直す API。ログインした本人として呼ぶ。

要約

プロフィールを更新する(省いた項目は変えない。充実度の前後と加点を返す)

呼び方と印

ログイン・応答の詳細は準備中

送るもの(本文)application/json

送る本文の欄。「必須」の印がある欄は省けない。

  • title任意string | null
  • orgName任意string | null
  • bio任意string | null
  • catchphrase任意string | null
  • lookingFor任意string | null
  • links任意record<string>
  • discoverable任意boolean
  • shareVenueArrival任意boolean
  • wantLabels任意array<string>
    件数 ≤8
  • professionalOpportunities任意object
  • version必須1
  • hiring必須object
  • authority必須"decision" | "recommend" | "none"
  • intent必須"interested" | "open" | "none"
  • contracting必須object
  • authority必須"decision" | "recommend" | "none"
  • intent必須"interested" | "open" | "none"
  • investment必須object
  • authority必須"decision" | "recommend" | "none"
  • intent必須"interested" | "open" | "none"
  • targetLabelKeys必須array<string>
    件数 ≤40
  • otherByCluster必須record<string>
  • note必須string | null
  • workRequests任意array<object>
    件数 ≤5
  • id必須string(uuid)
  • domainKeys必須array<string>
    件数 1–4
  • description必須string
  • professionalOpportunitiesPatch任意object
  • hiring任意object | null
  • authority必須"decision" | "recommend" | "none"
  • intent必須"interested" | "open" | "none"
  • investment任意object | null
  • authority必須"decision" | "recommend" | "none"
  • intent必須"interested" | "open" | "none"
  • participantCategory任意"student" | "professional"
  • academic任意object
  • gradYear必須integer | null
    1950–2100
  • gradMonth任意integer | null
    1–12
  • enrollmentStatus必須enum(5)
    • "active"
    • "on_leave"
    • "graduated"
    • "withdrawn"
    • "unknown"
  • schoolCode任意string | null
    /^[A-Z0-9]{4,16}$/
  • schoolName任意string | null
    長さ ≤80
  • faculty任意string | null
  • standing任意"undergraduate" | "graduate" | "working" | "other" | null
  • grade任意string | null
  • foursWriteBack任意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 '{}'
PATCH /api/me/profile | Bounty Developer