Authenticatie
Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie billing.payment.manage beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.
Waar je organisatie-id komt te staan
Dit eindpunt verwacht org_id als een veld in de JSON-body.
Uw organisatie-id staat op het scherm met API-sleutels in uw dashboard, naast de sleutel zelf. Dit is in elke aanroep die u doet dezelfde id.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
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`.
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
org_id | Uuid | null | Nee | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | Nee | — |
currency | CurrencyCode | null | Nee | 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… |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
id | Uuid | Ja | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Ja | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | Ja | — |
currency | CurrencyCode | null | Nee | 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 | Nee | — |
lines | CartLine[] | Ja | — |
subtotal | MoneyAmount | Ja | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | Ja | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | Ja | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | Ja | — |
updated_at | string | Nee | — |
Fouten die dit eindpunt kan retourneren
401 · 403 · 422 · 429