تصدیقهویت
یو 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_id | Uuid | null | نه | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | نه | — |
currency | CurrencyCode | 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… |
ځواب
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
id | Uuid | هو | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | هو | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | هو | — |
currency | CurrencyCode | 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_line | object | نه | — |
lines | CartLine[] | هو | — |
subtotal | MoneyAmount | هو | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | هو | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | هو | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | هو | — |
updated_at | string | نه | — |
تېروتنې چې دا پای ټکی یې بیرته راګرځولی شي
401 · 403 · 422 · 429