Автентифікація
Надішліть ключ API як маркер носія (bearer token). Ключ повинен мати дозвіл billing.payment.manage; ключ без нього відхиляється з кодом 403, а не 404.
Де вказується ідентифікатор вашої організації
Цей ендпоінт приймає org_id як поле в тілі JSON.
Ідентифікатор вашої організації знаходиться на екрані API-ключів у вашій панелі керування, поруч із самим ключем. Це той самий ідентифікатор у кожному вашому запиті.
Спробувати
Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API
Деталі
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`.
Тіло запиту
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
org_id | Uuid | null | Ні | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | Ні | — |
currency | CurrencyCode | null | Ні | 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… |
Відповідь
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
id | Uuid | Так | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Так | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | Так | — |
currency | CurrencyCode | null | Ні | 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 | Ні | — |
lines | CartLine[] | Так | — |
subtotal | MoneyAmount | Так | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | Так | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | Так | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | Так | — |
updated_at | string | Ні | — |
Помилки, які може повертати ця кінцева точка
401 · 403 · 422 · 429