本文へ移動
Bounty Developer

POST/api/ticketing/register

「参加登録」の分類の、新しく作る、または操作を実行するために内容を送る API。ログインした本人として呼ぶ。

要約

参加登録する(無料・当日払い・承認制・招待で 0 円 → 4S の register。事前決済 → 4S の決済ページの URL を返す)

呼び方と印

ログイン・レート制限

短い時間に呼びすぎると断られる API(レート制限)。断られたら Retry-After の秒数を待って呼び直す。

送るもの(本文)application/json

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

  • expectedActorId任意string(uuid)
  • localProfile必須object | object
  • |1必須object
  • participantType必須"student"
  • gradYear必須integer
    1950–2100
  • gradMonth任意integer | null
    1–12
  • enrollmentStatus必須"active" | "on_leave"
  • schoolType任意enum(6)
    • "university"
    • "graduate"
    • "college"
    • "vocational"
    • "highschool"
    • "middleschool"
  • academicGrade任意string
    長さ ≤40
  • academicFaculty任意string
    長さ ≤120
  • academicDepartment任意string
    長さ ≤120
  • 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
  • |2必須object
  • participantType必須"professional"
  • title必須string
    長さ 1–40
  • orgName必須string
    長さ 1–60
  • 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
  • professionalOpportunitiesPatch任意object
  • hiring任意object | null
  • authority必須"decision" | "recommend" | "none"
  • intent必須"interested" | "open" | "none"
  • investment任意object | null
  • authority必須"decision" | "recommend" | "none"
  • intent必須"interested" | "open" | "none"
  • workRequests任意array<object>
    件数 ≤5
  • id必須string(uuid)
  • domainKeys必須array<string>
    件数 1–4
  • description必須string
  • profileAnswers任意object
  • avatarUrl任意string(uri)
    長さ ≤2048
  • nativeName任意string
    長さ 1–100
  • lang任意string
    長さ ≤35 · /^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/
  • birthDate任意string
    /^\d{4}-\d{2}-\d{2}$/
  • gender任意"male" | "female" | "other" | "undisclosed"
  • title任意string
    長さ 1–1000
  • bio任意string
    長さ 1–1000
  • ticket任意string(uuid)
  • ticketId必須string
    長さ 1–100
  • invitationCode任意string | null
    長さ ≤64
  • answers必須record<array<string>>
  • university任意object | object | null
  • |1必須object
  • kind必須"master"
  • schoolCode必須string
    /^[A-Z][0-9]{12}$/
  • |2必須object
  • kind必須"free"
  • name必須string
    長さ 1–80
  • pref必須enum(47) | null
    • "北海道"
    • "青森県"
    • "岩手県"
    • "宮城県"
    • "秋田県"
    • "山形県"
    • "福島県"
    • "茨城県"
    • "栃木県"
    • "群馬県"
    • "埼玉県"
    • "千葉県"
    • …+35
  • universityOptionAnswer任意array<string> | null
    件数 ≤1
  • under18任意true

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

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

  • |1object
    • kind"registered"
    • entryStatestring
    • entryLabelstring
    • ticketNamestring
  • |2object
    • kind"checkout"
    • urlstring
    • ticketNamestring

失敗したとき(エラー)

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

  • 400入力の誤り(error = invalid_input など)
  • 401未ログイン(unauthorized)/ Bearer が無効(invalid_token。WWW-Authenticate 付き)
  • 403権限が無い
  • 429レート制限(Retry-After 付き)
  • registration_disabled
  • not_linked
  • ticket_verification_required
  • event_already_registered
  • ticket_not_found
  • event_sold_out
  • prepaid_unavailable
  • unsupported_question
  • unsupported_profile_field
  • event_required_profile_fields_not_answered
  • university_option_required
  • unknown_university
  • participation_profile_required
  • participant_category_mismatch
  • ticket_audience_mismatch
  • tier_org_members_only
  • event_required_questions_not_answered
  • invitation_code_invalid_or_expired
  • invitation_code_limit_reached
  • promotion_code_busy
  • promotion_code_required
  • invitation_code_already_redeemed_by_user
  • event_capacity_full
  • event_registration_paused
  • event_ended
  • face_photo_required
  • fours_unavailable
  • fours_rejected
  • rate_limited

呼び出しの見本

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

curl -X POST "https://bounty.spikes.4s.link/api/ticketing/register" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "localProfile": {
      "participantType": "student",
      "gradYear": 1950,
      "enrollmentStatus": "active"
    },
    "ticketId": "string",
    "answers": {}
  }'
POST /api/ticketing/register | Bounty Developer