hosting
POST /v1/sites/{siteId}/migrations/managed-request
Buy the managed migration and let staff do it.
身份验证
请将 API 密钥作为 bearer 令牌发送。该密钥必须具有 billing.payment.manage 权限;缺少该权限的密钥将被拒绝并返回 403 状态码,而非 404。
此端点不需要组织 ID。您的密钥已用于识别其所属的组织,且响应范围也仅限于该组织。
免费试用
将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/migrations/managed-request \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点
详细信息
Purchases the `managed_migration` extra — the paid, staff-run service the catalogue sells with a 72-hour SLA — for this site. The self-service migration above and this both exist; neither is a placeholder for the other, and this is the path for a source we cannot automate (Plesk, an unusual panel, a site nobody has the credentials for any more). It creates an **`ExtraPurchase`**, not a migration job: the charge, the tax, the invoice line and the SLA clock all come from the extras machinery, and the fulfilment workflow raises it to the staff queue. Returns the purchase, so the client can show its status and SLA. A declined card is 422 and nothing is booked; an environment whose catalogue has never been seeded answers 503 rather than 404, because the service exists and is advertised. An organization with **no** chargeable payment method gets 422 `PAYMENT_METHOD_REQUIRED` rather than the decline code — nothing reached a gateway, so nothing was refused (`docs/491` §7). ⛔ Send **no credentials** here — the body has nowhere to put them, and staff collect them out of band from a human they can verify. Requires `billing.payment.manage`, not `hosting.import.manage`: this spends money, and a developer who may migrate a site may not charge the account.
参数
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
siteId (path) | Uuid | 是 | Site ID (UUIDv7). |
Idempotency-Key (header) | string | 否 | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
请求正文
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
source_host | string | 否 | Where the site is hosted today, so the fulfilment queue is actionable without a round trip. A hostname, never a login. Optional. |
note | string | 否 | Anything else staff should know before they start. |
currency | string | 否 | The currency the customer was quoted in. Validated and refused if no gateway can charge it — this is a charge, and silently substituting the base currency would bill a different… |
响应
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
id | Uuid | 是 | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | 是 | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
extra_id | Uuid | 是 | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
site_id | object | 否 | — |
domain_id | object | 否 | — |
status | ExtraPurchaseStatus | 是 | An extra purchase's lifecycle state. |
category | string | 是 | — |
fulfilment_type | ExtraFulfilmentType | 是 | How an extra is delivered. |
interval | ExtraInterval | 是 | One-off charge or a recurring subscription. |
price | MoneyAmount | 是 | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
recurrence | string<none, active, ended> | 是 | Whether the recurrence behind this purchase is still live. `none` = it never recurred (a one-off); `active` = a scheduled charge exists; `ended` = it recurred and no longer does… |
next_renewal_on | object | 否 | The next charge date, or `null`. Also `null` for a live charge that has no date scheduled yet, so read `recurrence` — not this field — to decide whether a purchase renews at all. |
sla_due_at | object | 否 | — |
completed_at | object | 否 | — |
failure_reason | string | 否 | — |
created_at | string | 是 | — |
updated_at | string | 是 | — |
此端点可能返回的错误
401 · 403 · 404 · 422 · 429 · 503