example-data.com
Menu
Browse docs and collections

Overview

carts / #11

carts #11

userId
Kenya Abshire @kenya.abshire
currency
USD
subtotal
1507.05
itemCount
8
updatedAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 11,
  "userId": 18,
  "currency": "USD",
  "subtotal": 1507.05,
  "itemCount": 8,
  "updatedAt": "2025-12-04T05:06:45.508Z",
  "createdAt": "2025-04-13T22:58:01.547Z"
}