example-data.com
Menu
Browse docs and collections

cart-items

cart-items

Page 17 of 18.

Overview

Request

curl example

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

JavaScript example

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

TypeScript example

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

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

Python example

import requests

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

Response

{
  "data": [
    {
      "id": 385,
      "cartId": 127,
      "productId": 114,
      "quantity": 4,
      "unitPrice": 112.99,
      "addedAt": "2026-01-18T04:15:07.173Z"
    },
    {
      "id": 386,
      "cartId": 127,
      "productId": 187,
      "quantity": 2,
      "unitPrice": 211.17,
      "addedAt": "2026-02-24T18:29:33.394Z"
    },
    {
      "id": 387,
      "cartId": 128,
      "productId": 33,
      "quantity": 4,
      "unitPrice": 60.49,
      "addedAt": "2025-12-06T21:20:46.437Z"
    }
  ],
  "meta": {
    "page": 17,
    "limit": 24,
    "total": 426,
    "totalPages": 18
  },
  "links": {
    "self": "/api/v1/cart-items?page=17&limit=24",
    "first": "/api/v1/cart-items?page=1&limit=24",
    "last": "/api/v1/cart-items?page=18&limit=24",
    "next": "/api/v1/cart-items?page=18&limit=24",
    "prev": "/api/v1/cart-items?page=16&limit=24"
  }
}