example-data.com

invoices / #121

fromUserId
120
toUserId
180
invoiceNumber
INV-2025-0121
status
overdue
issuedAt
dueAt
paidAt
subtotal
13110.3
tax
1311.03
total
14421.33
currency
USD
lineItems
[
  {
    "description": "Research services",
    "quantity": 16,
    "unitPrice": 366.37,
    "lineTotal": 5861.92
  },
  {
    "description": "Consulting services",
    "quantity": 5,
    "unitPrice": 226.94,
    "lineTotal": 1134.7
  },
  {
    "description": "Software development",
    "quantity": 12,
    "unitPrice": 209.38,
    "lineTotal": 2512.56
  },
  {
    "description": "Implementation services",
    "quantity": 8,
    "unitPrice": 450.14,
    "lineTotal": 3601.12
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/121"
)
invoice = res.json()
{
  "id": 121,
  "fromUserId": 120,
  "toUserId": 180,
  "invoiceNumber": "INV-2025-0121",
  "status": "overdue",
  "issuedAt": "2025-03-14T20:28:46.495Z",
  "dueAt": "2025-04-06T20:28:46.495Z",
  "paidAt": null,
  "subtotal": 13110.3,
  "tax": 1311.03,
  "total": 14421.33,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Research services",
      "quantity": 16,
      "unitPrice": 366.37,
      "lineTotal": 5861.92
    },
    {
      "description": "Consulting services",
      "quantity": 5,
      "unitPrice": 226.94,
      "lineTotal": 1134.7
    },
    {
      "description": "Software development",
      "quantity": 12,
      "unitPrice": 209.38,
      "lineTotal": 2512.56
    },
    {
      "description": "Implementation services",
      "quantity": 8,
      "unitPrice": 450.14,
      "lineTotal": 3601.12
    }
  ],
  "createdAt": "2025-03-14T11:37:54.327Z"
}
Draftbit