commerce

POST /v1/carts

Open a shopping cart.

ټول commerce پای ټکي

تصدیق‌هویت

یو API کی د بیئرر ټوکن (bearer token) په توګه ولیکئ. کی باید د billing.payment.manage اجازه ولري؛ له دې اجازې پرته کی د 404 پرځای د 403 په واسطه رد کیږي.

چیرته چې ستاسو د سازمان آی ډي ځي

دا پای ټکی د JSON په متن کې د یوې ساحې په توګه org_id اخلي.

ستاسو د سازمان آی ډي ستاسو په ډشبورډ کې د API کېلي پر سکرین، خپله د کېلي څنګ ته شتون لري. دا په هره هغه غوښتنه کې چې تاسو یې کوئ، ورته آی ډي وي.

هڅه وکړئ

د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.

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

ننوتي یاست؟ ستاسو په ډشبورډ کې د API کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د 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…

ځواب

نومډولاړیندا څه شی دی
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