example-data.com
Menu
Browse docs and collections

Overview

carts / #44

carts #44

userId
Ryan Conroy @ryan_conroy
currency
USD
subtotal
473.93
itemCount
5
updatedAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 44,
  "userId": 73,
  "currency": "USD",
  "subtotal": 473.93,
  "itemCount": 5,
  "updatedAt": "2025-05-24T01:57:04.871Z",
  "createdAt": "2025-02-26T14:24:03.104Z"
}