example-data.com

invoices / #134

fromUserId
161
toUserId
129
invoiceNumber
INV-2024-0134
status
viewed
issuedAt
dueAt
paidAt
subtotal
41603.28
tax
6240.49
total
47843.77
currency
CAD
lineItems
[
  {
    "description": "Technical support",
    "quantity": 32,
    "unitPrice": 486.89,
    "lineTotal": 15580.48
  },
  {
    "description": "Training session",
    "quantity": 1,
    "unitPrice": 477.06,
    "lineTotal": 477.06
  },
  {
    "description": "Hardware supply",
    "quantity": 23,
    "unitPrice": 198.28,
    "lineTotal": 4560.44
  },
  {
    "description": "Accounting services",
    "quantity": 18,
    "unitPrice": 411.05,
    "lineTotal": 7398.9
  },
  {
    "description": "Hardware supply",
    "quantity": 37,
    "unitPrice": 367.2,
    "lineTotal": 13586.4
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/134"
)
invoice = res.json()
{
  "id": 134,
  "fromUserId": 161,
  "toUserId": 129,
  "invoiceNumber": "INV-2024-0134",
  "status": "viewed",
  "issuedAt": "2024-11-15T15:49:38.445Z",
  "dueAt": "2024-11-30T15:49:38.445Z",
  "paidAt": null,
  "subtotal": 41603.28,
  "tax": 6240.49,
  "total": 47843.77,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Technical support",
      "quantity": 32,
      "unitPrice": 486.89,
      "lineTotal": 15580.48
    },
    {
      "description": "Training session",
      "quantity": 1,
      "unitPrice": 477.06,
      "lineTotal": 477.06
    },
    {
      "description": "Hardware supply",
      "quantity": 23,
      "unitPrice": 198.28,
      "lineTotal": 4560.44
    },
    {
      "description": "Accounting services",
      "quantity": 18,
      "unitPrice": 411.05,
      "lineTotal": 7398.9
    },
    {
      "description": "Hardware supply",
      "quantity": 37,
      "unitPrice": 367.2,
      "lineTotal": 13586.4
    }
  ],
  "createdAt": "2024-11-15T02:17:02.615Z"
}
Draftbit