example-data.com

invoices / #236

fromUserId
5
toUserId
127
invoiceNumber
INV-2024-0236
status
paid
issuedAt
dueAt
paidAt
subtotal
28047.03
tax
1402.35
total
29449.38
currency
GBP
lineItems
[
  {
    "description": "Project management",
    "quantity": 40,
    "unitPrice": 109.16,
    "lineTotal": 4366.4
  },
  {
    "description": "Documentation",
    "quantity": 21,
    "unitPrice": 312.64,
    "lineTotal": 6565.44
  },
  {
    "description": "Legal review",
    "quantity": 14,
    "unitPrice": 110.67,
    "lineTotal": 1549.38
  },
  {
    "description": "Technical support",
    "quantity": 23,
    "unitPrice": 452.01,
    "lineTotal": 10396.23
  },
  {
    "description": "Quality assurance",
    "quantity": 26,
    "unitPrice": 198.83,
    "lineTotal": 5169.58
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/236"
)
invoice = res.json()
{
  "id": 236,
  "fromUserId": 5,
  "toUserId": 127,
  "invoiceNumber": "INV-2024-0236",
  "status": "paid",
  "issuedAt": "2024-07-22T09:49:48.505Z",
  "dueAt": "2024-08-24T09:49:48.505Z",
  "paidAt": "2024-08-24T02:03:29.539Z",
  "subtotal": 28047.03,
  "tax": 1402.35,
  "total": 29449.38,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Project management",
      "quantity": 40,
      "unitPrice": 109.16,
      "lineTotal": 4366.4
    },
    {
      "description": "Documentation",
      "quantity": 21,
      "unitPrice": 312.64,
      "lineTotal": 6565.44
    },
    {
      "description": "Legal review",
      "quantity": 14,
      "unitPrice": 110.67,
      "lineTotal": 1549.38
    },
    {
      "description": "Technical support",
      "quantity": 23,
      "unitPrice": 452.01,
      "lineTotal": 10396.23
    },
    {
      "description": "Quality assurance",
      "quantity": 26,
      "unitPrice": 198.83,
      "lineTotal": 5169.58
    }
  ],
  "createdAt": "2024-07-22T03:19:34.856Z"
}
Draftbit