compute

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

Buy one paid option for this machine.

Sve compute krajnje tačke

Autentifikacija

Pošaljite API ključ kao bearer token. Ova krajnja tačka ne navodi specifičnu dozvolu u specifikaciji, zato dodelite svom ključu minimum potrebnih ovlašćenja i proverite odgovor umesto da pretpostavljate.

Ovaj krajnji tačka ne prihvata ID organizacije. Vaš ključ već identifikuje organizaciju kojoj pripada, a odgovor je ograničen na nju.

Isprobajte

Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.

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> }'

Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli

Detalji

⛔⛔ **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.

Parametri

NazivVrstaObaveznoŠta je ovo
serverId (path)UuidDaThe 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.

Telo zahteva

NazivVrstaObaveznoŠta je ovo
offer_idUuidDaThe 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…

Odgovor

NazivVrstaObaveznoŠta je ovo
dataComputeAddonPurchaseDaOne 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…

Greške koje ovaj krajnji tačka može da vrati

401 · 403 · 404 · 422 · 429 · 503