પ્રમાણીકરણ

એપીઆઈ કી (API key) ને બેરર ટોકન તરીકે મોકલો. કી પાસે sites.view પરવાનગી હોવી આવશ્યક છે; તેના વગરની કીને 404 ને બદલે 403 સાથે અસ્વીકાર કરવામાં આવશે.

આ એન્ડપૉઇન્ટ કોઈ સંસ્થા આઈડી (organisation id) લેતું નથી. તમારી કી (key) પહેલેથી જ તે જે સંસ્થા સાથે સંબંધિત છે તેની ઓળખ કરે છે, અને પ્રતિસાદ (response) તે જ પૂરતો મર્યાદિત છે.

આયમાવો

કોઈપણ કૌંસમાં રહેલી બાબતને તમારા પોતાના મૂલ્યોથી બદલો અને કી પ્લેસહોલ્ડરને તમારા ડેશબોર્ડની કીથી બદલો.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/plan \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "plan_version_id": <Uuid> }'

साइन ઇન કરેલ છે? તમારા ડેશબોર્ડમાં આવેલું API કન્સોલ તમારી વાસ્તવિક સંસ્થાની આઈડી અને તમારી પોતાની કી ભરે છે, અને લાઇવ API સામે વિનંતી ચલાવે છે જેથી તમે વાસ્તવિક પ્રતિસાદ જોઈ શકો. આ અંતિમબિંદુને API કન્સોલમાં ખોલો

વિગતો

Charges the prorated difference, moves the vendor package to the new type, and moves the subscription — in that order, for the reasons the engine's plan-change module records. The response states what actually happened rather than what was asked for: package_type is read back from the vendor after the move, and charged_minor is what the gateway captured. ⛔ expected_total_minor is a money guard, not a convenience. It is the figure the customer was actually shown, and the change is refused 422 when the freshly-computed quote differs — a price that moved between the page rendering and the button being pressed (an FX recompute, a catalogue edit, the period rolling) must never be charged silently. It is optional only so a script may omit it deliberately. Every other refusal is 422 as well, with nothing charged and nothing changed: an incompatible package type, usage above what the smaller plan allows, a card decline. ⛔⛔ Two usage refusals, checked in this order (#2089). First, this site's vendor-live counts against the target package type — databases, FTP accounts, subdomains — so a customer is told about the thing they can fix on the screen in front of them. Then the whole account against the plan being applied: sites, mailboxes, mailbox storage and disk, anywhere in the org's subtree, from the same check_downgrade the staff tariff endpoint uses. Until #2089 this endpoint ran only the first of those and the staff endpoint only the second, so the owner's ruling held on the path he does not use and failed on the one his customers do. ⛔ There is no override here. The staff tariff endpoint has an audited override_over_limit because staff sometimes genuinely need to move an over-limit account; a customer overriding their own quota check is not an override, it is no check. A customer who cannot proceed must reduce usage or contact support. ⭐ getSitePlanChoices marks an unaffordable plan blocked_reason: "account_over_limit" before the button is pressed, so this refusal should be unreachable from the UI. It is still enforced here: the picker is an affordance, not the control. Serves our own fleet as well as the managed shared range (#2271). The money path is identical on both — prorate, order, charge, credit, supersede — and only the middle step differs: on managed hosting the vendor package moves to another template, on the fleet the box is told the plan's new disk and file allowances. ⛔ On the fleet that happens after the subscription is superseded, because the numbers to apply are read from the governing subscription; a failure there leaves the customer out of sync (their site's Storage card says the new allowance is still being applied) and never out of pocket. 404 for a site whose platform has no plan to change — a VPS or cloud server (the billed unit is the machine) or an edge host (no account at all) — or for a site that is not the caller's. Requires sites.view and billing.payment.manage — it charges a card, so the key that gates paying is the key that gates committing to a payment.

પેરામીટર્સ

નામપ્રકારજરૂરીતે શું છે
siteId (path)UuidહાSite ID (UUIDv7).

રિકવેસ્ટ બોડી

નામપ્રકારજરૂરીતે શું છે
plan_version_idUuidહાThe priced plan version to move onto, exactly as getSitePlanChoices reported it.
expected_total_minorintegerનાA money guard, not a convenience. The figure the customer was actually shown, in minor units. The engine refuses 422 when its freshly-computed quote differs, so a price…
gatewayobjectનાThe payment rail the customer picked, from getPaymentOptions. Omit it (or send null) for "no preference", which follows the payment method the organization would be charged on…

જવાબ

નામપ્રકારજરૂરીતે શું છે
plan_codestringહાThe plan the site is now on.
plan_version_idstringહાThe priced version the subscription now carries.
package_typestringહાThe vendor package type, read back after the move.
subscription_idstringહાThe subscription that was moved.
order_idstringહાThe order the charge was raised against, or "" when the change resulted in a credit and no order was minted.
charged_minorintegerહાWhat was actually taken, in minor units.
credited_minorintegerહાWhat was actually returned as account balance, in minor units.
quoteSitePlanQuoteહાThe quote the change was performed against.

આ એન્ડપોઇન્ટ જે ભૂલો પરત કરી શકે છે

401 · 403 · 404 · 422 · 429 · 503