example-data.com
Menu
Browse docs and collections

Overview

carts / #132

Component variants

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/carts/132" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/carts/132"
);
const cart = 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 } from "./types/carts";

const res = await fetch(
  "https://example-data.com/api/v1/carts/132"
);
const cart = (await res.json()) as Cart;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/carts/132"
)
cart = res.json()

Response

{
  "id": 132,
  "userId": 237,
  "currency": "USD",
  "subtotal": 901.97,
  "itemCount": 8,
  "updatedAt": "2026-05-16T06:17:22.412Z",
  "createdAt": "2025-09-03T13:10:50.473Z"
}