Hitelesítés
Küldjön egy API-kulcsot bearer tokenként. A kulcsnak rendelkeznie kell a(z) billing.payment.manage jogosultsággal; az ezzel nem rendelkező kulcsok esetén a rendszer 403-as hibát ad vissza 404 helyett.
A szervezet azonosítójának helye
Ez a végpont a org_id mezőt várja a JSON törzsben.
A szervezeted azonosítója a vezérlőpult API-kulcsok képernyőjén található, közvetlenül a kulcs mellett. Ez ugyanaz az azonosító minden indított hívásban.
Próbálja ki
Cserélje ki a hegyes zárójelek közötti részt a saját értékeivel, a kulcshelyőrzőt pedig a vezérlőpultján található kulccsal.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Be van jelentkezve? A vezérlőpultban lévő API-konzol kitölti a valós szervezetazonosítóját és a saját kulcsát, és a kérést az éles API-n futtatja, hogy láthassa a tényleges választ. Nyissa meg ezt a végpontot az API konzolban
Részletek
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`.
Kérés törzse
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
org_id | Uuid | null | Nem | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | Nem | — |
currency | CurrencyCode | null | Nem | 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… |
Válasz
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
id | Uuid | Igen | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Igen | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | Igen | — |
currency | CurrencyCode | null | Nem | 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 | Nem | — |
lines | CartLine[] | Igen | — |
subtotal | MoneyAmount | Igen | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | Igen | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | Igen | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | Igen | — |
updated_at | string | Nem | — |
Hibák, amelyeket ez a végpont visszaadhattatlan
401 · 403 · 422 · 429