Uthibitishaji
Tuma ufunguo wa API kama tokeni ya kubeba. Ufunguo lazima uwe na ruhusa ya billing.payment.manage; ufunguo usio nayo unakataliwa kwa 403, si 404.
Mahali ambapo kitambulisho cha shirika lako huwekwa
Sehemu hii ya mwisho inachukua org_id kama uwanja katika mwili wa JSON.
Kitambulisho cha shirika lako kipo kwenye skrini ya funguo za API katika dashibodi yako, kando ya ufunguo wenyewe. Ni kitambulisho kile kile katika kila ombi unalofanya.
Jaribu
Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API
Maelezo
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`.
Mwili wa ombi
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
org_id | Uuid | null | Hapana | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | Hapana | — |
currency | CurrencyCode | null | Hapana | 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… |
Majibu
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
id | Uuid | Ndiyo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Ndiyo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | Ndiyo | — |
currency | CurrencyCode | null | Hapana | 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_line | object | Hapana | — |
lines | CartLine[] | Ndiyo | — |
subtotal | MoneyAmount | Ndiyo | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | Ndiyo | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | Ndiyo | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | Ndiyo | — |
updated_at | string | Hapana | — |
Hitilafu ambazo mwisho huu unaweza kurudisha
401 · 403 · 422 · 429