commerce

POST /v1/carts

Open a shopping cart.

બધા commerce એન્ડપૉઇન્ટ્સ

પ્રમાણીકરણ

એપીઆઈ કી (API key) ને બેરર ટોકન તરીકે મોકલો. કી પાસે 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 કન્સોલ તમારી વાસ્તવિક સંસ્થાની આઈડી અને તમારી પોતાની કી ભરે છે, અને લાઇવ 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