example-data.com

invoices / #16

fromUserId
151
toUserId
40
invoiceNumber
INV-2025-0016
status
viewed
issuedAt
dueAt
paidAt
subtotal
16825.84
tax
0
total
16825.84
currency
USD
lineItems
[
  {
    "description": "Design work",
    "quantity": 30,
    "unitPrice": 53.3,
    "lineTotal": 1599
  },
  {
    "description": "Implementation services",
    "quantity": 21,
    "unitPrice": 482.42,
    "lineTotal": 10130.82
  },
  {
    "description": "Maintenance contract",
    "quantity": 22,
    "unitPrice": 95.54,
    "lineTotal": 2101.88
  },
  {
    "description": "Marketing services",
    "quantity": 35,
    "unitPrice": 14.02,
    "lineTotal": 490.7
  },
  {
    "description": "Software development",
    "quantity": 12,
    "unitPrice": 208.62,
    "lineTotal": 2503.44
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/16"
)
invoice = res.json()
{
  "id": 16,
  "fromUserId": 151,
  "toUserId": 40,
  "invoiceNumber": "INV-2025-0016",
  "status": "viewed",
  "issuedAt": "2025-06-05T04:09:55.287Z",
  "dueAt": "2025-07-17T04:09:55.287Z",
  "paidAt": null,
  "subtotal": 16825.84,
  "tax": 0,
  "total": 16825.84,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Design work",
      "quantity": 30,
      "unitPrice": 53.3,
      "lineTotal": 1599
    },
    {
      "description": "Implementation services",
      "quantity": 21,
      "unitPrice": 482.42,
      "lineTotal": 10130.82
    },
    {
      "description": "Maintenance contract",
      "quantity": 22,
      "unitPrice": 95.54,
      "lineTotal": 2101.88
    },
    {
      "description": "Marketing services",
      "quantity": 35,
      "unitPrice": 14.02,
      "lineTotal": 490.7
    },
    {
      "description": "Software development",
      "quantity": 12,
      "unitPrice": 208.62,
      "lineTotal": 2503.44
    }
  ],
  "createdAt": "2025-06-04T08:53:35.466Z"
}
Draftbit