example-data.com

invoices / #33

fromUserId
63
toUserId
119
invoiceNumber
INV-2024-0033
status
overdue
issuedAt
dueAt
paidAt
subtotal
45578.52
tax
6836.78
total
52415.3
currency
AUD
lineItems
[
  {
    "description": "Legal review",
    "quantity": 28,
    "unitPrice": 445.37,
    "lineTotal": 12470.36
  },
  {
    "description": "Documentation",
    "quantity": 23,
    "unitPrice": 461.93,
    "lineTotal": 10624.39
  },
  {
    "description": "Implementation services",
    "quantity": 11,
    "unitPrice": 342.77,
    "lineTotal": 3770.47
  },
  {
    "description": "Maintenance contract",
    "quantity": 5,
    "unitPrice": 118.1,
    "lineTotal": 590.5
  },
  {
    "description": "License fee",
    "quantity": 40,
    "unitPrice": 453.07,
    "lineTotal": 18122.8
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/33"
)
invoice = res.json()
{
  "id": 33,
  "fromUserId": 63,
  "toUserId": 119,
  "invoiceNumber": "INV-2024-0033",
  "status": "overdue",
  "issuedAt": "2024-12-19T02:50:28.957Z",
  "dueAt": "2025-01-06T02:50:28.957Z",
  "paidAt": null,
  "subtotal": 45578.52,
  "tax": 6836.78,
  "total": 52415.3,
  "currency": "AUD",
  "lineItems": [
    {
      "description": "Legal review",
      "quantity": 28,
      "unitPrice": 445.37,
      "lineTotal": 12470.36
    },
    {
      "description": "Documentation",
      "quantity": 23,
      "unitPrice": 461.93,
      "lineTotal": 10624.39
    },
    {
      "description": "Implementation services",
      "quantity": 11,
      "unitPrice": 342.77,
      "lineTotal": 3770.47
    },
    {
      "description": "Maintenance contract",
      "quantity": 5,
      "unitPrice": 118.1,
      "lineTotal": 590.5
    },
    {
      "description": "License fee",
      "quantity": 40,
      "unitPrice": 453.07,
      "lineTotal": 18122.8
    }
  ],
  "createdAt": "2024-12-18T22:03:32.132Z"
}
Draftbit