example-data.com

invoices / #75

fromUserId
210
toUserId
199
invoiceNumber
INV-2024-0075
status
paid
issuedAt
dueAt
paidAt
subtotal
18908.79
tax
0
total
18908.79
currency
GBP
lineItems
[
  {
    "description": "Project management",
    "quantity": 10,
    "unitPrice": 496.88,
    "lineTotal": 4968.8
  },
  {
    "description": "Marketing services",
    "quantity": 25,
    "unitPrice": 360.59,
    "lineTotal": 9014.75
  },
  {
    "description": "License fee",
    "quantity": 34,
    "unitPrice": 144.86,
    "lineTotal": 4925.24
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/75"
)
invoice = res.json()
{
  "id": 75,
  "fromUserId": 210,
  "toUserId": 199,
  "invoiceNumber": "INV-2024-0075",
  "status": "paid",
  "issuedAt": "2024-12-01T12:53:44.050Z",
  "dueAt": "2025-01-11T12:53:44.050Z",
  "paidAt": "2025-01-02T11:07:32.199Z",
  "subtotal": 18908.79,
  "tax": 0,
  "total": 18908.79,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Project management",
      "quantity": 10,
      "unitPrice": 496.88,
      "lineTotal": 4968.8
    },
    {
      "description": "Marketing services",
      "quantity": 25,
      "unitPrice": 360.59,
      "lineTotal": 9014.75
    },
    {
      "description": "License fee",
      "quantity": 34,
      "unitPrice": 144.86,
      "lineTotal": 4925.24
    }
  ],
  "createdAt": "2024-11-30T21:06:34.369Z"
}
Draftbit