example-data.com

invoices / #126

fromUserId
196
toUserId
77
invoiceNumber
INV-2024-0126
status
sent
issuedAt
dueAt
paidAt
subtotal
48836.56
tax
3906.92
total
52743.48
currency
GBP
lineItems
[
  {
    "description": "Legal review",
    "quantity": 15,
    "unitPrice": 362.6,
    "lineTotal": 5439
  },
  {
    "description": "License fee",
    "quantity": 40,
    "unitPrice": 494.14,
    "lineTotal": 19765.6
  },
  {
    "description": "System integration",
    "quantity": 37,
    "unitPrice": 465.48,
    "lineTotal": 17222.76
  },
  {
    "description": "Research services",
    "quantity": 35,
    "unitPrice": 183.12,
    "lineTotal": 6409.2
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/126"
)
invoice = res.json()
{
  "id": 126,
  "fromUserId": 196,
  "toUserId": 77,
  "invoiceNumber": "INV-2024-0126",
  "status": "sent",
  "issuedAt": "2024-10-21T10:26:13.884Z",
  "dueAt": "2024-11-01T10:26:13.884Z",
  "paidAt": null,
  "subtotal": 48836.56,
  "tax": 3906.92,
  "total": 52743.48,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Legal review",
      "quantity": 15,
      "unitPrice": 362.6,
      "lineTotal": 5439
    },
    {
      "description": "License fee",
      "quantity": 40,
      "unitPrice": 494.14,
      "lineTotal": 19765.6
    },
    {
      "description": "System integration",
      "quantity": 37,
      "unitPrice": 465.48,
      "lineTotal": 17222.76
    },
    {
      "description": "Research services",
      "quantity": 35,
      "unitPrice": 183.12,
      "lineTotal": 6409.2
    }
  ],
  "createdAt": "2024-10-21T03:34:16.631Z"
}
Draftbit