组织与店铺
代理商、商户、超管、店铺、销售代表与设置。
使用流程与权限要求见 商户与店铺。
GET列出代理商/boma/v1/agencies
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
POST注册代理商/boma/v1/agencies
请求体
application/json必填display_namestring必填usernamestringpasswordstring8..72 bytes.
user_idstringBind an existing unified login user; omit username and password when set.
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
PUT修改代理商名称/boma/v1/agencies/{agency}/name
Updates the agency display name. Requires a platform identity with agency:update on this agency.
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
agency | 路径 | string | 必填 |
请求体
application/json必填display_namestring必填
响应
200Updated agency
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
GET读取代理商设置/boma/v1/agencies/{agency}/settings
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
agency | 路径 | string | 必填 |
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
PUT保存代理商设置/boma/v1/agencies/{agency}/settings/{key}
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
agency | 路径 | string | 必填 |
key | 路径 | string | 必填 |
请求体
application/json必填value任意值必填
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
PUT设置代理商头像/boma/v1/agencies/{agency}/avatar
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
agency | 路径 | string | 必填 |
请求体
application/json必填file_idstring必填
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
GET列出销售代表/boma/v1/agencies/{agency}/sales-reps
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
agency | 路径 | string | 必填 |
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
POST新增销售代表/boma/v1/agencies/{agency}/sales-reps
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
agency | 路径 | string | 必填 |
请求体
application/json必填display_namestring必填
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
GET列出代理商名下商户/boma/v1/agencies/{agency}/merchants
Each merchant includes super_admin_bound, indicating whether its super administrator identity has a user.
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
agency | 路径 | string | 必填 |
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
POST注册商户/boma/v1/agencies/{agency}/merchants
Omit all login fields to reserve the merchant's super administrator identity for later binding.
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
agency | 路径 | string | 必填 |
请求体
application/json必填display_namestring必填usernamestringpasswordstring8..72 bytes.
user_idstringBind an existing unified login user; omit username and password when set.
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
PUT修改商户名称/boma/v1/merchants/{merchant}/name
Updates the merchant display name. Requires an identity from the owning agency with merchant:update on this merchant.
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
merchant | 路径 | string | 必填 |
请求体
application/json必填display_namestring必填
响应
200Updated merchant
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
GET查询商户超管绑定/boma/v1/merchants/{merchant}/super-admin
Read the current super administrator binding with merchant:bind-super-admin from the platform or owning agency.
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
merchant | 路径 | string | 必填 |
响应
200Current binding
application/jsonemployee_idstring必填- 可为 null
user_idstring必填- 可为 null
usernamestring必填- 可为 null
PUT绑定或更换商户超管/boma/v1/merchants/{merchant}/super-admin
Bind or replace the merchant's super administrator login with merchant:bind-super-admin from the platform or owning agency. Replacing the user revokes this identity's sessions and API keys. Repeating the current assignment preserves its credentials, including the password.
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
merchant | 路径 | string | 必填 |
请求体
application/json必填Supply an existing user_id or both username and password for a new login.
user_idstringusernamestringpasswordstringexpected_user_idstringOptional previously observed user ID. An empty string expects an unbound identity. An already-applied request succeeds.
响应
200Saved binding
application/jsonemployee_idstring必填- 可为 null
user_idstring必填- 可为 null
usernamestring必填- 可为 null
409The expected binding has changed or the new username is in use.
此状态在规范中没有响应体定义。
DELETE解除商户超管绑定/boma/v1/merchants/{merchant}/super-admin
Unbind the login using merchant:bind-super-admin from the platform or owning agency. This preserves the merchant administrator identity and revokes its sessions and API keys. Repeating an unbind on an unbound merchant succeeds.
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
merchant | 路径 | string | 必填 |
expected_user_id | 查询 | string | 可选 · If supplied, a different current owner causes a conflict. Send the previously observed user ID to protect a replacement binding on retry. |
响应
200Unbound administrator with null user_id and username
application/jsonemployee_idstring必填- 可为 null
user_idstring必填- 可为 null
usernamestring必填- 可为 null
409A different user now holds the binding.
此状态在规范中没有响应体定义。
GET列出商户店铺/boma/v1/merchants/{merchant}/shops
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
merchant | 路径 | string | 必填 |
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
POST开设店铺/boma/v1/merchants/{merchant}/shops
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
merchant | 路径 | string | 必填 |
请求体
application/json必填uidstring必填display_namestring必填
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
PUT更新店铺及回调地址/boma/v1/shops/{shop}
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
shop | 路径 | string | 必填 |
请求体
application/json必填display_namestring必填event_webhook_urlstring必填
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
PUT修改店铺名称/boma/v1/shops/{shop}/name
Updates the shop display name. Requires an identity from the owning merchant with shop:update on this shop.
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
shop | 路径 | string | 必填 |
请求体
application/json必填display_namestring必填
响应
200Updated shop
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
GET读取店铺设置/boma/v1/shops/{shop}/settings
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
shop | 路径 | string | 必填 |
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
PUT保存店铺设置/boma/v1/shops/{shop}/settings/{key}
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
shop | 路径 | string | 必填 |
key | 路径 | string | 必填 |
请求体
application/json必填value任意值必填
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
PUT设置店铺头像/boma/v1/shops/{shop}/avatar
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
shop | 路径 | string | 必填 |
请求体
application/json必填file_idstring必填
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段