commerce

POST /v1/carts

Open a shopping cart.

Barcha commerce yakuniy nuqtalari

Autentifikatsiya

API kalitini bearer token sifatida yuboring. Kalit billing.payment.manage ruxsatiga ega boʻlishi shart; ruxsatsiz kalit 404 emas, balki 403 xatosi bilan rad etiladi.

Tashkilotingiz identifikatori kiritiladigan joy

Ushbu so'rov JSON tanasida org_id ni maydon sifatida qabul qiladi.

Tashkilotingiz identifikatori boshqaruv panelingizdagi API kalitlari ekranida, kalitning o'z yonida joylashgan. Bu siz amalga oshiradigan har bir so'rovda bir xil identifikator hisoblanadi.

Sinab ko'rish

Qavslardagi har qanday narsani o'z qiymatlaringiz bilan, kalit pleysxolderini эsa boshqaruv panelingizdagi kalit bilan almashtiring.

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

Tizimga kirganmisiz? Boshqaruv panelingizdagi API konsoli haqiqiy tashkilot ID raqamingiz va shaxsiy kalitingizni avtomatik to'ldiradi hamda haqiqiy javobni ko'rishingiz uchun so'rovni jonli API orqali bajaradi. Ushbu yakuniy nuqtani API konsolida oching

Tafsilotlar

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

Soʻrov tanasi

NomiTuriMajburiyNima bu
org_idUuid | nullYo'qDefaults to the caller's org; the caller must hold `billing.payment.manage` there.
product_linestringYo'q
currencyCurrencyCode | nullYo'qThe 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…

Javob

NomiTuriMajburiyNima bu
idUuidHaUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidHaUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusstring<open, checking_out, converted, abandoned, expired>Ha
currencyCurrencyCode | nullYo'qFixed 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_lineobjectYo'q
linesCartLine[]Ha
subtotalMoneyAmountHaA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
discountMoneyAmountHaA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
totalMoneyAmountHaA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
created_atstringHa
updated_atstringYo'q

Ushbu yakuniy nuqta qaytarishi mumkin bo'lgan xatolar

401 · 403 · 422 · 429