compute
POST /v1/compute/servers/{serverId}/plan
Buy one paid option for this machine.
Autentikasi
Kirimkan kunci API sebagai token bearer. Titik akhir ini tidak menyatakan izin tertentu dalam spesifikasi, jadi berikan kunci Anda izin minimum yang diperlukan dan periksa responsnya alih-alih berasumsi.
Endpoint ini tidak memerlukan id organisasi. Kunci Anda telah mengidentifikasi organisasi tempatnya berafiliasi, dan respons akan dibatasi untuk organisasi tersebut.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
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> }'Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
⛔⛔ **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.
Parameter
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
serverId (path) | Uuid | Ya | 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. |
Isi permintaan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
offer_id | Uuid | Ya | 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… |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
data | ComputeAddonPurchase | Ya | 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 unti… |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 404 · 422 · 429 · 503