example-data.com

invoices / #115

fromUserId
208
toUserId
93
invoiceNumber
INV-2025-0115
status
paid
issuedAt
dueAt
paidAt
subtotal
12557.6
tax
627.88
total
13185.48
currency
CAD
lineItems
[
  {
    "description": "Hardware supply",
    "quantity": 5,
    "unitPrice": 481.86,
    "lineTotal": 2409.3
  },
  {
    "description": "System integration",
    "quantity": 5,
    "unitPrice": 366.41,
    "lineTotal": 1832.05
  },
  {
    "description": "License fee",
    "quantity": 35,
    "unitPrice": 215.69,
    "lineTotal": 7549.15
  },
  {
    "description": "Content writing",
    "quantity": 6,
    "unitPrice": 127.85,
    "lineTotal": 767.1
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/115"
)
invoice = res.json()
{
  "id": 115,
  "fromUserId": 208,
  "toUserId": 93,
  "invoiceNumber": "INV-2025-0115",
  "status": "paid",
  "issuedAt": "2025-02-15T00:23:02.945Z",
  "dueAt": "2025-02-24T00:23:02.945Z",
  "paidAt": "2025-02-22T00:32:57.268Z",
  "subtotal": 12557.6,
  "tax": 627.88,
  "total": 13185.48,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Hardware supply",
      "quantity": 5,
      "unitPrice": 481.86,
      "lineTotal": 2409.3
    },
    {
      "description": "System integration",
      "quantity": 5,
      "unitPrice": 366.41,
      "lineTotal": 1832.05
    },
    {
      "description": "License fee",
      "quantity": 35,
      "unitPrice": 215.69,
      "lineTotal": 7549.15
    },
    {
      "description": "Content writing",
      "quantity": 6,
      "unitPrice": 127.85,
      "lineTotal": 767.1
    }
  ],
  "createdAt": "2025-02-14T10:09:04.420Z"
}
Draftbit