example-data.com

invoices / #120

fromUserId
201
toUserId
172
invoiceNumber
INV-2024-0120
status
paid
issuedAt
dueAt
paidAt
subtotal
39492.05
tax
3949.21
total
43441.26
currency
USD
lineItems
[
  {
    "description": "Research services",
    "quantity": 15,
    "unitPrice": 421.91,
    "lineTotal": 6328.65
  },
  {
    "description": "Documentation",
    "quantity": 35,
    "unitPrice": 120.08,
    "lineTotal": 4202.8
  },
  {
    "description": "Technical support",
    "quantity": 40,
    "unitPrice": 475.77,
    "lineTotal": 19030.8
  },
  {
    "description": "Implementation services",
    "quantity": 20,
    "unitPrice": 496.49,
    "lineTotal": 9929.8
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/120"
)
invoice = res.json()
{
  "id": 120,
  "fromUserId": 201,
  "toUserId": 172,
  "invoiceNumber": "INV-2024-0120",
  "status": "paid",
  "issuedAt": "2024-07-08T22:28:51.552Z",
  "dueAt": "2024-07-19T22:28:51.552Z",
  "paidAt": "2024-07-10T09:56:40.828Z",
  "subtotal": 39492.05,
  "tax": 3949.21,
  "total": 43441.26,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Research services",
      "quantity": 15,
      "unitPrice": 421.91,
      "lineTotal": 6328.65
    },
    {
      "description": "Documentation",
      "quantity": 35,
      "unitPrice": 120.08,
      "lineTotal": 4202.8
    },
    {
      "description": "Technical support",
      "quantity": 40,
      "unitPrice": 475.77,
      "lineTotal": 19030.8
    },
    {
      "description": "Implementation services",
      "quantity": 20,
      "unitPrice": 496.49,
      "lineTotal": 9929.8
    }
  ],
  "createdAt": "2024-07-08T00:52:32.586Z"
}
Draftbit