example-data.com
Menu
Browse docs and collections

carts

carts

Page 5 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": 97,
      "userId": 168,
      "currency": "USD",
      "subtotal": 772.13,
      "itemCount": 5,
      "updatedAt": "2025-07-29T03:35:56.595Z",
      "createdAt": "2025-04-17T14:33:26.093Z"
    },
    {
      "id": 98,
      "userId": 170,
      "currency": "USD",
      "subtotal": 1449.53,
      "itemCount": 7,
      "updatedAt": "2026-03-04T19:39:17.040Z",
      "createdAt": "2025-12-12T01:07:46.050Z"
    },
    {
      "id": 99,
      "userId": 171,
      "currency": "USD",
      "subtotal": 5969.88,
      "itemCount": 16,
      "updatedAt": "2025-08-27T22:07:01.403Z",
      "createdAt": "2025-07-25T16:33:24.579Z"
    }
  ],
  "meta": {
    "page": 5,
    "limit": 24,
    "total": 140,
    "totalPages": 6
  },
  "links": {
    "self": "/api/v1/carts?page=5&limit=24",
    "first": "/api/v1/carts?page=1&limit=24",
    "last": "/api/v1/carts?page=6&limit=24",
    "next": "/api/v1/carts?page=6&limit=24",
    "prev": "/api/v1/carts?page=4&limit=24"
  }
}