example-data.com
Menu
Browse docs and collections

Overview

carts / #3

carts #3

userId
Cayla Farrell @cayla_farrell
currency
USD
subtotal
963.88
itemCount
7
updatedAt
createdAt

Component variants

Medium

#3

#3

Small
carts/3

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 3,
  "userId": 4,
  "currency": "USD",
  "subtotal": 963.88,
  "itemCount": 7,
  "updatedAt": "2025-11-26T01:08:32.530Z",
  "createdAt": "2025-05-29T11:49:49.057Z"
}