组织与店铺

代理商、商户、超管、店铺、销售代表与设置。

使用流程与权限要求见 商户与店铺。

GET列出代理商/boma/v1/agencies
鉴权已选身份的会话 / Boma API Key

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

POST注册代理商/boma/v1/agencies
鉴权已选身份的会话 / Boma API Key

请求体

application/json必填
display_namestring必填
usernamestring
passwordstring

8..72 bytes.

user_idstring

Bind an existing unified login user; omit username and password when set.

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

PUT修改代理商名称/boma/v1/agencies/{agency}/name
鉴权已选身份的会话 / Boma API Key

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/json

object · 规范允许任意字段

GET读取代理商设置/boma/v1/agencies/{agency}/settings
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
agency路径string必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

PUT保存代理商设置/boma/v1/agencies/{agency}/settings/{key}
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
agency路径string必填
key路径string必填

请求体

application/json必填
value任意值必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

PUT设置代理商头像/boma/v1/agencies/{agency}/avatar
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
agency路径string必填

请求体

application/json必填
file_idstring必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

GET列出销售代表/boma/v1/agencies/{agency}/sales-reps
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
agency路径string必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

POST新增销售代表/boma/v1/agencies/{agency}/sales-reps
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
agency路径string必填

请求体

application/json必填
display_namestring必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

GET列出代理商名下商户/boma/v1/agencies/{agency}/merchants
鉴权已选身份的会话 / Boma API Key

Each merchant includes super_admin_bound, indicating whether its super administrator identity has a user.

参数

参数位置类型说明
agency路径string必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

POST注册商户/boma/v1/agencies/{agency}/merchants
鉴权已选身份的会话 / Boma API Key

Omit all login fields to reserve the merchant's super administrator identity for later binding.

参数

参数位置类型说明
agency路径string必填

请求体

application/json必填
display_namestring必填
usernamestring
passwordstring

8..72 bytes.

user_idstring

Bind an existing unified login user; omit username and password when set.

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

PUT修改商户名称/boma/v1/merchants/{merchant}/name
鉴权已选身份的会话 / Boma API Key

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/json

object · 规范允许任意字段

GET查询商户超管绑定/boma/v1/merchants/{merchant}/super-admin
鉴权已选身份的会话 / Boma API Key

Read the current super administrator binding with merchant:bind-super-admin from the platform or owning agency.

参数

参数位置类型说明
merchant路径string必填

响应

200Current binding
application/json
employee_idstring必填
可为 null
user_idstring必填
可为 null
usernamestring必填
可为 null
PUT绑定或更换商户超管/boma/v1/merchants/{merchant}/super-admin
鉴权已选身份的会话 / Boma API Key

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_idstring
usernamestring
passwordstring
expected_user_idstring

Optional previously observed user ID. An empty string expects an unbound identity. An already-applied request succeeds.

响应

200Saved binding
application/json
employee_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
鉴权已选身份的会话 / Boma API Key

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/json
employee_idstring必填
可为 null
user_idstring必填
可为 null
usernamestring必填
可为 null
409A different user now holds the binding.

此状态在规范中没有响应体定义。

GET列出商户店铺/boma/v1/merchants/{merchant}/shops
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
merchant路径string必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

POST开设店铺/boma/v1/merchants/{merchant}/shops
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
merchant路径string必填

请求体

application/json必填
uidstring必填
display_namestring必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

PUT更新店铺及回调地址/boma/v1/shops/{shop}
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
shop路径string必填

请求体

application/json必填
display_namestring必填
event_webhook_urlstring必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

PUT修改店铺名称/boma/v1/shops/{shop}/name
鉴权已选身份的会话 / Boma API Key

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/json

object · 规范允许任意字段

GET读取店铺设置/boma/v1/shops/{shop}/settings
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
shop路径string必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

PUT保存店铺设置/boma/v1/shops/{shop}/settings/{key}
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
shop路径string必填
key路径string必填

请求体

application/json必填
value任意值必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

PUT设置店铺头像/boma/v1/shops/{shop}/avatar
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
shop路径string必填

请求体

application/json必填
file_idstring必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段