example-data.com
Menu
Browse docs and collections

Overview

invoices / #241

invoices #241

fromUserId
Koby Pouros @koby_pouros60
toUserId
Amely Daniel @amely_daniel
invoiceNumber
INV-2025-0241
status
sent
issuedAt
dueAt
paidAt
subtotal
20508.88
tax
3076.33
total
23585.21
currency
GBP
lineItems
              [
  {
    "description": "Project management",
    "quantity": 29,
    "unitPrice": 133.19,
    "lineTotal": 3862.51
  },
  {
    "description": "Implementation services",
    "quantity": 17,
    "unitPrice": 265.5,
    "lineTotal": 4513.5
  },
  {
    "description": "Maintenance contract",
    "quantity": 29,
    "unitPrice": 383.67,
    "lineTotal": 11126.43
  },
  {
    "description": "Accounting services",
    "quantity": 3,
    "unitPrice": 335.48,
    "lineTotal": 1006.44
  }
]
            
createdAt

Component variants

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/invoices/241" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/invoices/241"
);
const invoice = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/invoices.d.ts https://example-data.com/types/invoices.d.ts
import type { Invoice } from "./types/invoices";

const res = await fetch(
  "https://example-data.com/api/v1/invoices/241"
);
const invoice = (await res.json()) as Invoice;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/invoices/241"
)
invoice = res.json()

Response

{
  "id": 241,
  "fromUserId": 34,
  "toUserId": 41,
  "invoiceNumber": "INV-2025-0241",
  "status": "sent",
  "issuedAt": "2025-09-03T11:27:16.510Z",
  "dueAt": "2025-10-21T11:27:16.510Z",
  "paidAt": null,
  "subtotal": 20508.88,
  "tax": 3076.33,
  "total": 23585.21,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Project management",
      "quantity": 29,
      "unitPrice": 133.19,
      "lineTotal": 3862.51
    },
    {
      "description": "Implementation services",
      "quantity": 17,
      "unitPrice": 265.5,
      "lineTotal": 4513.5
    },
    {
      "description": "Maintenance contract",
      "quantity": 29,
      "unitPrice": 383.67,
      "lineTotal": 11126.43
    },
    {
      "description": "Accounting services",
      "quantity": 3,
      "unitPrice": 335.48,
      "lineTotal": 1006.44
    }
  ],
  "createdAt": "2025-09-03T06:11:47.043Z"
}