commerce

POST /v1/carts

Open a shopping cart.

ყველა commerce ენდპოინტი

ავტორიზაცია

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_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