compute

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

Buy one paid option for this machine.

Minden compute végpont

Az összes fejlesztői dokumentáció

Hitelesítés

Küldjön egy API-kulcsot bearer tokenként. Ez a végpont nem határoz meg konkrét jogosultságot a specifikációban, ezért adja meg a kulcsnak a legkevesebbet, amire szüksége van, és a feltételezés helyett ellenőrizze a választ.

Ez a végpont nem fogad el szervezeti azonosítót. Az Ön kulcsa már azonosítja azt a szervezetet, amelyhez tartozik, és a válasz is erre vonatkozik.

Próbálja ki

Cserélje ki a hegyes zárójelek közötti részt a saját értékeivel, a kulcshelyőrzőt pedig a vezérlőpultján található kulccsal.

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

Be van jelentkezve? A vezérlőpultban lévő API-konzol kitölti a valós szervezetazonosítóját és a saját kulcsát, és a kérést az éles API-n futtatja, hogy láthassa a tényleges választ. Nyissa meg ezt a végpontot az API konzolban

Részletek

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

Paraméterek

NévTípusKötelezőMi ez
serverId (path)UuidIgenThe 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.

Kérés törzse

NévTípusKötelezőMi ez
offer_idUuidIgenThe 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…

Válasz

NévTípusKötelezőMi ez
dataComputeAddonPurchaseIgenOne 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…

Hibák, amelyeket ez a végpont visszaadhattatlan

401 · 403 · 404 · 422 · 429 · 503