commerce

POST /v1/carts

Open a shopping cart.

Të gjitha pikat e skajshme commerce

Autentifikimi

Drgoni një çelës API si një token mbajtës. Çelësi duhet të ketë lejen billing.payment.manage; një çelës pa të refuzohet me 403, jo 404.

Ku shkon id i organizatës suaj

Ky endpoint pranon org_id si fushë në trupin JSON.

ID-ja e organizatës suaj ndodhet në ekranin e çelësave API në panelin tuaj të kontrollit, pranë vetë çelësit. Është i njëjti ID në çdo thirrje që bëni.

Provoje

Zëvendësoni çdo gjë brenda kllapave këndore me vlerat tuaja dhe vendbanuesin e çelësit me një çelës nga paneli juaj.

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

Jeni kyçur? Konsola e API-së në panelin tuaj plotëson ID-në tuaj reale të organizatës dhe çelësin tuaj, dhe ekzekuton kërkesën kundrejt API-së live, kështu që ju mund të shihni përgjigjen aktuale. Hapni këtë pikë fundore në konsolën e API-së

Detajet

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

Trupi i kërkesës

EmriLlojiKërkohetÇfarë është kjo
org_idUuid | nullJoDefaults to the caller's org; the caller must hold `billing.payment.manage` there.
product_linestringJo
currencyCurrencyCode | nullJoThe 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…

Përgjigja

EmriLlojiKërkohetÇfarë është kjo
idUuidPoUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidPoUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusstring<open, checking_out, converted, abandoned, expired>Po
currencyCurrencyCode | nullJoFixed 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_lineobjectJo
linesCartLine[]Po
subtotalMoneyAmountPoA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
discountMoneyAmountPoA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
totalMoneyAmountPoA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
created_atstringPo
updated_atstringJo

Gabimet që ky pikëndalim mund të kthejë

401 · 403 · 422 · 429