compute

POST /v1/compute/servers/{serverId}/plan

Buy one paid option for this machine.

Усі кінцеві точки compute

Уся документація для розробників

Автентифікація

Надішліть ключ API як маркер носія (bearer token). Ця кінцева точка не вказує конкретного дозволу в специфікації, тому надайте своєму ключу мінімально необхідні права та перевірте відповідь, замість того щоб припускати.

Цей кінцевий пункт не потребує ідентифікатора організації. Ваш ключ уже ідентифікує організацію, якій він належить, і відповідь обмежується її межами.

Спробувати

Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.

curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/plan \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "offer_id": <Uuid> }'

Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API

Деталі

⛔⛔ Chargeable twice over, and both are immediate. It debits Zinn®'s reseller balance at the provider and starts a recurring charge on the customer, so it sits behind billing.payment.manage rather than sites.create. The provider offers no idempotency header on this operation, so the request is keyed by (machine, option) on our side and a repeat returns the original purchase rather than buying a second one. 422 when the machine cannot carry the option — cPanel below 2 GB, a second cPanel licence, backups already on.

Параметри

НазваТипОбов'язковеЩо це таке
serverId (path)UuidТакThe server's id, as listComputeServers reports it. Ours (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine.

Тіло запиту

НазваТипОбов'язковеЩо це таке
offer_idUuidТакThe offer to buy, from getComputeServerPlan's available or getVpsAddonOptions. ⛔ There is deliberately no price field: a price sent by a client is not read, and the charge…

Відповідь

НазваТипОбов'язковеЩо це таке
dataComputeAddonPurchaseТакOne paid option a tenant actually bought against one machine. ⛔ status is cancelling, not ended, after a removal. The thing is still running and still ours to pay for until…

Помилки, які може повертати ця кінцева точка

401 · 403 · 404 · 422 · 429 · 503