billing
GET /v1/subscriptions/{subscriptionId}/plan
List the plans this subscription could move to, priced.
ਪ੍ਰਮਾਣੀਕਰਨ
API ਕੁੰਜੀ ਨੂੰ ਇੱਕ ਬੇਅਰਰ ਟੋਕਨ (bearer token) ਵਜੋਂ ਭੇਜੋ। ਕੁੰਜੀ ਵਿੱਚ billing.view ਇਜਾਜ਼ਤ ਹੋਣੀ ਲਾਜ਼ਮੀ ਹੈ; ਇਸ ਤੋਂ ਬਿਨਾਂ ਕੁੰਜੀ ਨੂੰ 404 ਦੀ ਨਹੀਂ, ਸਗੋਂ 403 ਨਾਲ ਅਸਵੀਕਾਰ ਕੀਤਾ ਜਾਂਦਾ ਹੈ।
ਇਹ ਐਂਡਪੁਆਇੰਟ ਕੋਈ ਸੰਸਥਾ ਆਈਡੀ ਨਹੀਂ ਲੈਂਦਾ। ਤੁਹਾਡੀ ਕੁੰਜੀ ਪਹਿਲਾਂ ਹੀ ਉਸ ਸੰਸਥਾ ਦੀ ਪਛਾਣ ਕਰਦੀ ਹੈ ਜਿਸ ਨਾਲ ਇਹ ਸਬੰਧਤ ਹੈ, ਅਤੇ ਜਵਾਬ ਉਸੇ ਤੱਕ ਸੀਮਤ ਹੈ।
ਕੋਸ਼ਿਸ਼ ਕਰੋ
ਕੋਈ ਵੀ ਚੀਜ਼ ਜੋ ਕੋਣ ਵਾਲੇ ਬਰੈਕਟਾਂ ਵਿੱਚ ਹੈ ਉਸਨੂੰ ਆਪਣੇ ਖੁਦ ਦੇ ਮੁੱਲਾਂ ਨਾਲ ਬਦਲੋ, ਅਤੇ ਕੁੰਜੀ ਪਲੇਸਹੋਲਡਰ ਨੂੰ ਆਪਣੇ ਡੈਸ਼ਬੋਰਡ ਦੀ ਇੱਕ ਕੁੰਜੀ ਨਾਲ ਬਦਲੋ।
curl -X GET https://api.zinndigital.com/v1/subscriptions/{subscriptionId}/plan \
-H "Authorization: Bearer zdk_live_…"ਲੌਗ ਇਨ ਕੀਤਾ ਹੋਇਆ ਹੈ? ਤੁਹਾਡੇ ਡੈਸ਼ਬੋਰਡ ਵਿੱਚ API ਕੰਸੋਲ ਤੁਹਾਡੀ ਅਸਲ ਸੰਸਥਾ ਆਈਡੀ (organisation id) ਅਤੇ ਤੁਹਾਡੀ ਆਪਣੀ ਕੁੰਜੀ ਨੂੰ ਭਰਦਾ ਹੈ, ਅਤੇ ਲਾਈਵ API ਦੇ ਵਿਰੁੱਧ ਬੇਨਤੀ ਚਲਾਉਂਦਾ ਹੈ ਤਾਂ ਜੋ ਤੁਸੀਂ ਅਸਲ ਜਵਾਬ ਦੇਖ ਸਕੋ। API ਕੰਸੋਲ ਵਿੱਚ ਇਸ ਐਂਡਪੁਆਇੰਟ ਨੂੰ ਖੋਲ੍ਹੋ
ਵੇਰਵੇ
The upgrade/downgrade ladder for a subscription the customer already holds — every purchasable plan on the same product line, priced in their own currency and term, each carrying a prorated quote and each refusal already applied. ⚖️ It exists because a customer asked for it and could not find it. He bought a 50-site plan and wanted more slots; the only thing he could find was the buy flow, which would have sold him a second subscription rather than a bigger one. getSitePlanChoices performs the identical read — but it is addressed by a site, and a customer who has bought slots and not filled any of them has none, so that endpoint was not merely hard to find but unaddressable. ⭐ On a subscription that entitles at least one site whose platform a plan change can act on, this is getSitePlanChoices for that site, verbatim — same service, same refusals, same schema — so the two screens can never disagree about what is for sale. Where it entitles none, the package-type refusals (no_package_type, unknown_package_type, platform_mismatch, different_target) cannot arise, because every one of them is a statement about a site's placement. ⛔ blocked_reason and reason are stable codes, never prose — the localised sentence is the client's, in 58 languages. Every money figure is an integer in minor units, and total_minor and credit_minor are two fields rather than one signed number, because a screen that renders a negative total as a charge is a screen that took money for a refund. coverage names the sites drawing on the plan and the slot arithmetic around them, so an upgrade can say what it will move before the customer commits. Its slots_total and slots_free are nullable and null is not zero: a plan stating no allowance is a different fact from one entitling nothing, and slots_unlimited is the third state. 404 for a subscription in another tenant as well as for one that does not exist — a 403 would confirm that an id belongs to somebody. Requires billing.view: this is a price list for the customer's own subscription, and support needs to see it to answer "what would an upgrade cost".
ਪੈਰਾਮੀਟਰ
| ਨਾਮ | ਕਿਸਮ | ਲਾਜ਼ਮੀ | ਕੀ ਹੈ ਇਹ |
|---|---|---|---|
subscriptionId (path) | Uuid | ਹਾਂ | The subscription whose plan is being read or changed. |
ਜਵਾਬ
| ਨਾਮ | ਕਿਸਮ | ਲਾਜ਼ਮੀ | ਕੀ ਹੈ ਇਹ |
|---|---|---|---|
current | SitePlanOption | ਹਾਂ | The plan the site is on now. Null when the site's package type matches no plan in our catalogue, which is a real state and not an error. |
options | SitePlanOption[] | ਹਾਂ | The plans the site could move to, each already scored. |
changeable | boolean | ਹਾਂ | Whether the surface is open at all for this site. |
reason | string | ਹਾਂ | Why the whole surface is closed, as a code — subscription_not_live when the governing subscription is cancelled or expired and so is not a sale to change, no_eligible_plan… |
shared_with | integer | ਹਾਂ | How many sites OTHER than this one draw on the same plan. Retained for clients written against the old refusal, and now derived from coverage.sites so the count and the list… |
coverage | SitePlanCoverage | ਹਾਂ | The sites this plan covers and the slots they use. Null only when the site has no governing subscription to read. |
ਇਹ ਐਂਡਪੁਆਇੰਟ ਜੋ ਗਲਤੀਆਂ ਵਾਪਸ ਕਰ ਸਕਦਾ ਹੈ
401 · 403 · 404 · 422 · 429 · 503