example-data.com

invoices / #175

fromUserId
119
toUserId
19
invoiceNumber
INV-2024-0175
status
paid
issuedAt
dueAt
paidAt
subtotal
30724.98
tax
1536.25
total
32261.23
currency
EUR
lineItems
[
  {
    "description": "Photography services",
    "quantity": 5,
    "unitPrice": 178.11,
    "lineTotal": 890.55
  },
  {
    "description": "Accounting services",
    "quantity": 7,
    "unitPrice": 131.53,
    "lineTotal": 920.71
  },
  {
    "description": "Software development",
    "quantity": 23,
    "unitPrice": 186.3,
    "lineTotal": 4284.9
  },
  {
    "description": "Consulting services",
    "quantity": 23,
    "unitPrice": 201.4,
    "lineTotal": 4632.2
  },
  {
    "description": "Research services",
    "quantity": 39,
    "unitPrice": 452.34,
    "lineTotal": 17641.26
  },
  {
    "description": "Marketing services",
    "quantity": 28,
    "unitPrice": 84.12,
    "lineTotal": 2355.36
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/175"
)
invoice = res.json()
{
  "id": 175,
  "fromUserId": 119,
  "toUserId": 19,
  "invoiceNumber": "INV-2024-0175",
  "status": "paid",
  "issuedAt": "2024-07-21T20:56:26.505Z",
  "dueAt": "2024-09-03T20:56:26.505Z",
  "paidAt": "2024-08-10T20:44:51.065Z",
  "subtotal": 30724.98,
  "tax": 1536.25,
  "total": 32261.23,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Photography services",
      "quantity": 5,
      "unitPrice": 178.11,
      "lineTotal": 890.55
    },
    {
      "description": "Accounting services",
      "quantity": 7,
      "unitPrice": 131.53,
      "lineTotal": 920.71
    },
    {
      "description": "Software development",
      "quantity": 23,
      "unitPrice": 186.3,
      "lineTotal": 4284.9
    },
    {
      "description": "Consulting services",
      "quantity": 23,
      "unitPrice": 201.4,
      "lineTotal": 4632.2
    },
    {
      "description": "Research services",
      "quantity": 39,
      "unitPrice": 452.34,
      "lineTotal": 17641.26
    },
    {
      "description": "Marketing services",
      "quantity": 28,
      "unitPrice": 84.12,
      "lineTotal": 2355.36
    }
  ],
  "createdAt": "2024-07-21T14:03:50.434Z"
}
Draftbit