本文へ移動
Bounty Developer

POST/api/guilds/register/platform

「学生団体・ベンチャー」の分類の、新しく作る、または操作を実行するために内容を送る API。ログインした本人として呼ぶ。

要約

ASSEMBLE共通の学生団体登録(審査待ち、intentId同値再試行)

呼び方と印

ログイン

送るもの(本文)application/json

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

  • basicProfile任意object
  • nameKana任意string | null
    長さ ≤240
  • organizationType任意string | null
    長さ ≤80
  • baseUniversities任意array<string>
    件数 ≤20
  • foundedYearMonth任意string | null
    /^(19[5-9]\d|20\d\d|2100)-(0[1-9]|1[0-2])$/
  • studentMemberCount任意integer | null
    0–100000
  • activitySummary任意string | null
    長さ ≤2000
  • catchphrase任意string | null
    長さ ≤40
  • memberCount任意integer | null
    1–100000
  • intentId必須string(uuid)
  • name必須string
    長さ 1–200
  • website必須string
    長さ ≤500
  • instagram必須string
    長さ ≤500
  • x必須string
    長さ ≤500
  • otherLinks必須array<object>
    Array<{ title: 1-40文字, url: https 500文字以内 }>(最大10件)。旧形式(改行区切りのURL文字列 / URL文字列の配列)も受け、タイトルは hostname になる件数 ≤10
  • title必須string
    長さ ≥1
  • url必須string
    長さ ≥1
  • memberScale必須enum(8)
    • "1人"
    • "2-4人"
    • "5-9人"
    • "10-19人"
    • "20-49人"
    • "50人以上"
    • "1-4人"
    • "20-50人"
  • categories必須array<enum(29)>
    件数 1–29
  • otherCategory必須string
    長さ ≤120
  • description必須string
    長さ 1–30
  • logoImageId必須string(uuid)
  • applicant必須object
  • role必須string
    長さ ≤100
  • name必須string
    長さ ≤120
  • userId任意string(uuid) | null
  • institution任意string
    長さ ≤200 · 既定 ""
  • graduation任意string
    長さ ≤40 · 既定 ""
  • lineUrl任意string
    長さ ≤2048 · 既定 ""
  • instagram任意string
    長さ ≤2048 · 既定 ""
  • email必須string(email)
    長さ 1–254
  • representativeSameApplicant必須boolean
  • representative必須object
  • role必須string
    長さ ≤100
  • name必須string
    長さ ≤120
  • userId任意string(uuid) | null
  • institution任意string
    長さ ≤200 · 既定 ""
  • graduation任意string
    長さ ≤40 · 既定 ""
  • lineUrl任意string
    長さ ≤2048 · 既定 ""
  • instagram任意string
    長さ ≤2048 · 既定 ""
  • nextRepresentativeUndecided必須boolean
  • nextRepresentative必須object
  • role必須string
    長さ ≤100
  • name必須string
    長さ ≤120
  • userId任意string(uuid) | null
  • institution任意string
    長さ ≤200 · 既定 ""
  • graduation任意string
    長さ ≤40 · 既定 ""
  • lineUrl任意string
    長さ ≤2048 · 既定 ""
  • instagram任意string
    長さ ≤2048 · 既定 ""
  • officers必須array<object>
    件数 ≤7
  • role必須string
    長さ 1–100
  • name必須string
    長さ 1–120
  • userId任意string(uuid) | null
  • 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
  • platformConsent必須true

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

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

  • applicationIdstring
  • kind"guild" | "venture"
  • idstring
  • slugstring

失敗したとき(エラー)

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

  • 400入力の誤り(error = invalid_input など)
  • 401未ログイン(unauthorized)/ Bearer が無効(invalid_token。WWW-Authenticate 付き)
  • 403権限が無い
  • invalid_input
  • student_required
  • guild_exists
  • intent_reused
  • image_not_found

呼び出しの見本

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

curl -X POST "https://bounty.spikes.4s.link/api/guilds/register/platform" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "intentId": "00000000-0000-4000-8000-000000000000",
    "name": "string",
    "website": "string",
    "instagram": "string",
    "x": "string",
    "otherLinks": [],
    "memberScale": "1人",
    "categories": [
      "ビジネス"
    ],
    "otherCategory": "string",
    "description": "string",
    "logoImageId": "00000000-0000-4000-8000-000000000000",
    "applicant": {
      "role": "string",
      "name": "string",
      "email": "user@example.com"
    },
    "representativeSameApplicant": false,
    "representative": {
      "role": "string",
      "name": "string"
    },
    "nextRepresentativeUndecided": false,
    "nextRepresentative": {
      "role": "string",
      "name": "string"
    },
    "officers": [],
    "academic": {
      "gradYear": 1950,
      "enrollmentStatus": "active"
    },
    "platformConsent": true
  }'
POST /api/guilds/register/platform | Bounty Developer