example-data.com

invoices / #151

fromUserId
82
toUserId
43
invoiceNumber
INV-2025-0151
status
paid
issuedAt
dueAt
paidAt
subtotal
10704.64
tax
856.37
total
11561.01
currency
CAD
lineItems
[
  {
    "description": "Technical support",
    "quantity": 3,
    "unitPrice": 300.44,
    "lineTotal": 901.32
  },
  {
    "description": "Accounting services",
    "quantity": 19,
    "unitPrice": 199.24,
    "lineTotal": 3785.56
  },
  {
    "description": "Content writing",
    "quantity": 4,
    "unitPrice": 193.68,
    "lineTotal": 774.72
  },
  {
    "description": "Documentation",
    "quantity": 12,
    "unitPrice": 436.92,
    "lineTotal": 5243.04
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/151"
)
invoice = res.json()
{
  "id": 151,
  "fromUserId": 82,
  "toUserId": 43,
  "invoiceNumber": "INV-2025-0151",
  "status": "paid",
  "issuedAt": "2025-01-01T09:16:38.270Z",
  "dueAt": "2025-02-08T09:16:38.270Z",
  "paidAt": "2025-01-23T17:00:36.245Z",
  "subtotal": 10704.64,
  "tax": 856.37,
  "total": 11561.01,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Technical support",
      "quantity": 3,
      "unitPrice": 300.44,
      "lineTotal": 901.32
    },
    {
      "description": "Accounting services",
      "quantity": 19,
      "unitPrice": 199.24,
      "lineTotal": 3785.56
    },
    {
      "description": "Content writing",
      "quantity": 4,
      "unitPrice": 193.68,
      "lineTotal": 774.72
    },
    {
      "description": "Documentation",
      "quantity": 12,
      "unitPrice": 436.92,
      "lineTotal": 5243.04
    }
  ],
  "createdAt": "2025-01-01T00:28:35.502Z"
}
Draftbit