example-data.com

invoices / #79

fromUserId
99
toUserId
236
invoiceNumber
INV-2024-0079
status
paid
issuedAt
dueAt
paidAt
subtotal
22666.96
tax
0
total
22666.96
currency
CAD
lineItems
[
  {
    "description": "System integration",
    "quantity": 39,
    "unitPrice": 220.86,
    "lineTotal": 8613.54
  },
  {
    "description": "Implementation services",
    "quantity": 27,
    "unitPrice": 231.5,
    "lineTotal": 6250.5
  },
  {
    "description": "Data analysis",
    "quantity": 19,
    "unitPrice": 410.68,
    "lineTotal": 7802.92
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/79"
)
invoice = res.json()
{
  "id": 79,
  "fromUserId": 99,
  "toUserId": 236,
  "invoiceNumber": "INV-2024-0079",
  "status": "paid",
  "issuedAt": "2024-08-26T08:17:15.762Z",
  "dueAt": "2024-10-22T08:17:15.762Z",
  "paidAt": "2024-09-30T06:24:49.287Z",
  "subtotal": 22666.96,
  "tax": 0,
  "total": 22666.96,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 39,
      "unitPrice": 220.86,
      "lineTotal": 8613.54
    },
    {
      "description": "Implementation services",
      "quantity": 27,
      "unitPrice": 231.5,
      "lineTotal": 6250.5
    },
    {
      "description": "Data analysis",
      "quantity": 19,
      "unitPrice": 410.68,
      "lineTotal": 7802.92
    }
  ],
  "createdAt": "2024-08-25T09:08:22.601Z"
}
Draftbit