example-data.com

invoices / #201

fromUserId
131
toUserId
166
invoiceNumber
INV-2025-0201
status
paid
issuedAt
dueAt
paidAt
subtotal
29620.46
tax
2369.64
total
31990.1
currency
EUR
lineItems
[
  {
    "description": "Training session",
    "quantity": 2,
    "unitPrice": 341.16,
    "lineTotal": 682.32
  },
  {
    "description": "Design work",
    "quantity": 8,
    "unitPrice": 50.28,
    "lineTotal": 402.24
  },
  {
    "description": "Marketing services",
    "quantity": 33,
    "unitPrice": 189.97,
    "lineTotal": 6269.01
  },
  {
    "description": "Implementation services",
    "quantity": 34,
    "unitPrice": 297.61,
    "lineTotal": 10118.74
  },
  {
    "description": "Project management",
    "quantity": 38,
    "unitPrice": 285.44,
    "lineTotal": 10846.72
  },
  {
    "description": "Data analysis",
    "quantity": 3,
    "unitPrice": 433.81,
    "lineTotal": 1301.43
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/201"
)
invoice = res.json()
{
  "id": 201,
  "fromUserId": 131,
  "toUserId": 166,
  "invoiceNumber": "INV-2025-0201",
  "status": "paid",
  "issuedAt": "2025-02-21T11:51:48.170Z",
  "dueAt": "2025-04-04T11:51:48.170Z",
  "paidAt": "2025-03-16T22:40:11.057Z",
  "subtotal": 29620.46,
  "tax": 2369.64,
  "total": 31990.1,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Training session",
      "quantity": 2,
      "unitPrice": 341.16,
      "lineTotal": 682.32
    },
    {
      "description": "Design work",
      "quantity": 8,
      "unitPrice": 50.28,
      "lineTotal": 402.24
    },
    {
      "description": "Marketing services",
      "quantity": 33,
      "unitPrice": 189.97,
      "lineTotal": 6269.01
    },
    {
      "description": "Implementation services",
      "quantity": 34,
      "unitPrice": 297.61,
      "lineTotal": 10118.74
    },
    {
      "description": "Project management",
      "quantity": 38,
      "unitPrice": 285.44,
      "lineTotal": 10846.72
    },
    {
      "description": "Data analysis",
      "quantity": 3,
      "unitPrice": 433.81,
      "lineTotal": 1301.43
    }
  ],
  "createdAt": "2025-02-21T08:39:20.200Z"
}
Draftbit