example-data.com

invoices / #85

fromUserId
42
toUserId
149
invoiceNumber
INV-2025-0085
status
paid
issuedAt
dueAt
paidAt
subtotal
35991.65
tax
3599.17
total
39590.82
currency
AUD
lineItems
[
  {
    "description": "Implementation services",
    "quantity": 17,
    "unitPrice": 41.86,
    "lineTotal": 711.62
  },
  {
    "description": "Implementation services",
    "quantity": 22,
    "unitPrice": 375.03,
    "lineTotal": 8250.66
  },
  {
    "description": "Hardware supply",
    "quantity": 19,
    "unitPrice": 26.97,
    "lineTotal": 512.43
  },
  {
    "description": "Implementation services",
    "quantity": 24,
    "unitPrice": 313.26,
    "lineTotal": 7518.24
  },
  {
    "description": "Hardware supply",
    "quantity": 28,
    "unitPrice": 438.23,
    "lineTotal": 12270.44
  },
  {
    "description": "Accounting services",
    "quantity": 14,
    "unitPrice": 480.59,
    "lineTotal": 6728.26
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/85"
)
invoice = res.json()
{
  "id": 85,
  "fromUserId": 42,
  "toUserId": 149,
  "invoiceNumber": "INV-2025-0085",
  "status": "paid",
  "issuedAt": "2025-02-10T14:41:53.763Z",
  "dueAt": "2025-04-04T14:41:53.763Z",
  "paidAt": "2025-02-25T15:31:45.067Z",
  "subtotal": 35991.65,
  "tax": 3599.17,
  "total": 39590.82,
  "currency": "AUD",
  "lineItems": [
    {
      "description": "Implementation services",
      "quantity": 17,
      "unitPrice": 41.86,
      "lineTotal": 711.62
    },
    {
      "description": "Implementation services",
      "quantity": 22,
      "unitPrice": 375.03,
      "lineTotal": 8250.66
    },
    {
      "description": "Hardware supply",
      "quantity": 19,
      "unitPrice": 26.97,
      "lineTotal": 512.43
    },
    {
      "description": "Implementation services",
      "quantity": 24,
      "unitPrice": 313.26,
      "lineTotal": 7518.24
    },
    {
      "description": "Hardware supply",
      "quantity": 28,
      "unitPrice": 438.23,
      "lineTotal": 12270.44
    },
    {
      "description": "Accounting services",
      "quantity": 14,
      "unitPrice": 480.59,
      "lineTotal": 6728.26
    }
  ],
  "createdAt": "2025-02-09T20:43:06.175Z"
}
Draftbit