example-data.com

invoices / #116

fromUserId
185
toUserId
18
invoiceNumber
INV-2024-0116
status
paid
issuedAt
dueAt
paidAt
subtotal
13293.2
tax
2658.64
total
15951.84
currency
GBP
lineItems
[
  {
    "description": "Documentation",
    "quantity": 20,
    "unitPrice": 334.26,
    "lineTotal": 6685.2
  },
  {
    "description": "Marketing services",
    "quantity": 34,
    "unitPrice": 188.18,
    "lineTotal": 6398.12
  },
  {
    "description": "License fee",
    "quantity": 2,
    "unitPrice": 104.94,
    "lineTotal": 209.88
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/116"
)
invoice = res.json()
{
  "id": 116,
  "fromUserId": 185,
  "toUserId": 18,
  "invoiceNumber": "INV-2024-0116",
  "status": "paid",
  "issuedAt": "2024-06-25T04:19:43.711Z",
  "dueAt": "2024-08-20T04:19:43.711Z",
  "paidAt": "2024-07-23T10:42:27.059Z",
  "subtotal": 13293.2,
  "tax": 2658.64,
  "total": 15951.84,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Documentation",
      "quantity": 20,
      "unitPrice": 334.26,
      "lineTotal": 6685.2
    },
    {
      "description": "Marketing services",
      "quantity": 34,
      "unitPrice": 188.18,
      "lineTotal": 6398.12
    },
    {
      "description": "License fee",
      "quantity": 2,
      "unitPrice": 104.94,
      "lineTotal": 209.88
    }
  ],
  "createdAt": "2024-06-24T10:23:02.508Z"
}
Draftbit