example-data.com
Menu
Browse docs and collections

cart-items

cart-items

Page 8 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": 169,
      "cartId": 61,
      "productId": 67,
      "quantity": 4,
      "unitPrice": 226.39,
      "addedAt": "2025-05-29T11:10:27.180Z"
    },
    {
      "id": 170,
      "cartId": 61,
      "productId": 41,
      "quantity": 4,
      "unitPrice": 247.99,
      "addedAt": "2025-09-06T12:39:29.861Z"
    },
    {
      "id": 171,
      "cartId": 61,
      "productId": 138,
      "quantity": 1,
      "unitPrice": 269.19,
      "addedAt": "2026-05-19T03:52:06.307Z"
    }
  ],
  "meta": {
    "page": 8,
    "limit": 24,
    "total": 426,
    "totalPages": 18
  },
  "links": {
    "self": "/api/v1/cart-items?page=8&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=9&limit=24",
    "prev": "/api/v1/cart-items?page=7&limit=24"
  }
}