example-data.com
Menu
Browse docs and collections

Overview

invoices / #298

invoices #298

fromUserId
Emilia Cummerata @emilia_cummerata
toUserId
Kathleen Lynch @kathleen_lynch1
invoiceNumber
INV-2025-0298
status
sent
issuedAt
dueAt
paidAt
subtotal
20471.1
tax
1637.69
total
22108.79
currency
AUD
lineItems
              [
  {
    "description": "Legal review",
    "quantity": 40,
    "unitPrice": 399.39,
    "lineTotal": 15975.6
  },
  {
    "description": "Technical support",
    "quantity": 27,
    "unitPrice": 166.5,
    "lineTotal": 4495.5
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 298,
  "fromUserId": 238,
  "toUserId": 139,
  "invoiceNumber": "INV-2025-0298",
  "status": "sent",
  "issuedAt": "2025-04-22T22:50:45.153Z",
  "dueAt": "2025-05-06T22:50:45.153Z",
  "paidAt": null,
  "subtotal": 20471.1,
  "tax": 1637.69,
  "total": 22108.79,
  "currency": "AUD",
  "lineItems": [
    {
      "description": "Legal review",
      "quantity": 40,
      "unitPrice": 399.39,
      "lineTotal": 15975.6
    },
    {
      "description": "Technical support",
      "quantity": 27,
      "unitPrice": 166.5,
      "lineTotal": 4495.5
    }
  ],
  "createdAt": "2025-04-22T12:36:51.174Z"
}