Autenticazione
Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione billing.payment.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.
L'ID della tua organizzazione va qui
Questo endpoint accetta org_id come campo nel corpo JSON.
L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
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`.
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
org_id | Uuid | null | No | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | No | — |
currency | CurrencyCode | null | No | 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… |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
id | Uuid | Sì | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Sì | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | Sì | — |
currency | CurrencyCode | null | No | 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 | No | — |
lines | CartLine[] | Sì | — |
subtotal | MoneyAmount | Sì | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | Sì | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | Sì | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | Sì | — |
updated_at | string | No | — |
Errori che questo endpoint può restituire
401 · 403 · 422 · 429