compute
POST /v1/compute/servers/{serverId}/plan
Buy one paid option for this machine.
ການພິສູດຕົວຕົນ
ສົ່ງ API key ເປັນ bearer token. ຈຸດເຊື່ອມຕໍ່ (endpoint) ນີ້ບໍ່ໄດ້ລະບຸສິດອະນຸຍາດສະເພາະໃດໜຶ່ງໃນຂໍ້ກຳນົດ, ດັ່ງນັ້ນຈຶ່ງຄວນໃຫ້ສິດ key ຂອງທ່ານເທົ່າທີ່ຈຳເປັນໜ້ອຍທີ່ສຸດ ແລະ ກວດສອບການຕອບກັບ ໂດຍບໍ່ຄວນທາດເດົາເອົາເອງ.
ຈຸດເຊື່ອມຕໍ່ນີ້ບໍ່ໄດ້ຮັບ ID ອົງກອນ. ລະຫັດຂອງທ່ານໄດ້ລະບຸອົງກອນທີ່ມັນຂຶ້ນກັບແລ້ວ, ແລະ ຄໍາຕອບແມ່ນຖືກຈໍາກັດຂອບເຂດໄວ້ສໍາລັບອົງກອນນັ້ນ.
ລອງໃຊ້ເບິ່ງ
ປ່ຽນແທນທຸກຢ່າງທີ່ຢູ່ໃນວົງເລັບມຸມດ້ວຍຄ່າຂອງທ່ານເອງ, ແລະ ປ່ຽນແທນຕົວແທນບ່ອນວ່າງຄີດ້ວຍຄີຈາກແຜງຄວບຄຸມຂອງທ່ານ.
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_id | Uuid | ແມ່ນແລ້ວ | 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… |
ຖືກໂຈະ
| ຊື່ | ປະເພດ | ຕ້ອງການ | ສິ່ງທີ່ມັນເປັນ |
|---|---|---|---|
data | ComputeAddonPurchase | ແມ່ນແລ້ວ | 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… |
ຂໍ້ຜິດພາດທີ່ຈຸດເຊື່ອມຕໍ່ນີ້ສາມາດສົ່ງຄືນໄດ້
401 · 403 · 404 · 422 · 429 · 503