example-data.com

invoices / #30

fromUserId
232
toUserId
76
invoiceNumber
INV-2024-0030
status
paid
issuedAt
dueAt
paidAt
subtotal
3327.88
tax
0
total
3327.88
currency
USD
lineItems
[
  {
    "description": "Photography services",
    "quantity": 20,
    "unitPrice": 79.5,
    "lineTotal": 1590
  },
  {
    "description": "License fee",
    "quantity": 1,
    "unitPrice": 148.2,
    "lineTotal": 148.2
  },
  {
    "description": "System integration",
    "quantity": 8,
    "unitPrice": 198.71,
    "lineTotal": 1589.68
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/30"
)
invoice = res.json()
{
  "id": 30,
  "fromUserId": 232,
  "toUserId": 76,
  "invoiceNumber": "INV-2024-0030",
  "status": "paid",
  "issuedAt": "2024-08-27T20:19:04.073Z",
  "dueAt": "2024-09-04T20:19:04.073Z",
  "paidAt": "2024-08-28T09:29:46.041Z",
  "subtotal": 3327.88,
  "tax": 0,
  "total": 3327.88,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Photography services",
      "quantity": 20,
      "unitPrice": 79.5,
      "lineTotal": 1590
    },
    {
      "description": "License fee",
      "quantity": 1,
      "unitPrice": 148.2,
      "lineTotal": 148.2
    },
    {
      "description": "System integration",
      "quantity": 8,
      "unitPrice": 198.71,
      "lineTotal": 1589.68
    }
  ],
  "createdAt": "2024-08-27T00:18:43.382Z"
}
Draftbit