example-data.com

invoices / #202

fromUserId
90
toUserId
234
invoiceNumber
INV-2024-0202
status
paid
issuedAt
dueAt
paidAt
subtotal
2105.04
tax
315.76
total
2420.8
currency
AUD
lineItems
[
  {
    "description": "Data analysis",
    "quantity": 11,
    "unitPrice": 50.28,
    "lineTotal": 553.08
  },
  {
    "description": "Design work",
    "quantity": 13,
    "unitPrice": 29.42,
    "lineTotal": 382.46
  },
  {
    "description": "Legal review",
    "quantity": 5,
    "unitPrice": 233.9,
    "lineTotal": 1169.5
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/202"
)
invoice = res.json()
{
  "id": 202,
  "fromUserId": 90,
  "toUserId": 234,
  "invoiceNumber": "INV-2024-0202",
  "status": "paid",
  "issuedAt": "2024-08-12T22:16:00.684Z",
  "dueAt": "2024-10-06T22:16:00.684Z",
  "paidAt": "2024-09-12T20:32:20.401Z",
  "subtotal": 2105.04,
  "tax": 315.76,
  "total": 2420.8,
  "currency": "AUD",
  "lineItems": [
    {
      "description": "Data analysis",
      "quantity": 11,
      "unitPrice": 50.28,
      "lineTotal": 553.08
    },
    {
      "description": "Design work",
      "quantity": 13,
      "unitPrice": 29.42,
      "lineTotal": 382.46
    },
    {
      "description": "Legal review",
      "quantity": 5,
      "unitPrice": 233.9,
      "lineTotal": 1169.5
    }
  ],
  "createdAt": "2024-08-11T23:56:57.560Z"
}
Draftbit