example-data.com
Menu
Browse docs and collections

Overview

invoices / #287

invoices #287

fromUserId
Hilda Crooks @hilda_crooks61
toUserId
Claudie Hagenes @claudie_hagenes
invoiceNumber
INV-2026-0287
status
paid
issuedAt
dueAt
paidAt
subtotal
20837.81
tax
2083.78
total
22921.59
currency
USD
lineItems
              [
  {
    "description": "Data analysis",
    "quantity": 35,
    "unitPrice": 457.23,
    "lineTotal": 16003.05
  },
  {
    "description": "Technical support",
    "quantity": 28,
    "unitPrice": 172.67,
    "lineTotal": 4834.76
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/invoices/287"
);
const invoice = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/invoices.d.ts https://example-data.com/types/invoices.d.ts
import type { Invoice } from "./types/invoices";

const res = await fetch(
  "https://example-data.com/api/v1/invoices/287"
);
const invoice = (await res.json()) as Invoice;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/invoices/287"
)
invoice = res.json()

Response

{
  "id": 287,
  "fromUserId": 187,
  "toUserId": 232,
  "invoiceNumber": "INV-2026-0287",
  "status": "paid",
  "issuedAt": "2026-05-18T23:41:57.490Z",
  "dueAt": "2026-05-27T23:41:57.490Z",
  "paidAt": "2026-05-19T00:26:20.332Z",
  "subtotal": 20837.81,
  "tax": 2083.78,
  "total": 22921.59,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Data analysis",
      "quantity": 35,
      "unitPrice": 457.23,
      "lineTotal": 16003.05
    },
    {
      "description": "Technical support",
      "quantity": 28,
      "unitPrice": 172.67,
      "lineTotal": 4834.76
    }
  ],
  "createdAt": "2026-05-18T03:53:27.926Z"
}