אימות
שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה billing.payment.manage; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.
המקום שבו מזהה הארגון שלך נכנס
נקודת קצה זו מקבלת את org_id כשדה בגוף ה-JSON.
מזהה הארגון שלך נמצא במסוף מפתחות ה-API בלוח הבקרה שלך, לצד המפתח עצמו. זהו אותו מזהה בכל קריאה שאתה מבצע.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-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