Аутентификација

Пошаљите API кључ као bearer токен. Кључ мора имати дозволу billing.payment.manage; кључ без ње се одбија уз 403, а не 404.

Где се уноси ID ваше организације

Ова крајња тачка узима 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 конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом 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_idUuid | nullНеDefaults to the caller's org; the caller must hold billing.payment.manage there.
product_linestringНе—
currencyCurrencyCode | 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 to…

Одговор

НазивТипОбавезноШта је ово
idUuidДаUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidДаUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusstring<open, checking_out, converted, abandoned, expired>Да—
currencyCurrencyCode | 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_lineobjectНе—
linesCartLine[]Да—
subtotalMoneyAmountДаA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
discountMoneyAmountДаA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
totalMoneyAmountДаA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
created_atstringДа—
updated_atstringНе—

Грешке које ова крајња тачка може вратити

401 · 403 · 422 · 429