Autentifikacija
Pošaljite API ključ kao nosivi token. Ključ mora imati dozvolu billing.payment.manage; ključ bez nje se odbija s kodom 403, a ne 404.
Gdje dolazi ID vaše organizacije
Ova krajnja točka prihvaća org_id kao polje u JSON tijelu.
ID vaše organizacije nalazi se na zaslonu API ključeva u vašoj nadzornoj ploči, pored samog ključa. To je isti ID u svakom pozivu koji uputite.
Isprobajte
Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli
Pojedinosti
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`.
Tijelo zahtjeva
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
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… |
Odgovor
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
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 | 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[] | 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 | Ne | — |
Pogreške koje ova krajnja točka može vratiti
401 · 403 · 422 · 429