POST/api/boshu/calls/{id}/embedded
「BOSHU」の分類の、新しく作る、または操作を実行するために内容を送る API。募集の埋め込みフォームの許可(トークン)を付けて呼ぶ。
- 要約
同一募集の本人応募/編集/取り下げ/共有確認/iframeログアウト。既存BOSHUサービスの資格・所有判定を共用
- 呼び方と印
トークン(募集の埋め込み)
URL に付ける値(パラメータ)
経路の中の波かっこの部分と、URL の ? の後ろに付ける値。「必須」の印があるものは省けない。
idpath必須string(uuid)
送るもの(本文)application/json
送る本文の欄。「必須」の印がある欄は省けない。
|1必須objectaction必須"consent"version必須string長さ ≤80|2必須objectaction必須"apply"application必須objectexpectedOrganizationUpdatedAt任意string(date-time) | nullexpectedUpdatedAt任意string(date-time) | nullapplicantOrgId任意string(uuid) | nullchatConsent任意boolean既定 falseheadline任意string | null長さ ≤200message任意string長さ ≤4000 · 既定 ""links任意array<object>件数 ≤3url必須string長さ ≤2048label任意string | null長さ ≤30portfolioItemIds任意array<string>件数 ≤3 · 既定 []answers任意record<any>既定 {}participation任意objectenrollmentStatus任意enum(5)- "active"
- "on_leave"
- "graduated"
- "withdrawn"
- "unknown"
gradYear任意integer | null1950–2100gradMonth任意integer | null1–12schoolName任意string | null長さ ≤80participantCategory任意"professional"title任意string | nullorgName任意string | null|3必須objectexpectedUpdatedAt任意string(date-time) | nullaction必須"withdraw"applicationId必須string(uuid)|4必須objectaction必須"logout"
返るもの(応答)200 · application/json
成功したときに返る形。入れ子の欄は、その行を押すと開く・閉じる。「任意」の印がある欄は返らないことがある。
|1objectapplicationobjectapplicantOrg任意object | nullkind"guild" | "venture"idstringnamestringlogoUrlstring | null
idstringcallIdstringheadlinestring | nullmessagestringlinksarray<object>urlstringlabelstring | null
portfolioItemIdsarray<string>answersrecord<string | array<string> | boolean>statusobjectkindenum(5)"pending" "accepted" "waitlisted" "rejected" "withdrawn"labelstringpositioninteger | null
canWithdrawbooleancanEditbooleaninSelectionbooleancreatedAtstringupdatedAtstring
|2objectacceptedbooleanversionstring
|3objectloggedOutboolean
失敗したとき(エラー)
失敗したときの状態コードと、その意味。本文の 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"
}'