List abandoned carts
Abandoned carts, as a sync list (plan feature abandoned_carts, included in Pro; contact data needs customers.read)
https://s.zo.sa/api/public/v1 /carts/abandoned carts.readCarts with items and a contact, never ordered, idle past the store's reminder threshold, and not hidden by the merchant. A cart becomes abandoned by the passing of time, without any change to its row, so this list cannot be synced by updated_at: it is ordered by (created_at, id), refuses updated_since (422), and clients read it afresh each time (optionally with created_since) instead of incrementally.
Request
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
per_page | integer | Rows per page, 1 to 100 (default 50; more is capped at 100). Default 50 At least 1 | |
cursor | string | The meta.next_cursor of the previous page. Opaque. Up to 200 characters | |
created_since | string (date-time) | Only rows created at or after this time (ISO 8601, inclusive to the second; no offset means UTC). |
cURL
curl -sS "https://s.zo.sa/api/public/v1/carts/abandoned" \
-H "Authorization: Bearer $ZO_API_KEY" \
-H "Accept: application/json"JavaScript
const response = await fetch('https://s.zo.sa/api/public/v1/carts/abandoned', {
headers: {
Authorization: `Bearer ${process.env.ZO_API_KEY}`,
Accept: 'application/json',
},
});
console.log(response.status, await response.json());PHP
<?php
$ch = curl_init('https://s.zo.sa/api/public/v1/carts/abandoned');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ZO_API_KEY'),
'Accept: application/json',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
response = requests.get(
"https://s.zo.sa/api/public/v1/carts/abandoned",
headers={
"Authorization": f"Bearer {os.environ['ZO_API_KEY']}",
"Accept": "application/json",
},
timeout=30,
)
print(response.status_code, response.json()){
"data": [
{
"id": 1,
"customer": {
"id": null,
"name": null,
"mobile": null,
"email": null
},
"items": [
{
"variant_id": 1,
"sku": null,
"name": {
"ar": null,
"en": null
},
"quantity": 1,
"unit_price": 5000
}
],
"subtotal": 5000,
"currency": "SAR",
"last_activity_at": "2026-11-23T06:01:53Z",
"reminders_sent": 1,
"created_at": "2026-11-23T06:01:53Z",
"updated_at": "2026-11-23T06:01:53Z"
}
],
"meta": {
"per_page": 1,
"next_cursor": null
}
}Example generated from the schema.
Responses
Response schema
dataarray of objectsrequired9 fields
idintegerrequiredcustomerobjectrequired4 fields
idintegerrequirednullableNull for a guest.namestringrequirednullablemobilestringnullablePresent only with customers.read.emailstringnullablePresent only with customers.read.
itemsarray of objectsrequired5 fields
variant_idintegerrequiredskustringrequirednullablenameobjectrequired2 fields
arstringrequirednullableenstringrequirednullable
quantityintegerrequiredunit_priceintegerrequiredHalalas at today price.
subtotalintegerrequiredHalalas, from the store's cart valuation: active products only, custom-field fees included. It can differ from the sum of items unit_price times quantity.currencystringrequiredlast_activity_atstring (date-time)requiredreminders_sentintegerrequiredcreated_atstring (date-time)requiredupdated_atstring (date-time)required
metaobjectrequired2 fields
per_pageintegerrequirednext_cursorstringrequirednullablePass as cursor for the next page; null on the last page.
An error object: {"error": {"code", "message", "fields"}}.
An error object: {"error": {"code", "message", "fields"}}.
An error object: {"error": {"code", "message", "fields"}}.
An error object: {"error": {"code", "message", "fields"}}.
An error object: {"error": {"code", "message", "fields"}}.