example-data.com
Menu
Browse docs and collections

Overview

carts / #24

carts #24

userId
Amely Daniel @amely_daniel
currency
USD
subtotal
2271.22
itemCount
13
updatedAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 24,
  "userId": 41,
  "currency": "USD",
  "subtotal": 2271.22,
  "itemCount": 13,
  "updatedAt": "2025-05-26T17:37:35.840Z",
  "createdAt": "2025-04-01T21:40:52.490Z"
}