example-data.com

invoices / #84

fromUserId
135
toUserId
38
invoiceNumber
INV-2025-0084
status
cancelled
issuedAt
dueAt
paidAt
subtotal
11126.72
tax
556.34
total
11683.06
currency
GBP
lineItems
[
  {
    "description": "Legal review",
    "quantity": 8,
    "unitPrice": 450.22,
    "lineTotal": 3601.76
  },
  {
    "description": "Hardware supply",
    "quantity": 4,
    "unitPrice": 98.43,
    "lineTotal": 393.72
  },
  {
    "description": "Quality assurance",
    "quantity": 28,
    "unitPrice": 37.16,
    "lineTotal": 1040.48
  },
  {
    "description": "Accounting services",
    "quantity": 19,
    "unitPrice": 26.38,
    "lineTotal": 501.22
  },
  {
    "description": "Design work",
    "quantity": 18,
    "unitPrice": 310.53,
    "lineTotal": 5589.54
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/84"
)
invoice = res.json()
{
  "id": 84,
  "fromUserId": 135,
  "toUserId": 38,
  "invoiceNumber": "INV-2025-0084",
  "status": "cancelled",
  "issuedAt": "2025-05-29T01:50:36.136Z",
  "dueAt": "2025-06-14T01:50:36.136Z",
  "paidAt": null,
  "subtotal": 11126.72,
  "tax": 556.34,
  "total": 11683.06,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Legal review",
      "quantity": 8,
      "unitPrice": 450.22,
      "lineTotal": 3601.76
    },
    {
      "description": "Hardware supply",
      "quantity": 4,
      "unitPrice": 98.43,
      "lineTotal": 393.72
    },
    {
      "description": "Quality assurance",
      "quantity": 28,
      "unitPrice": 37.16,
      "lineTotal": 1040.48
    },
    {
      "description": "Accounting services",
      "quantity": 19,
      "unitPrice": 26.38,
      "lineTotal": 501.22
    },
    {
      "description": "Design work",
      "quantity": 18,
      "unitPrice": 310.53,
      "lineTotal": 5589.54
    }
  ],
  "createdAt": "2025-05-28T18:05:18.607Z"
}
Draftbit