Autentificare
Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea billing.payment.manage; o cheie care nu o are va fi respinsă cu 403, nu 404.
Unde merge ID-ul organizației tale
Acest punct final preia org_id ca câmp în corpul JSON.
ID-ul organizației tale se află pe ecranul cheilor API din panoul de control, lângă cheia însăși. Este același ID în fiecare apel pe care îl faci.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
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`.
Corp cerere
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
org_id | Uuid | null | Nu | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | Nu | — |
currency | CurrencyCode | null | Nu | 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… |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
id | Uuid | Da | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Da | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | Da | — |
currency | CurrencyCode | null | Nu | 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 | Nu | — |
lines | CartLine[] | Da | — |
subtotal | MoneyAmount | Da | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | Da | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | Da | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | Da | — |
updated_at | string | Nu | — |
Erori pe care le poate returna acest punct final
401 · 403 · 422 · 429