example-data.com
Menu
Browse docs and collections

carts

carts

Page 2 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": 25,
      "userId": 43,
      "currency": "USD",
      "subtotal": 326.72,
      "itemCount": 2,
      "updatedAt": "2025-06-18T08:10:04.968Z",
      "createdAt": "2024-06-25T21:54:22.067Z"
    },
    {
      "id": 26,
      "userId": 44,
      "currency": "USD",
      "subtotal": 115.17,
      "itemCount": 3,
      "updatedAt": "2025-07-07T15:03:02.086Z",
      "createdAt": "2025-02-23T10:14:48.650Z"
    },
    {
      "id": 27,
      "userId": 46,
      "currency": "USD",
      "subtotal": 3219.96,
      "itemCount": 8,
      "updatedAt": "2025-10-29T10:52:48.478Z",
      "createdAt": "2025-06-14T09:17:03.995Z"
    }
  ],
  "meta": {
    "page": 2,
    "limit": 24,
    "total": 140,
    "totalPages": 6
  },
  "links": {
    "self": "/api/v1/carts?page=2&limit=24",
    "first": "/api/v1/carts?page=1&limit=24",
    "last": "/api/v1/carts?page=6&limit=24",
    "next": "/api/v1/carts?page=3&limit=24",
    "prev": "/api/v1/carts?page=1&limit=24"
  }
}