commerce

POST /v1/carts

Open a shopping cart.

Dhammaan commerce bixiyayaasha

Xaqiijinta aqoonsiga

U dir furaha API ah calaamad dusha ah (bearer token). Furaha waa inuu wataa ruqadda billing.payment.manage; furaha aan wadan waxaa loo diidayaa 403, ee ma aha 404.

Meesha aqoonsiga ururkaagu galayo

Boggan waxaa uu qaataa org_id oo ah goob ku jirta JSON body.

Aqoonsiga ururkaagu wuxuu ku yaallaa shaashada furayaasha API ee dashboard-kaaga, oo ku xiga furaha laftiisa. Waa isku aqoonsi wicitaan kasta oo aad sameyso.

Isku day

Ku beddel wax kasta oo ku dhex jira qeebaha xaglaha ah qiimayaashaada, sidoo kalena haystaaha furaha ku beddel fure ka dhex muuqda dashboordigaaga.

curl -X POST https://api.zinndigital.com/v1/carts \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Ma sign-garaysay? Qalabka API ee ku jira dashboard-kaagu wuxuu buuxiyaa aqoonsigaaga ururka ee dhabta ah iyo furahaaga gaarka ah, wuxuuna ku shaqeysiiyaa codsiga API-ga nool si aad u aragto jawaabta dhabta ah. Kani ka fur barta kontoroolka ee API

Details

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`.

Codsiga jidhkiisa

MagacaNoocLoo baahan yahayMaxay tahay
org_idUuid | nullMayaDefaults to the caller's org; the caller must hold `billing.payment.manage` there.
product_linestringMaya
currencyCurrencyCode | nullMayaThe 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…

Jawaab

MagacaNoocLoo baahan yahayMaxay tahay
idUuidHaaUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidHaaUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusstring<open, checking_out, converted, abandoned, expired>Haa
currencyCurrencyCode | nullMayaFixed 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_lineobjectMaya
linesCartLine[]Haa
subtotalMoneyAmountHaaA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
discountMoneyAmountHaaA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
totalMoneyAmountHaaA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
created_atstringHaa
updated_atstringMaya

Cilladaha ay bartaani soo celin karto

401 · 403 · 422 · 429