billing
POST /v1/trials
Start a free trial on a plan.
Autentizace
Odešlete klíč API jako bearer token. Tento koncový bod ve specifikaci uvádí specifické oprávnění, takže svému klíči udělte to nejmenší možné a místo předpokladů zkontrolujte odpověď.
Sem patří ID vaší organizace
Tento koncový bod přijímá org_id jako pole v těle JSON.
ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.
Vyzvednout
Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.
curl -X POST https://api.zinndigital.com/v1/trials \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "plan_code": <string> }'Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API
Podrobnosti
docs/20. The endpoint the "Start trial" buttons had nowhere to point at. Three admin trial endpoints existed — list templates, edit a template, staff-extend a trial — and no customer-facing one, so all 47 CTAs on the public pricing page linked to ?intent=register: register first, which is the opposite of what the button says. ⛔ plan_code, never a product line. Eligibility is a property of the plan (owner ruling 2026-07-29): cloud and VPS live in the same line as plans that do carry a trial, so a line-shaped request could not express "never on billable per-instance compute" at all. One trial per organization, enforced by a database constraint as well as a check — so a double-click races safely and the loser is refused rather than granted a second trial.
Tělo požadavku
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
plan_code | string | Ano | — |
org_id | string | Ne | Required only when the caller bills for more than one organization. With exactly one it is unambiguous; with several it is asked for rather than guessed, because starting a… |
auto_convert_opt_in | boolean | Ne | ⛔ Defaults to false — the direction that cannot take money nobody agreed to. |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
id | string | Ano | — |
org_id | string | Ano | — |
status | string<active, expired, converted, canceled> | Ano | — |
product_line | string | Ano | The line's CODE, not its display name — the dashboard renders the label from its own catalogue, so prose here would be a second, untranslated source of that word on the screen. |
max_sites | integer | Ano | — |
started_at | string | Ano | — |
ends_at | string | Ano | — |
auto_convert_opt_in | boolean | Ne | Whether the customer agreed at the start that this may become a paid subscription when the period ends. Captured per trial rather than read from the template at expiry, so… |
days_remaining | integer | Ne | Whole days until ends_at, rounded UP and floored at zero. Computed on the server on purpose: a client doing (ends_at - Date.now()) measures the device clock, so a laptop a… |
upgrade | TrialUpgradeOffer | Ne | The plan this trial invites the customer to buy, priced in their own currency (X-Zinn-Currency, falling back to the org default). ⛔ null when the template names no target or… |
Chyby, které může tento koncový bod vrátit
401 · 403 · 404 · 422