example-data.com
Menu
Browse docs and collections

Overview

carts / #99

carts #99

userId
Kaleb Schmidt @kaleb.schmidt
currency
USD
subtotal
5969.88
itemCount
16
updatedAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 99,
  "userId": 171,
  "currency": "USD",
  "subtotal": 5969.88,
  "itemCount": 16,
  "updatedAt": "2025-08-27T22:07:01.403Z",
  "createdAt": "2025-07-25T16:33:24.579Z"
}