跳到导航

创建经销商工作区

Create a workspace for one of your customers, optionally with a tier, a phone number and team invites.

请求头

xi-api-keystring可选

请求

This endpoint expects an object.
business_namestring必需1-100 characters
verticalenum or null可选

业务所属行业,与 complete_onboarding 配合使用。未提供时,引导流程会照常选择行业。

charge_customerboolean可选默认为 false

向工作区自己的客户收费,而非向经销商收费:客户自行结账和查看账单,经销商获得佣金。仅适用于采用标准计费的经销商。

subscriptionobject or null可选
Paid tier to subscribe to. Omitted leaves the workspace with no subscription.
phone_numberstring or null可选
A free number from the reseller's phone pool, reserved for the workspace until onboarding binds it to the receptionist.
memberslist of objects可选默认为 []

People to invite once the workspace exists, capped by the tier’s team size. Best-effort: each outcome is in member_results.

complete_onboardingboolean可选默认为 false

立即完成设置,与 POST /v1/reception/reseller/workspaces/{workspace_id}/complete-onboarding 相同。尽力执行:失败时 onboarding_completed_at_unix 保持为 null,且可重试该调用。

metadatamap from strings to strings可选默认为 {}

为工作区设置的自定义键值对,例如客户或合同 ID。最多 20 个键,每个键最多 40 个字符,且不能包含 . 或 $;每个值最多 500 个字符。工作区成员不可见。

idempotency_keystring or null可选<=255 characters

Client-generated key that makes a retry safe. The same key and body within 24 hours returns the first result without running again. While that first request is still running, a retry gets 409 idempotency_key_in_progress; a different body with the same key gets 400 idempotency_key_reused. A request that fails is not saved, so it can be retried with the same key.

响应

成功响应

workspace_idstring
business_namestring
billing_tierstring or null
receptionist_countinteger
calls_last_30_daysinteger
created_at_unixinteger
subscriptionobject or null可选

由经销商管理的订阅(如果该工作区有)。None 表示经销商未在此销售任何内容:尚未分配套餐,或工作区自行支付订阅费用(参见 charge_customer)。

charge_customerboolean可选默认为 false

工作区自行支付订阅费用,因此无法在此分配或更改其套餐。

has_payment_issueboolean可选默认为 false
A charge for this workspace is unpaid. Assigning or changing a tier is refused until it clears, so surface it rather than letting it fail.
onboarding_completed_at_unixinteger or null可选

引导流程完成的时间。在此之前,引导向导可能会替换或删除工作区的业务数据。

metadatamap from strings to strings可选默认为 {}

为工作区设置的自定义键值对。

member_resultslist of objects可选默认为 []

错误

422
Unprocessable Entity Error