Autentizace
Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění billing.payment.manage; klíč bez něj je odmítnut s kódem 403, nikoli 404.
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/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'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
Creates an empty open cart for the organization. Prices on its lines are server-authoritative and re-computed on every read (the client price is never trusted). Requires `billing.payment.manage`.
Tělo požadavku
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
org_id | Uuid | null | Ne | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | Ne | — |
currency | CurrencyCode | null | Ne | The currency to open the basket in — what the customer will be **billed** in. Omit it and the engine uses the `X-Zinn-Currency` header the dashboard already sends, falling back… |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
id | Uuid | Ano | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Ano | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | Ano | — |
currency | CurrencyCode | null | Ne | Fixed when the cart is opened, from `CartCreate.currency` or the `X-Zinn-Currency` header, and then locked — every line must match it. Null only on a legacy cart created before… |
product_line | object | Ne | — |
lines | CartLine[] | Ano | — |
subtotal | MoneyAmount | Ano | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | Ano | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | Ano | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | Ano | — |
updated_at | string | Ne | — |
Chyby, které může tento koncový bod vrátit
401 · 403 · 422 · 429