commerce

POST /v1/carts

Open a shopping cart.

Bütün commerce nöqtələri

Doğrulama

API açarını bearer token kimi göndərin. Açar billing.payment.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.

Təşkilatınızın identifikatorunun yerləşdiyi yer

Bu son nöqtə JSON gövdəsində sahə kimi org_id qəbul edir.

Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.

Sınaqdan keçir

Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.

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

Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın

Təfərrüatlar

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

Sorğu gövdəsi

AdTipTələb olunurNədir
org_idUuid | nullXeyrDefaults to the caller's org; the caller must hold `billing.payment.manage` there.
product_linestringXeyr
currencyCurrencyCode | nullXeyrThe 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…

Cavab

AdTipTələb olunurNədir
idUuidBəliUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidBəliUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusstring<open, checking_out, converted, abandoned, expired>Bəli
currencyCurrencyCode | nullXeyrFixed 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_lineobjectXeyr
linesCartLine[]Bəli
subtotalMoneyAmountBəliA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
discountMoneyAmountBəliA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
totalMoneyAmountBəliA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
created_atstringBəli
updated_atstringXeyr

Bu son nöqtənin qaytara biləcəyi xətalar

401 · 403 · 422 · 429