public
POST /v1/public/cart/{token}/plan
Add a hosting plan, or a free trial of one, to an anonymous cart.
प्रमाणीकरण
यो इन्डपइन्ट सार्वजनिक हो। यसले कुनै पनि प्रमाण पत्र र संस्था लिँदैन — यो हाम्रो आफ्नै मार्केटिङ साइट र AI उत्तर इन्जिनहरूले पढ्ने कुरा हो।
यो इन्डपोइन्टले कुनै संस्थाको आइडी लिँदैन। तपाईंको कुञ्जीले यस अन्तर्गत पर्ने संस्थालाई पहिल्यै पहिचान गर्छ, र प्रतिक्रिया त्यसैमा सीमित हुन्छ।
प्रयास गर्नुहोस्
कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।
curl -X POST https://api.zinndigital.com/v1/public/cart/{token}/plan \
-H "Content-Type: application/json" \
-d '{ "plan_version_id": <string>, "interval": <string<monthly, annual>> }'लगइन गर्नुभएको छ? तपाईंको ड्यासबोर्डमा रहेको API कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ API विरुद्ध अनुरोध चलाउँछ ताकि तपाईंले वास्तविक प्रतिक्रिया हेर्न सक्नुहोस्। यो एन्डपोइन्टलाई API कन्सोलमा खोल्नुहोस्
विवरणहरू
Owner ruling D-W15-2: hosting, free trials and domains go through ONE public checkout, so a visitor never has to sign up in the app before they can buy. The price is computed by the server from the pinned plan VERSION in the cart's own currency; anything sent by the client is ignored. A basket holds one plan at a time, because a subscription governs the org rather than a line. `trial: true` prices the line at **zero** and is refused (`422`) on a plan that does not offer a trial — eligibility is read from the catalogue, never taken on trust.
प्यारामिटरहरू
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
token (path) | string | हुन्छ | The anonymous cart's opaque bearer token (`zgc_…`), as returned by `createPublicCart`. **It is a credential** — anyone holding it can read and modify the cart — and it travels i… |
अनुरोध बडी
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
plan_version_id | string | हुन्छ | The immutable plan VERSION being bought. Pinning the version rather than the plan is what stops a catalogue edit repricing a basket somebody is part-way through. |
interval | string<monthly, annual> | हुन्छ | — |
domain | PublicCartPlanDomain | हैन | Which domain this hosting is for. **Optional** — "I will decide later" is a real and common answer, and refusing it would put a wall in front of the purchase this field exists t… |
trial | boolean | हैन | Start a free trial of this plan instead of buying it. The line prices at zero and the order completes with no payment step (owner ruling 2026-08-09 — a trial takes no card and s… |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
id | Uuid | हुन्छ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
token | string | हैन | The bearer token. Returned **only** from `createPublicCart` — it is absent on every subsequent read, because only its digest is stored. |
status | string<open, converted, expired> | हुन्छ | — |
currency | CurrencyCode | हुन्छ | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
product_line | string | हैन | — |
expires_at | string | हुन्छ | After this the cart is gone — reads 404 whether or not it has been purged. |
items | PublicCartItem[] | हुन्छ | — |
totals | PublicCartTotals | हुन्छ | Pre-tax totals. Tax appears on the order, once a billing country exists. |
यो इन्डपोइन्टले फर्काउन सक्ने त्रुटिहरू
404 · 422 · 429