example-data.com
Menu
Browse docs and collections

Overview

carts / #123

carts #123

userId
Loren Schmidt @loren_schmidt
currency
USD
subtotal
2333.27
itemCount
9
updatedAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/carts/123"
);
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/123"
);
const cart = (await res.json()) as Cart;

Python example

import requests

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

Response

{
  "id": 123,
  "userId": 222,
  "currency": "USD",
  "subtotal": 2333.27,
  "itemCount": 9,
  "updatedAt": "2026-04-10T21:48:22.383Z",
  "createdAt": "2025-07-05T04:17:21.428Z"
}