Doğrulama
API açarını bearer token kimi göndərin. Açar billing.payment.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Təşkilatınızın identifikatorunun yerləşdiyi yer
Bu son nöqtə JSON gövdəsində sahə kimi org_id qəbul edir.
Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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`.
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
org_id | Uuid | null | Xeyr | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | Xeyr | — |
currency | CurrencyCode | null | Xeyr | 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… |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
id | Uuid | Bəli | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Bəli | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | Bəli | — |
currency | CurrencyCode | null | Xeyr | 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 | Xeyr | — |
lines | CartLine[] | Bəli | — |
subtotal | MoneyAmount | Bəli | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | Bəli | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | Bəli | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | Bəli | — |
updated_at | string | Xeyr | — |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 422 · 429