compute
POST /v1/compute/servers/{serverId}/plan
Buy one paid option for this machine.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Ten punkt końcowy nie określa konkretnego uprawnienia w specyfikacji, więc nadaj swojemu kluczowi minimum potrzebnych uprawnień i sprawdź odpowiedź zamiast zakładać.
Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
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> }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
⛔⛔ 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.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
serverId (path) | Uuid | Tak | 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. |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
offer_id | Uuid | Tak | 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… |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
data | ComputeAddonPurchase | Tak | 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… |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 422 · 429 · 503