commerce

POST /v1/carts

Open a shopping cart.

सबै commerce इन्डपइन्टहरू

प्रमाणीकरण

एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। कुञ्जीसँग billing.payment.manage अनुमति हुनुपर्छ; अनुमति नभएको कुञ्जीलाई 404 होइन, 403 मार्फत अस्वीकार गरिन्छ।

तपाईंको संस्थाको आइडी राख्ने ठाउँ

यो इन्डपोटले JSON बडीमा एक फिल्डको रूपमा org_id लिन्छ।

तपाईंको संस्थाको आइडी (ID) तपाईंको ड्यासबोर्डमा रहेको API कुञ्जीहरू (keys) स्क्रिनमा, कुञ्जीको छेउमा हुन्छ। तपाईंले गर्ने प्रत्येक कलमा यही आइडी प्रयोग हुन्छ।

प्रयास गर्नुहोस्

कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।

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