本文へ移動
Bounty Developer

POST/api/boshu/calls/{id}/selection/design/preview

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

要約

選考設計と共通メールテンプレートの影響を検証する(保存・送信なし)

呼び方と印

ログイン・レート制限

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

URL に付ける値(パラメータ)

経路の中の波かっこの部分と、URL の ? の後ろに付ける値。「必須」の印があるものは省けない。

  • idpath必須string(uuid)

送るもの(本文)application/json

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

  • expectedRevision必須integer
    ≥0
  • stages必須array<object>
    件数 1–5
  • id任意string(uuid)
  • name必須string
    長さ 1–80
  • deadlineAt任意string(date-time) | null
  • instructionsUrl任意string(uri) | null
    長さ ≤2048
  • instructions任意string
    長さ ≤4000 · 既定 ""
  • questions任意array<object>
    件数 ≤60
  • id必須string
    /^q_[a-z0-9]{4,24}$/
  • type必須enum(9)
    • "short"
    • "long"
    • "single"
    • "multi"
    • "check"
    • "url"
    • "date"
    • "image"
    • "document"
  • label必須string
    長さ 1–120
  • help任意string | null
    長さ ≤1000
  • required任意boolean
    既定 false
  • enabled任意boolean
  • options任意array<object>
    件数 ≤20 · 既定 []
  • id必須string
    /^o_[a-z0-9]{1,24}$/
  • label必須string
    長さ 1–60
  • sensitive任意boolean
    既定 false
  • maxLength任意integer
    1–2000
  • section任意string
    長さ 1–80
  • organizationField任意enum(11)
    • "name"
    • "nameKana"
    • "organizationType"
    • "baseUniversities"
    • "foundedYearMonth"
    • "memberCount"
    • "studentMemberCount"
    • "genres"
    • "links"
    • "catchphrase"
    • "activitySummary"
  • profileField任意enum(9)
    • "displayName"
    • "title"
    • "orgName"
    • "schoolName"
    • "gradYear"
    • "organizations"
    • "faculty"
    • "standing"
    • "grade"
  • memberSelection任意object
  • kind必須"active_student"
  • min必須1
  • max必須3
  • condition任意object
  • questionId必須string
    /^q_[a-z0-9]{4,24}$/
  • optionId必須string
    /^o_[a-z0-9]{1,24}$/
  • templates任意array<object>
    件数 ≤42 · 既定 []
  • stageOrder必須integer | null
    1–5
  • kind必須enum(7)
    • "application_received"
    • "stage_passed"
    • "stage_rejected"
    • "final_accepted"
    • "final_waitlisted"
    • "correction"
    • "organizer_message"
  • template必須object
  • subject必須string
    長さ 1–200
  • text必須string
    長さ 1–6000
  • nextUrl必須string
    長さ ≤2048
  • replyToContactUserId必須string(uuid) | null
  • eventId任意string(uuid) | null

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

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

  • validboolean
  • affectedApplicationsinteger≥0
  • activeApplicationsinteger≥0
  • publishedApplicationsinteger≥0
  • stagesarray<object>件数 1–5
    • id任意string(uuid)
    • namestring長さ 1–80
    • deadlineAtstring(date-time) | null
    • instructionsUrlstring(uri) | null長さ ≤2048
    • instructionsstring長さ ≤4000 · 既定 ""
    • questionsarray<object>件数 ≤60
      • idstring/^q_[a-z0-9]{4,24}$/
      • typeenum(9)"short" "long" "single" "multi" "check" "url" "date" "image" "document"
      • labelstring長さ 1–120
      • helpstring | null長さ ≤1000
      • requiredboolean既定 false
      • enabled任意boolean
      • optionsarray<object>件数 ≤20 · 既定 []
        • idstring/^o_[a-z0-9]{1,24}$/
        • labelstring長さ 1–60
      • sensitiveboolean既定 false
      • maxLength任意integer1–2000
      • section任意string長さ 1–80
      • organizationField任意enum(11)"name" "nameKana" "organizationType" "baseUniversities" "foundedYearMonth" "memberCount" "studentMemberCount" "genres" "links" "catchphrase" "activitySummary"
      • profileField任意enum(9)"displayName" "title" "orgName" "schoolName" "gradYear" "organizations" "faculty" "standing" "grade"
      • memberSelection任意object
        • kind"active_student"
        • min1
        • max3
      • condition任意object
        • questionIdstring/^q_[a-z0-9]{4,24}$/
        • optionIdstring/^o_[a-z0-9]{1,24}$/
  • changesFinalStageboolean
  • templatesarray<object>件数 ≤42
    • stageOrderinteger | null1–5
    • kindenum(7)"application_received" "stage_passed" "stage_rejected" "final_accepted" "final_waitlisted" "correction" "organizer_message"
    • templateobject
      • subjectstring長さ 1–200
      • textstring長さ 1–6000
      • nextUrlstring長さ ≤2048
      • replyToContactUserIdstring(uuid) | null
  • eventIdstring(uuid) | null

失敗したとき(エラー)

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

  • 400HTTP 400(x-bounty-error-codes を参照)
  • 401未ログイン(unauthorized)/ Bearer が無効(invalid_token。WWW-Authenticate 付き)
  • 403HTTP 403(x-bounty-error-codes を参照)
  • 404HTTP 404(x-bounty-error-codes を参照)
  • 409HTTP 409(x-bounty-error-codes を参照)
  • 413HTTP 413(x-bounty-error-codes を参照)
  • 428HTTP 428(x-bounty-error-codes を参照)
  • 429レート制限(Retry-After 付き)
  • 503HTTP 503(x-bounty-error-codes を参照)
  • invalid_token
  • forbidden
  • consent_required
  • rate_limited
  • partner_owner_not_allowed
  • partner_applicant_kind
  • invalid_input
  • call_not_found
  • revision_conflict
  • first_come_selection_disabled

呼び出しの見本

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

curl -X POST "https://bounty.spikes.4s.link/api/boshu/calls/{id}/selection/design/preview" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "expectedRevision": 0,
    "stages": [
      {
        "name": "string"
      }
    ]
  }'
POST /api/boshu/calls/{id}/selection/design/preview | Bounty Developer