example-data.com
Menu
Browse docs and collections

carts

carts

Page 4 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": 73,
      "userId": 118,
      "currency": "USD",
      "subtotal": 2208.56,
      "itemCount": 8,
      "updatedAt": "2025-11-07T19:15:52.872Z",
      "createdAt": "2025-06-17T12:26:03.329Z"
    },
    {
      "id": 74,
      "userId": 120,
      "currency": "USD",
      "subtotal": 794.61,
      "itemCount": 6,
      "updatedAt": "2025-11-01T16:10:41.292Z",
      "createdAt": "2025-07-19T21:22:58.215Z"
    },
    {
      "id": 75,
      "userId": 121,
      "currency": "USD",
      "subtotal": 2817.86,
      "itemCount": 6,
      "updatedAt": "2026-03-18T12:31:55.289Z",
      "createdAt": "2025-07-21T08:37:08.804Z"
    }
  ],
  "meta": {
    "page": 4,
    "limit": 24,
    "total": 140,
    "totalPages": 6
  },
  "links": {
    "self": "/api/v1/carts?page=4&limit=24",
    "first": "/api/v1/carts?page=1&limit=24",
    "last": "/api/v1/carts?page=6&limit=24",
    "next": "/api/v1/carts?page=5&limit=24",
    "prev": "/api/v1/carts?page=3&limit=24"
  }
}