example-data.com
Menu
Browse docs and collections

Overview

invoices / #98

invoices #98

fromUserId
Gwendolyn Wyman @gwendolyn.wyman87
toUserId
Mathilde Ziemann-Nienow @mathilde.ziemann-nienow6
invoiceNumber
INV-2025-0098
status
sent
issuedAt
dueAt
paidAt
subtotal
22828.69
tax
0
total
22828.69
currency
GBP
lineItems
              [
  {
    "description": "Data analysis",
    "quantity": 5,
    "unitPrice": 92.31,
    "lineTotal": 461.55
  },
  {
    "description": "Accounting services",
    "quantity": 4,
    "unitPrice": 464,
    "lineTotal": 1856
  },
  {
    "description": "Training session",
    "quantity": 16,
    "unitPrice": 392.78,
    "lineTotal": 6284.48
  },
  {
    "description": "Legal review",
    "quantity": 29,
    "unitPrice": 256.98,
    "lineTotal": 7452.42
  },
  {
    "description": "Design work",
    "quantity": 24,
    "unitPrice": 282.26,
    "lineTotal": 6774.24
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/invoices/98"
);
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/98"
);
const invoice = (await res.json()) as Invoice;

Python example

import requests

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

Response

{
  "id": 98,
  "fromUserId": 40,
  "toUserId": 202,
  "invoiceNumber": "INV-2025-0098",
  "status": "sent",
  "issuedAt": "2025-03-27T20:37:45.187Z",
  "dueAt": "2025-04-17T20:37:45.187Z",
  "paidAt": null,
  "subtotal": 22828.69,
  "tax": 0,
  "total": 22828.69,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Data analysis",
      "quantity": 5,
      "unitPrice": 92.31,
      "lineTotal": 461.55
    },
    {
      "description": "Accounting services",
      "quantity": 4,
      "unitPrice": 464,
      "lineTotal": 1856
    },
    {
      "description": "Training session",
      "quantity": 16,
      "unitPrice": 392.78,
      "lineTotal": 6284.48
    },
    {
      "description": "Legal review",
      "quantity": 29,
      "unitPrice": 256.98,
      "lineTotal": 7452.42
    },
    {
      "description": "Design work",
      "quantity": 24,
      "unitPrice": 282.26,
      "lineTotal": 6774.24
    }
  ],
  "createdAt": "2025-03-27T11:13:51.221Z"
}