carts #5
- userId
-
Brycen Bayer @brycen_bayer60
- currency
- USD
- subtotal
- 1945.16
- itemCount
- 4
- updatedAt
- createdAt
Overview
carts / #5
Request
curl example
curl -sS \ "https://example-data.com/api/v1/carts/5" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/carts/5" ); 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/5"
);
const cart = (await res.json()) as Cart; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/carts/5"
)
cart = res.json() Response
{
"id": 5,
"userId": 6,
"currency": "USD",
"subtotal": 1945.16,
"itemCount": 4,
"updatedAt": "2025-11-14T10:08:10.450Z",
"createdAt": "2025-03-14T20:00:22.619Z"
}