example-data.com

invoices / #18

fromUserId
131
toUserId
61
invoiceNumber
INV-2025-0018
status
paid
issuedAt
dueAt
paidAt
subtotal
14189.2
tax
0
total
14189.2
currency
CAD
lineItems
[
  {
    "description": "System integration",
    "quantity": 10,
    "unitPrice": 50,
    "lineTotal": 500
  },
  {
    "description": "Technical support",
    "quantity": 35,
    "unitPrice": 209.22,
    "lineTotal": 7322.7
  },
  {
    "description": "Technical support",
    "quantity": 34,
    "unitPrice": 187.25,
    "lineTotal": 6366.5
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/18"
)
invoice = res.json()
{
  "id": 18,
  "fromUserId": 131,
  "toUserId": 61,
  "invoiceNumber": "INV-2025-0018",
  "status": "paid",
  "issuedAt": "2025-02-10T15:50:45.897Z",
  "dueAt": "2025-04-01T15:50:45.897Z",
  "paidAt": "2025-02-14T09:48:03.423Z",
  "subtotal": 14189.2,
  "tax": 0,
  "total": 14189.2,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 10,
      "unitPrice": 50,
      "lineTotal": 500
    },
    {
      "description": "Technical support",
      "quantity": 35,
      "unitPrice": 209.22,
      "lineTotal": 7322.7
    },
    {
      "description": "Technical support",
      "quantity": 34,
      "unitPrice": 187.25,
      "lineTotal": 6366.5
    }
  ],
  "createdAt": "2025-02-10T10:14:41.642Z"
}
Draftbit