example-data.com
Menu
Browse docs and collections

Overview

carts / #88

carts #88

userId
Orrin Grant @orrin.grant42
currency
USD
subtotal
2408.88
itemCount
12
updatedAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 88,
  "userId": 152,
  "currency": "USD",
  "subtotal": 2408.88,
  "itemCount": 12,
  "updatedAt": "2025-08-26T00:32:27.846Z",
  "createdAt": "2025-01-15T18:41:06.907Z"
}