Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie billing.payment.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Miejsce na identyfikator organizacji
Ten punkt końcowy przyjmuje org_id jako pole w treści JSON.
Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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`.
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
org_id | Uuid | null | Nie | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | Nie | — |
currency | CurrencyCode | null | Nie | 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… |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
id | Uuid | Tak | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Tak | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | Tak | — |
currency | CurrencyCode | null | Nie | 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 | Nie | — |
lines | CartLine[] | Tak | — |
subtotal | MoneyAmount | Tak | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | Tak | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | Tak | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | Tak | — |
updated_at | string | Nie | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 422 · 429