commerce

POST /v1/carts

Open a shopping cart.

Gbogbo àwọn commerce endpoints

Ìfàṣẹ́pọ̀

Fi bọ́ọ̀lù (bearer token) ranṣẹ gẹ́gẹ́ bí kọ́kọ́rọ́ API. Kọ́kọ́rọ́ náà gbọ́dọ̀ ní ìyọ̀ǹda billing.payment.manage; a ó kọ̀ ọ́ silẹ pẹlu 403, kii ṣe 404, ti kọ́kọ́rọ́ náà kò bá ní i.

Ibùdó àmì ìdánimọ̀ ilé-iṣẹ́ rẹ sí

Ibi-iwọle yii n gba org_id gẹgẹ bi aaye ninu ara JSON naa.

Id àjọ rẹ wa lórí ojú-ìwákòòkò àwọn bọ́tìnnì API nínú daṣibọọdú rẹ, lẹ́gbẹ̀ẹ́ bọ́tìnnì náà gan-an. Ó jẹ́ ìd kan náà nínú gbogbo ìpè tí o bá ṣe.

Gbiyanju rẹ

Rọ́pọ̀ èyíkéyìí nínú àwọn àmì ìtọ́ka < > pẹ̀lú iye tirẹ̀, àti àmì ìdánimọ̀ bọ́tìnnì náà pẹ̀lú bọ́tìnnì kan láti inú dásibọ̀ọ̀dù rẹ.

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

Ṣé o ti wọlé? Iwọ̀n api ní nú ìgbékalẹ̀ rẹ kún id àjọ gidi rẹ ati bọtini tirẹ, o si nṣiṣẹ ibeere na lòdì si api gidi ki o le rii esi gidi na. Ṣí ojú abáná yìí sílẹ̀ nínú kọnsólù API

Àwọn kúlẹ̀kúlẹ̀

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

Akoonu ibeere naa

OrúkọIruTí a nílòKini o jẹ
org_idUuid | nullBẹẹkọDefaults to the caller's org; the caller must hold `billing.payment.manage` there.
product_linestringBẹẹkọ
currencyCurrencyCode | nullBẹẹkọ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…

Idahun

OrúkọIruTí a nílòKini o jẹ
idUuidBẹẹniUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidBẹẹniUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusstring<open, checking_out, converted, abandoned, expired>Bẹẹni
currencyCurrencyCode | nullBẹẹkọ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_lineobjectBẹẹkọ
linesCartLine[]Bẹẹni
subtotalMoneyAmountBẹẹniA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
discountMoneyAmountBẹẹniA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
totalMoneyAmountBẹẹniA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
created_atstringBẹẹni
updated_atstringBẹẹkọ

Awọn aṣiṣe ti ibudo ipari yii le da pada

401 · 403 · 422 · 429