example-data.com
Menu
Browse docs and collections

Overview

invoices / #295

invoices #295

fromUserId
Carmel Schultz @carmel.schultz
toUserId
Joseph Steuber @joseph_steuber
invoiceNumber
INV-2025-0295
status
paid
issuedAt
dueAt
paidAt
subtotal
16243.71
tax
1624.37
total
17868.08
currency
GBP
lineItems
              [
  {
    "description": "Research services",
    "quantity": 37,
    "unitPrice": 399.23,
    "lineTotal": 14771.51
  },
  {
    "description": "Legal review",
    "quantity": 34,
    "unitPrice": 43.3,
    "lineTotal": 1472.2
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/invoices/295"
);
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/295"
);
const invoice = (await res.json()) as Invoice;

Python example

import requests

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

Response

{
  "id": 295,
  "fromUserId": 156,
  "toUserId": 221,
  "invoiceNumber": "INV-2025-0295",
  "status": "paid",
  "issuedAt": "2025-07-25T21:12:33.718Z",
  "dueAt": "2025-09-12T21:12:33.718Z",
  "paidAt": "2025-08-27T22:21:26.938Z",
  "subtotal": 16243.71,
  "tax": 1624.37,
  "total": 17868.08,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Research services",
      "quantity": 37,
      "unitPrice": 399.23,
      "lineTotal": 14771.51
    },
    {
      "description": "Legal review",
      "quantity": 34,
      "unitPrice": 43.3,
      "lineTotal": 1472.2
    }
  ],
  "createdAt": "2025-07-25T21:03:06.956Z"
}