example-data.com

invoices / #66

fromUserId
155
toUserId
236
invoiceNumber
INV-2025-0066
status
overdue
issuedAt
dueAt
paidAt
subtotal
9981.9
tax
1996.38
total
11978.28
currency
GBP
lineItems
[
  {
    "description": "Maintenance contract",
    "quantity": 10,
    "unitPrice": 13.05,
    "lineTotal": 130.5
  },
  {
    "description": "Research services",
    "quantity": 7,
    "unitPrice": 388.85,
    "lineTotal": 2721.95
  },
  {
    "description": "Design work",
    "quantity": 31,
    "unitPrice": 182.65,
    "lineTotal": 5662.15
  },
  {
    "description": "Accounting services",
    "quantity": 3,
    "unitPrice": 489.1,
    "lineTotal": 1467.3
  }
]
createdAt

Component variants

curl -sS \
  "https://example-data.com/api/v1/invoices/66" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/invoices/66"
);
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/66"
);
const invoice = (await res.json()) as Invoice;
import requests

res = requests.get(
    "https://example-data.com/api/v1/invoices/66"
)
invoice = res.json()
{
  "id": 66,
  "fromUserId": 155,
  "toUserId": 236,
  "invoiceNumber": "INV-2025-0066",
  "status": "overdue",
  "issuedAt": "2025-01-24T07:55:37.014Z",
  "dueAt": "2025-02-04T07:55:37.014Z",
  "paidAt": null,
  "subtotal": 9981.9,
  "tax": 1996.38,
  "total": 11978.28,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Maintenance contract",
      "quantity": 10,
      "unitPrice": 13.05,
      "lineTotal": 130.5
    },
    {
      "description": "Research services",
      "quantity": 7,
      "unitPrice": 388.85,
      "lineTotal": 2721.95
    },
    {
      "description": "Design work",
      "quantity": 31,
      "unitPrice": 182.65,
      "lineTotal": 5662.15
    },
    {
      "description": "Accounting services",
      "quantity": 3,
      "unitPrice": 489.1,
      "lineTotal": 1467.3
    }
  ],
  "createdAt": "2025-01-23T12:11:07.863Z"
}
Draftbit