example-data.com

invoices / #36

fromUserId
162
toUserId
98
invoiceNumber
INV-2025-0036
status
draft
issuedAt
dueAt
paidAt
subtotal
21422.4
tax
0
total
21422.4
currency
GBP
lineItems
[
  {
    "description": "System integration",
    "quantity": 15,
    "unitPrice": 421.84,
    "lineTotal": 6327.6
  },
  {
    "description": "Maintenance contract",
    "quantity": 35,
    "unitPrice": 431.28,
    "lineTotal": 15094.8
  }
]
createdAt

Component variants

curl -sS \
  "https://example-data.com/api/v1/invoices/36" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/invoices/36"
);
const invoice = await res.json();
import type { Invoice } from "https://example-data.com/types/invoices.d.ts";

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/36"
)
invoice = res.json()
{
  "id": 36,
  "fromUserId": 162,
  "toUserId": 98,
  "invoiceNumber": "INV-2025-0036",
  "status": "draft",
  "issuedAt": "2025-01-10T02:14:57.510Z",
  "dueAt": "2025-03-04T02:14:57.510Z",
  "paidAt": null,
  "subtotal": 21422.4,
  "tax": 0,
  "total": 21422.4,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 15,
      "unitPrice": 421.84,
      "lineTotal": 6327.6
    },
    {
      "description": "Maintenance contract",
      "quantity": 35,
      "unitPrice": 431.28,
      "lineTotal": 15094.8
    }
  ],
  "createdAt": "2025-01-09T21:15:02.002Z"
}
Draftbit