Kimlik Doğrulama
Bearer token olarak bir API anahtarı gönderin. Anahtar billing.payment.manage iznine sahip olmalıdır; bu izne sahip olmayan bir anahtar 404 ile değil, 403 ile reddedilir.
Kurum kimliğinizin yazılacağı yer
Bu uç nokta, JSON gövdesinde bir alan olarak org_id alır.
Kuruluş kimliğiniz (id), kontrol panelinizdeki API anahtarları ekranında, anahtarın hemen yanında yer alır. Yaptığınız her çağrıda aynı kimlik kullanılır.
Dene
Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın
Ayrıntılar
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`.
İstek gövdesi
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
org_id | Uuid | null | Hayır | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | Hayır | — |
currency | CurrencyCode | null | Hayır | 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… |
Yanıt
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
id | Uuid | Evet | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Evet | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | Evet | — |
currency | CurrencyCode | null | Hayır | 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 | Hayır | — |
lines | CartLine[] | Evet | — |
subtotal | MoneyAmount | Evet | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | Evet | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | Evet | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | Evet | — |
updated_at | string | Hayır | — |
Bu uç noktanın dönderebileceği hatalar
401 · 403 · 422 · 429