example-data.com

invoices / #128

fromUserId
215
toUserId
80
invoiceNumber
INV-2024-0128
status
viewed
issuedAt
dueAt
paidAt
subtotal
16631.97
tax
1330.56
total
17962.53
currency
GBP
lineItems
[
  {
    "description": "Accounting services",
    "quantity": 18,
    "unitPrice": 262.07,
    "lineTotal": 4717.26
  },
  {
    "description": "License fee",
    "quantity": 36,
    "unitPrice": 42.97,
    "lineTotal": 1546.92
  },
  {
    "description": "Accounting services",
    "quantity": 29,
    "unitPrice": 357.51,
    "lineTotal": 10367.79
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/128"
)
invoice = res.json()
{
  "id": 128,
  "fromUserId": 215,
  "toUserId": 80,
  "invoiceNumber": "INV-2024-0128",
  "status": "viewed",
  "issuedAt": "2024-06-25T14:08:09.733Z",
  "dueAt": "2024-08-19T14:08:09.733Z",
  "paidAt": null,
  "subtotal": 16631.97,
  "tax": 1330.56,
  "total": 17962.53,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Accounting services",
      "quantity": 18,
      "unitPrice": 262.07,
      "lineTotal": 4717.26
    },
    {
      "description": "License fee",
      "quantity": 36,
      "unitPrice": 42.97,
      "lineTotal": 1546.92
    },
    {
      "description": "Accounting services",
      "quantity": 29,
      "unitPrice": 357.51,
      "lineTotal": 10367.79
    }
  ],
  "createdAt": "2024-06-24T23:56:03.543Z"
}
Draftbit