example-data.com
Menu
Browse docs and collections

carts

carts

Page 6 of 6.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/carts?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/carts?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/carts.d.ts https://example-data.com/types/carts.d.ts
import type { Cart, ListEnvelope } from "./types/carts";

const res = await fetch(
  "https://example-data.com/api/v1/carts?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Cart>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/carts",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 121,
      "userId": 219,
      "currency": "USD",
      "subtotal": 5049.63,
      "itemCount": 13,
      "updatedAt": "2025-10-27T12:30:45.161Z",
      "createdAt": "2025-03-17T11:33:55.905Z"
    },
    {
      "id": 122,
      "userId": 221,
      "currency": "USD",
      "subtotal": 2166.8,
      "itemCount": 10,
      "updatedAt": "2025-08-10T20:21:35.333Z",
      "createdAt": "2025-07-24T12:34:57.173Z"
    },
    {
      "id": 123,
      "userId": 222,
      "currency": "USD",
      "subtotal": 2333.27,
      "itemCount": 9,
      "updatedAt": "2026-04-10T21:48:22.383Z",
      "createdAt": "2025-07-05T04:17:21.428Z"
    }
  ],
  "meta": {
    "page": 6,
    "limit": 24,
    "total": 140,
    "totalPages": 6
  },
  "links": {
    "self": "/api/v1/carts?page=6&limit=24",
    "first": "/api/v1/carts?page=1&limit=24",
    "last": "/api/v1/carts?page=6&limit=24",
    "next": null,
    "prev": "/api/v1/carts?page=5&limit=24"
  }
}