commerce

POST /v1/carts

Open a shopping cart.

Sve commerce krajnje tačke

Autentifikacija

Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu billing.payment.manage; ključ bez nje se odbija sa 403, a ne sa 404.

Gde ide ID vaše organizacije

Ova krajnja tačka prihvata org_id kao polje u JSON telu.

ID vaše organizacije nalazi se na ekranu sa API ključevima u vašoj kontrolnoj tabli, pored samog ključa. To je isti ID u svakom pozivu koji uputite.

Isprobajte

Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.

curl -X POST https://api.zinndigital.com/v1/carts \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli

Detalji

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`.

Telo zahteva

NazivVrstaObaveznoŠta je ovo
org_idUuid | nullNeDefaults to the caller's org; the caller must hold `billing.payment.manage` there.
product_linestringNe
currencyCurrencyCode | nullNeThe 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…

Odgovor

NazivVrstaObaveznoŠta je ovo
idUuidDaUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidDaUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusstring<open, checking_out, converted, abandoned, expired>Da
currencyCurrencyCode | nullNeFixed 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_lineobjectNe
linesCartLine[]Da
subtotalMoneyAmountDaA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
discountMoneyAmountDaA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
totalMoneyAmountDaA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
created_atstringDa
updated_atstringNe

Greške koje ovaj krajnji tačka može da vrati

401 · 403 · 422 · 429