本文へ移動
Bounty Developer

POST/api/boshu/calls/{id}/embedded

「BOSHU」の分類の、新しく作る、または操作を実行するために内容を送る API。募集の埋め込みフォームの許可(トークン)を付けて呼ぶ。

要約

同一募集の本人応募/編集/取り下げ/共有確認/iframeログアウト。既存BOSHUサービスの資格・所有判定を共用

呼び方と印

トークン(募集の埋め込み)

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

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

  • idpath必須string(uuid)

送るもの(本文)application/json

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

  • |1必須object
  • action必須"consent"
  • version必須string
    長さ ≤80
  • |2必須object
  • action必須"apply"
  • application必須object
  • expectedOrganizationUpdatedAt任意string(date-time) | null
  • expectedUpdatedAt任意string(date-time) | null
  • applicantOrgId任意string(uuid) | null
  • chatConsent任意boolean
    既定 false
  • headline任意string | null
    長さ ≤200
  • message任意string
    長さ ≤4000 · 既定 ""
  • links任意array<object>
    件数 ≤3
  • url必須string
    長さ ≤2048
  • label任意string | null
    長さ ≤30
  • portfolioItemIds任意array<string>
    件数 ≤3 · 既定 []
  • answers任意record<any>
    既定 {}
  • participation任意object
  • enrollmentStatus任意enum(5)
    • "active"
    • "on_leave"
    • "graduated"
    • "withdrawn"
    • "unknown"
  • gradYear任意integer | null
    1950–2100
  • gradMonth任意integer | null
    1–12
  • schoolName任意string | null
    長さ ≤80
  • participantCategory任意"professional"
  • title任意string | null
  • orgName任意string | null
  • |3必須object
  • expectedUpdatedAt任意string(date-time) | null
  • action必須"withdraw"
  • applicationId必須string(uuid)
  • |4必須object
  • action必須"logout"

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

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

  • |1object
    • applicationobject
      • applicantOrg任意object | null
        • kind"guild" | "venture"
        • idstring
        • namestring
        • logoUrlstring | null
      • idstring
      • callIdstring
      • headlinestring | null
      • messagestring
      • linksarray<object>
        • urlstring
        • labelstring | null
      • portfolioItemIdsarray<string>
      • answersrecord<string | array<string> | boolean>
      • statusobject
        • kindenum(5)"pending" "accepted" "waitlisted" "rejected" "withdrawn"
        • labelstring
        • positioninteger | null
      • canWithdrawboolean
      • canEditboolean
      • inSelectionboolean
      • createdAtstring
      • updatedAtstring
  • |2object
    • acceptedboolean
    • versionstring
  • |3object
    • loggedOutboolean

失敗したとき(エラー)

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

  • 400入力の誤り(error = invalid_input など)
  • 401HTTP 401(x-bounty-error-codes を参照)
  • 403HTTP 403(x-bounty-error-codes を参照)
  • 404HTTP 404(x-bounty-error-codes を参照)
  • 409HTTP 409(x-bounty-error-codes を参照)
  • 428HTTP 428(x-bounty-error-codes を参照)

呼び出しの見本

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

curl -X POST "https://bounty.spikes.4s.link/api/boshu/calls/{id}/embedded" \
  -H "X-Boshu-Grant: $BOSHU_GRANT" \
  -H "X-Boshu-Proof: $BOSHU_PROOF" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "consent",
    "version": "string"
  }'
POST /api/boshu/calls/{id}/embedded | Bounty Developer