Autentikasi
Kirim kunci API sebagai token bearer. Kunci tersebut harus memiliki izin billing.payment.manage; kunci tanpa izin tersebut akan ditolak dengan status 403, bukan 404.
Tempat ID organisasi Anda dimasukkan
Titik akhir ini memerlukan org_id sebagai field dalam bodi JSON.
ID organisasi Anda berada di layar kunci API di dasbor Anda, di sebelah kunci itu sendiri. Itu adalah ID yang sama dalam setiap panggilan yang Anda buat.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
curl -X POST https://api.zinndigital.com/v1/carts \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
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`.
Isi permintaan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
org_id | Uuid | null | Tidak | Defaults to the caller's org; the caller must hold `billing.payment.manage` there. |
product_line | string | Tidak | — |
currency | CurrencyCode | null | Tidak | 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… |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
id | Uuid | Ya | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Ya | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | string<open, checking_out, converted, abandoned, expired> | Ya | — |
currency | CurrencyCode | null | Tidak | 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 | Tidak | — |
lines | CartLine[] | Ya | — |
subtotal | MoneyAmount | Ya | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
discount | MoneyAmount | Ya | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
total | MoneyAmount | Ya | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
created_at | string | Ya | — |
updated_at | string | Tidak | — |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 422 · 429