本文へ移動
Bounty Developer

POST/api/ventures/register

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

要約

学生発ベンチャーを登録する(法人番号を国税庁の Web-API で照合)。運営の承認で公開

呼び方と印

ログイン

送るもの(本文)application/json

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

  • foundingHistory任意object
  • personName必須string
    長さ 1–80
  • roleAtFounding必須"founder" | "representative" | "director" | "shareholder"
  • foundingYear必須integer
    1900–2100
  • schoolName必須string
    長さ 1–80
  • gradeAtFounding必須enum(31)
    • "高校1年"
    • "高校2年"
    • "高校3年"
    • "高専1年"
    • "高専2年"
    • "高専3年"
    • "高専4年"
    • "高専5年"
    • "専門1年"
    • "専門2年"
    • "専門3年"
    • "専門4年"
    • …+19
  • studentAtFounding必須true
  • 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
  • corporateNumber必須string
    長さ ≤40
  • legalName必須string
    長さ 1–80
  • displayName任意string | null
    長さ ≤80
  • url必須string
    長さ ≤2048
  • works任意array<object>
    件数 ≤24
  • id必須string
    /^w_[a-z0-9]{4,24}$/
  • title必須string
    長さ 1–60
  • url任意string | null
    長さ ≤2048
  • imageId任意string(uuid) | null
  • text任意string | null
    長さ ≤200
  • year任意integer | null
    1950–2100
  • description必須string
    長さ 1–400
  • foundedYear任意integer | null
    1950–2100
  • industries任意array<enum(12)>
    件数 ≤5 · 既定 []
  • links任意array<object>
    件数 ≤18
  • kind必須enum(8)
    • "website"
    • "x"
    • "instagram"
    • "youtube"
    • "tiktok"
    • "facebook"
    • "note"
    • "discord"
  • url必須string
    長さ ≤2048
  • title任意string
    長さ ≥1
  • financials任意object
  • revenue必須integer | null
    ≥0
  • profit必須integer | null
  • employeeCount必須integer
    1–100000
  • logoImageId必須string(uuid)
  • guildId任意string(uuid) | null
  • myRole任意enum(7)
    • "representative"
    • "director"
    • "shareholder"
    • "founder"
    • "employee"
    • "advisor"
    • "intern"
    既定 "representative"
  • myTitle任意string | null
    長さ ≤40
  • myJoinedYear任意integer | null
    1950–2100
  • contact任意string | null
    長さ ≤60
  • 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
  • invites任意array<object>
    件数 ≤16
  • userId任意string(uuid) | null
  • name必須string
    長さ 1–40
  • email任意string(email) | null
    長さ ≤254
  • school任意string | null
    長さ ≤80
  • title任意string | null
    長さ ≤40
  • instagram任意string | null
    長さ ≤2048
  • gradYear任意integer | null
    1950–2100
  • role必須enum(7)
    • "representative"
    • "director"
    • "shareholder"
    • "founder"
    • "employee"
    • "advisor"
    • "intern"
  • student任意boolean
    既定 false
  • consent必須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
  • venture_exists
  • houjin_not_found
  • houjin_closed
  • houjin_not_company
  • houjin_unavailable
  • guild_not_found
  • image_not_found

呼び出しの見本

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

curl -X POST "https://bounty.spikes.4s.link/api/ventures/register" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "corporateNumber": "string",
    "legalName": "string",
    "url": "string",
    "description": "string",
    "employeeCount": 1,
    "logoImageId": "00000000-0000-4000-8000-000000000000",
    "academic": {
      "gradYear": 1950,
      "enrollmentStatus": "active"
    },
    "consent": true
  }'
POST /api/ventures/register | Bounty Developer