example-data.com
Menu
Browse docs and collections

Overview

carts / #102

carts #102

userId
Ismael Ward @ismael_ward
currency
USD
subtotal
3629.17
itemCount
9
updatedAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 102,
  "userId": 178,
  "currency": "USD",
  "subtotal": 3629.17,
  "itemCount": 9,
  "updatedAt": "2025-10-08T12:58:46.549Z",
  "createdAt": "2025-05-08T02:45:51.897Z"
}