example-data.com
Menu
Browse docs and collections

Overview

carts / #12

carts #12

userId
Alvina Koch @alvina.koch8
currency
USD
subtotal
1864.27
itemCount
9
updatedAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 12,
  "userId": 20,
  "currency": "USD",
  "subtotal": 1864.27,
  "itemCount": 9,
  "updatedAt": "2026-04-02T16:34:58.110Z",
  "createdAt": "2025-10-27T01:55:51.649Z"
}