carts #1
- userId
-
Amina King @amina_king41
- currency
- USD
- subtotal
- 997.23
- itemCount
- 9
- updatedAt
- createdAt
Overview
carts / #1
Request
curl example
curl -sS \ "https://example-data.com/api/v1/carts/1" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/carts/1" ); 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/1"
);
const cart = (await res.json()) as Cart; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/carts/1"
)
cart = res.json() Response
{
"id": 1,
"userId": 2,
"currency": "USD",
"subtotal": 997.23,
"itemCount": 9,
"updatedAt": "2025-07-02T05:16:37.152Z",
"createdAt": "2024-09-13T04:12:14.210Z"
}