ავტორიზაცია
API გასაღები გაგზავნეთ როგორც მატარებელი ტოკენი (bearer token). გასაღებს უნდა ჰქონდეს billing.payment.manage ნებართვა; ამის გარეშე გასაღები უარყოფილი იქნება 403 და არა 404 სტატუსით.
სwhere your organisation id goes-ის ადგილი
ესენდპოინტი იღებს org_id-ს JSON ტანის ველად.
თქვენი ორგანიზაციის ID მითითებულია თქვენი სამართავი პანელის API გასაღებების ეკრანზე, თავად გასაღებთან ახლოს. ის ერთნაირია თქვენ მიერ განხორციელებულ ყველა გამოძახებაში.
სცადეთ
შეSubstituted any value inside angle brackets with your own and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'შესული ხართ? თქვენი სამართავ პანელში არსებული API კონსოლი ავტომატურად ამატებს თქვენი რეალური ორგანიზაციის ID-სა და საკუთარ გასაღებს და ატარებს მოთხოვნას ცოცხალ API-ს წინააღმდეგ, რათა იხილოთ რეალური პასუხი. გაAღით ეს ენდპოინტი 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