外观
陪玩申请表单
GET /companion-application-form
| 权限范围 | 幂等 | operationId |
|---|---|---|
companions:read | 只读 | CompanionApplications_form |
本店陪玩注册字段配置(是否启用、是否必填)、首考可选证书、默认保证金。按它渲染你自己的表单,店铺改了字段你不用改代码。
示例
js
const res = await client.get("/companion-application-form");http
GET /open/v1/companion-application-form HTTP/1.1
Host: api.sybb.pw
Authorization: SY-HMAC-SHA256 Credential=ak_…, Timestamp=1796035200, Nonce=…, Signature=…响应 200:
json
{
"fields": [
{
"key": "string",
"label": "可用储值",
"type": "string",
"enabled": true,
"required": true
}
],
"firstAuditCerts": [
{
"certId": "cert_18UujqA5W1qOoP5Cwza75Ke",
"name": "周末双排体验券",
"level": 2,
"score": 1,
"depositCents": 10000,
"firstAuditSelectable": true,
"enabled": true
}
],
"defaultDepositCents": 10000
}响应
ApplicationFormView
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
fields | FormFieldView[] | 申请表单字段(键见 GET /companion-application-form) | |
firstAuditCerts | CertView[] | ||
defaultDepositCents | integer | 是 | 金额(分) |
FormFieldView
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
key | string | 字段名(提交申请时 fields 的键) | |
label | string | 显示名 | |
type | string | string 文本 / integer 整数 / enum01 是否(0 或 1)/ file_ids 图片或 PDF(先调「上传文件」拿 fileId, 这里传 fileId 数组,最多 9 个)/ cert_ids 证书(用 skillCertIds 提交) | |
enabled | boolean | 是 | 店铺是否启用这个字段 |
required | boolean | 是 | 是否必填 |
CertView
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
certId | string | 证书 ID(cert_…) | |
name | string | 名称 | |
level | integer | 证书等级 | |
score | integer | 证书分值 | |
depositCents | integer | 需缴押金(分) | |
firstAuditSelectable | boolean | 是 | 申请时可自选(提交申请的 skillCertIds 只能从这些里选) |
enabled | boolean | 是 | 是否启用 |
错误
签名、权限、限流等通用错误见错误处理。