Carts
/api/v1/sepetler — PUT
Section titled “/api/v1/sepetler — PUT”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)
Request body (application/json)
Section titled “Request body (application/json)”Fields marked * are required. Unknown fields are rejected with 422.
CartBatch
| Field | Type | Limits | Meaning |
|---|---|---|---|
items * | ApiCart[] | min items 1, max items 1000 | 1–1000 records. |
ApiCart
| Field | Type | Limits | Meaning |
|---|---|---|---|
dis_id * | string | min 1, max 200 | Id of this cart instance (not of the customer). |
musteri * | ApiCartCustomer | Customer. | |
kalemler | ApiCartItem[] | max items 200, default [] | Items; an empty list deletes the cart. |
tutar | number | string | null | ≥ 0, ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ | Cart total. |
para_birimi | string | min 3, max 3, default "TRY" | Currency. |
url | string | null | max 2000 | Cart URL. |
son_guncelleme | string (date-time) | null | Last update (abandonment is measured from this). |
ApiCartCustomer
| Field | Type | Limits | Meaning |
|---|---|---|---|
ad | string | null | max 200 | Name. |
eposta | string | null | max 200 | Email. |
telefon | string | null | max 32 | Phone. |
dis_id | string | null | max 200 | Customer id. |
ApiCartItem
| Field | Type | Limits | Meaning |
|---|---|---|---|
item_ref * | string | min 1, max 200 | Product id. |
ad * | string | min 1, max 500 | Product name. |
adet | integer | ≥ 1, ≤ 999, default 1 | Quantity. |
birim_fiyat * | number | string | ≥ 0, ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ | Unit price. |
url | string | null | max 2000 | Product URL. |
Example
Section titled “Example”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"}]}'Response 200
Section titled “Response 200”Schema: CartResultOut
| Field | Type | Limits | Meaning |
|---|---|---|---|
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.
/api/v1/sepetler — GET
Section titled “/api/v1/sepetler — GET”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
Parameters
Section titled “Parameters”| Name | In | Type | Limits | Meaning |
|---|---|---|---|---|
durum | query | string | null | Status filter: for carts e.g. terk (abandoned); for leads yeni, iletisimde, teklif, kazanildi, kaybedildi. | |
cursor | query | string | null | next_cursor from the previous response. | |
limit | query | integer | ≥ 1, ≤ 100, default 50 | Page size. |
Example
Section titled “Example”curl -s -G "$RZ_API/api/v1/sepetler" -H "Authorization: Bearer $RZ_KEY" --data-urlencode "durum=terk"Response 200
Section titled “Response 200”{ "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", "telefon": "+90 532 *** ** 67" } } ], "next_cursor": null}Error statuses: 401, 403, 404, 413, 422, 429 — see Errors and limits.
/api/v1/sepetler/{dis_id} — DELETE
Section titled “/api/v1/sepetler/{dis_id} — DELETE”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)
Parameters
Section titled “Parameters”| Name | In | Type | Limits | Meaning |
|---|---|---|---|---|
dis_id * | path | string | The id in your system. |
Example
Section titled “Example”curl -s -X DELETE "$RZ_API/api/v1/sepetler/sepet-7f3a9c" -H "Authorization: Bearer $RZ_KEY"Response 200
Section titled “Response 200”{ "deleted": 1}Error statuses: 401, 403, 404, 413, 422, 429 — see Errors and limits.
© 2026 Erusoft