نقلة
Docs menuList abandoned carts

GET List abandoned carts

العربية

Abandoned carts of registered customers who consent to marketing on at least one channel, newest first: lines, total, state and the consent per channel. No contact data: read the customer with GET /customers/{id} and message only on a consenting channel.

GET /abandoned-carts
Scope
customers.read Sensitive
Full address
https://naqllah.com/api/apps/v1/abandoned-carts
Rate limit
120 a minute per store, 1200 a minute across all stores
The merchant reads
Read customer details: name, email and mobile number

Request

Parameters

NameInTypeDescription
page query integer · ≥ 1 Page number. (default 1)
per_page query integer · ≥ 1 · ≤ 50 Items per page. (default 20)
updated_since query string · date-time Only records changed since this time.
recovered query boolean true: only carts that became an order; false: only open carts.

Samples

Each sample reads the access token from the environment variable NAQLLAH_ACCESS_TOKEN.

cURL
curl "https://naqllah.com/api/apps/v1/abandoned-carts" \
  -H "Authorization: Bearer $NAQLLAH_ACCESS_TOKEN"
PHP
<?php
$ch = curl_init('https://naqllah.com/api/apps/v1/abandoned-carts');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('NAQLLAH_ACCESS_TOKEN'),
        'Accept: application/json',
    ],
]);

$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

$json = json_decode($body, true);
if ($status >= 400) {
    throw new RuntimeException($json['error'] ?? 'http_' . $status);
}
$data = $json['data'];
Node.js
// Node.js 18+ (fetch is built in)
const res = await fetch('https://naqllah.com/api/apps/v1/abandoned-carts', {
  headers: {
    Authorization: `Bearer ${process.env.NAQLLAH_ACCESS_TOKEN}`,
    Accept: 'application/json',
  },
});

const json = await res.json();
if (!res.ok) throw new Error(json.error);
const { data } = json;
Python
import os
import requests

res = requests.get(
    "https://naqllah.com/api/apps/v1/abandoned-carts",
    headers={
        "Authorization": f"Bearer {os.environ['NAQLLAH_ACCESS_TOKEN']}",
        "Accept": "application/json",
    },
    timeout=10,
)

body = res.json()
if res.status_code >= 400:
    raise RuntimeError(body["error"])
data = body["data"]

Response

On success the answer is 200 with this body. The example uses sample data.

FieldTypeNotes
data array<AbandonedCart> —
data[].cart_id integer —
data[].customer_id integer —
data[].items array<object> —
data[].items[].product_id integer may be null
data[].items[].variant_id integer may be null
data[].items[].sku string may be null
data[].items[].quantity integer —
data[].items[].unit_price string SAR, two decimals, as text
data[].items_count integer —
data[].total string SAR, two decimals, as text
data[].recovered boolean —
data[].recovered_order_id integer may be null
data[].created_at string may be null · ISO 8601 time
data[].updated_at string may be null · ISO 8601 time
data[].marketing_consent object —
data[].marketing_consent.email boolean —
data[].marketing_consent.sms boolean —
data[].marketing_consent.whatsapp boolean —
meta object —
meta.page integer —
meta.per_page integer —
meta.next_page integer may be null
200 · JSON
{
    "data": [
        {
            "cart_id": 9120,
            "customer_id": 771,
            "items": [
                {
                    "product_id": 318,
                    "variant_id": 1204,
                    "sku": "TS-BLK-M",
                    "quantity": 2,
                    "unit_price": "89.00"
                }
            ],
            "items_count": 2,
            "total": "178.00",
            "recovered": false,
            "recovered_order_id": null,
            "created_at": "2026-11-04T08:02:11+03:00",
            "updated_at": "2026-11-04T09:05:00+03:00",
            "marketing_consent": {
                "email": true,
                "sms": true,
                "whatsapp": false
            }
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 20,
        "next_page": 2
    }
}

Errors

HTTPCodeMeaning
401invalid_tokenThe access token is invalid or expired.
401not_installedThe app is not installed on this store.
402payment_requiredThe app's subscription on this store is unpaid.
403app_suspendedThe app or the developer account is suspended.
403insufficient_scopeThe merchant has not granted this permission to the app.
429rate_limitedThe app is over its request limit. Try again shortly.

All error codes

Rate limits

120 requests a minute per store, and 1200 requests a minute for your app across all stores. Over the limit you get 429 with Retry-After. Every answer carries X-RateLimit-Limit and X-RateLimit-Remaining.

Try it

Fill in the request and see the answer this endpoint gives.

Mock Answers come from this page's examples and rules, in your browser. Nothing is sent to any store, and no token leaves this page. To call the real API, use the test store with your own token.

Trying needs JavaScript; the samples above work without it.

Version v1.0.0 Changelog Service status openapi-v1.json Support