Skip to content

Carts

PUT/api/v1/sepetler

Upsert by dis_id. An unchanged cart is not rewritten (its abandonment timer keeps running); kalemler: [] deletes the cart. A cart with items needs the customer’s email or phone. The id of a cart that has turned into an order cannot be reused (skipped_converted): generate a new dis_id for every cart instance.

  • Authentication: Authorization: Bearer rz_live_…
  • Scope: ingest:carts
  • Plan feature: Data API + Carts — if off, the endpoint answers 404 not_found
  • Idempotency-Key: optional (recommended for retries)

Fields marked * are required. Unknown fields are rejected with 422.

CartBatch

FieldTypeLimitsMeaning
items *ApiCart[]min items 1, max items 10001–1000 records.

ApiCart

FieldTypeLimitsMeaning
dis_id *stringmin 1, max 200Id of this cart instance (not of the customer).
musteri *ApiCartCustomerCustomer.
kalemlerApiCartItem[]max items 200, default []Items; an empty list deletes the cart.
tutarnumber | string | null≥ 0, ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Cart total.
para_birimistringmin 3, max 3, default "TRY"Currency.
urlstring | nullmax 2000Cart URL.
son_guncellemestring (date-time) | nullLast update (abandonment is measured from this).

ApiCartCustomer

FieldTypeLimitsMeaning
adstring | nullmax 200Name.
epostastring | nullmax 200Email.
telefonstring | nullmax 32Phone.
dis_idstring | nullmax 200Customer id.

ApiCartItem

FieldTypeLimitsMeaning
item_ref *stringmin 1, max 200Product id.
ad *stringmin 1, max 500Product name.
adetinteger≥ 1, ≤ 999, default 1Quantity.
birim_fiyat *number | string≥ 0, ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Unit price.
urlstring | nullmax 2000Product URL.
Terminal window
curl -s -X PUT "$RZ_API/api/v1/sepetler" \
-H "Authorization: Bearer $RZ_KEY" -H "Content-Type: application/json" \
-d '{"items": [{"dis_id": "sepet-7f3a9c",
"musteri": {"ad": "Ayşe Yılmaz", "eposta": "[email protected]", "telefon": "05321234567"},
"kalemler": [{"item_ref": "1234", "ad": "Kablosuz Kulaklık X2", "adet": 1, "birim_fiyat": "1899.90"}],
"url": "https://magaza.example.com/sepet"}]}'

Schema: CartResultOut

FieldTypeLimitsMeaning
inserted *integer
updated *integer
unchanged *integer
deleted *integer
skipped_converted *integer
{
"inserted": 1,
"updated": 0,
"unchanged": 0,
"deleted": 0,
"skipped_converted": 0
}

Error statuses: 401, 403, 404, 413, 422, 429 — see Errors and limits.


GET/api/v1/sepetler

Newest update first. Use durum=terk for abandoned carts. The customer phone is masked unless the company enabled personal data for the Data API.

  • Authentication: Authorization: Bearer rz_live_…
  • Scope: read:carts
  • Plan feature: Data API + Carts — if off, the endpoint answers 404 not_found
NameInTypeLimitsMeaning
durumquerystring | nullStatus filter: for carts e.g. terk (abandoned); for leads yeni, iletisimde, teklif, kazanildi, kaybedildi.
cursorquerystring | nullnext_cursor from the previous response.
limitqueryinteger≥ 1, ≤ 100, default 50Page size.
Terminal window
curl -s -G "$RZ_API/api/v1/sepetler" -H "Authorization: Bearer $RZ_KEY" --data-urlencode "durum=terk"
{
"items": [
{
"dis_id": "sepet-7f3a9c",
"kalemler": [
{
"item_ref": "1234",
"ad": "Kablosuz Kulaklık X2",
"adet": 1,
"birim_fiyat": "1899.90"
}
],
"tutar": "1899.90",
"para_birimi": "TRY",
"url": "https://magaza.example.com/sepet",
"durum": "terk",
"son_guncelleme": "2026-09-24T09:00:00Z",
"siparis_no": null,
"musteri": {
"ad": "Ayşe Yılmaz",
"eposta": "[email protected]",
"telefon": "+90 532 *** ** 67"
}
}
],
"next_cursor": null
}

Error statuses: 401, 403, 404, 413, 422, 429 — see Errors and limits.


DELETE/api/v1/sepetler/{dis_id}

Deletes the cart. 404 not_found if it does not exist.

  • Authentication: Authorization: Bearer rz_live_…
  • Scope: ingest:carts
  • Plan feature: Data API + Carts — if off, the endpoint answers 404 not_found
  • Idempotency-Key: optional (recommended for retries)
NameInTypeLimitsMeaning
dis_id *pathstringThe id in your system.
Terminal window
curl -s -X DELETE "$RZ_API/api/v1/sepetler/sepet-7f3a9c" -H "Authorization: Bearer $RZ_KEY"
{
"deleted": 1
}

Error statuses: 401, 403, 404, 413, 422, 429 — see Errors and limits.