example-data.com

invoices / #69

fromUserId
121
toUserId
250
invoiceNumber
INV-2024-0069
status
paid
issuedAt
dueAt
paidAt
subtotal
16000.7
tax
3200.14
total
19200.84
currency
CAD
lineItems
[
  {
    "description": "Technical support",
    "quantity": 31,
    "unitPrice": 471.58,
    "lineTotal": 14618.98
  },
  {
    "description": "Training session",
    "quantity": 4,
    "unitPrice": 345.43,
    "lineTotal": 1381.72
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/69"
)
invoice = res.json()
{
  "id": 69,
  "fromUserId": 121,
  "toUserId": 250,
  "invoiceNumber": "INV-2024-0069",
  "status": "paid",
  "issuedAt": "2024-05-31T06:23:17.878Z",
  "dueAt": "2024-07-29T06:23:17.878Z",
  "paidAt": "2024-07-10T18:05:08.445Z",
  "subtotal": 16000.7,
  "tax": 3200.14,
  "total": 19200.84,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Technical support",
      "quantity": 31,
      "unitPrice": 471.58,
      "lineTotal": 14618.98
    },
    {
      "description": "Training session",
      "quantity": 4,
      "unitPrice": 345.43,
      "lineTotal": 1381.72
    }
  ],
  "createdAt": "2024-05-30T14:39:05.176Z"
}
Draftbit