example-data.com
Menu
Browse docs and collections

Overview

carts / #66

carts #66

userId
Abdul Rau @abdul.rau
currency
USD
subtotal
226.39
itemCount
1
updatedAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 66,
  "userId": 108,
  "currency": "USD",
  "subtotal": 226.39,
  "itemCount": 1,
  "updatedAt": "2025-08-18T15:17:04.543Z",
  "createdAt": "2025-02-09T20:34:38.525Z"
}