example-data.com

invoices / #211

fromUserId
211
toUserId
29
invoiceNumber
INV-2024-0211
status
paid
issuedAt
dueAt
paidAt
subtotal
13952.01
tax
2790.4
total
16742.41
currency
GBP
lineItems
[
  {
    "description": "Data analysis",
    "quantity": 9,
    "unitPrice": 421.7,
    "lineTotal": 3795.3
  },
  {
    "description": "Software development",
    "quantity": 39,
    "unitPrice": 151.77,
    "lineTotal": 5919.03
  },
  {
    "description": "Data analysis",
    "quantity": 12,
    "unitPrice": 353.14,
    "lineTotal": 4237.68
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/211"
)
invoice = res.json()
{
  "id": 211,
  "fromUserId": 211,
  "toUserId": 29,
  "invoiceNumber": "INV-2024-0211",
  "status": "paid",
  "issuedAt": "2024-10-24T17:39:13.634Z",
  "dueAt": "2024-12-01T17:39:13.634Z",
  "paidAt": "2024-11-03T19:41:44.386Z",
  "subtotal": 13952.01,
  "tax": 2790.4,
  "total": 16742.41,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Data analysis",
      "quantity": 9,
      "unitPrice": 421.7,
      "lineTotal": 3795.3
    },
    {
      "description": "Software development",
      "quantity": 39,
      "unitPrice": 151.77,
      "lineTotal": 5919.03
    },
    {
      "description": "Data analysis",
      "quantity": 12,
      "unitPrice": 353.14,
      "lineTotal": 4237.68
    }
  ],
  "createdAt": "2024-10-24T10:54:28.260Z"
}
Draftbit