example-data.com
Menu
Browse docs and collections

Overview

invoices / #178

invoices #178

fromUserId
Rupert Lebsack @rupert.lebsack
toUserId
Theresia Collins @theresia_collins86
invoiceNumber
INV-2025-0178
status
overdue
issuedAt
dueAt
paidAt
subtotal
27958.22
tax
1397.91
total
29356.13
currency
CAD
lineItems
              [
  {
    "description": "System integration",
    "quantity": 22,
    "unitPrice": 447.49,
    "lineTotal": 9844.78
  },
  {
    "description": "Data analysis",
    "quantity": 40,
    "unitPrice": 331.16,
    "lineTotal": 13246.4
  },
  {
    "description": "License fee",
    "quantity": 38,
    "unitPrice": 128.08,
    "lineTotal": 4867.04
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 178,
  "fromUserId": 249,
  "toUserId": 63,
  "invoiceNumber": "INV-2025-0178",
  "status": "overdue",
  "issuedAt": "2025-09-29T00:43:11.858Z",
  "dueAt": "2025-10-16T00:43:11.858Z",
  "paidAt": null,
  "subtotal": 27958.22,
  "tax": 1397.91,
  "total": 29356.13,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 22,
      "unitPrice": 447.49,
      "lineTotal": 9844.78
    },
    {
      "description": "Data analysis",
      "quantity": 40,
      "unitPrice": 331.16,
      "lineTotal": 13246.4
    },
    {
      "description": "License fee",
      "quantity": 38,
      "unitPrice": 128.08,
      "lineTotal": 4867.04
    }
  ],
  "createdAt": "2025-09-28T03:32:29.404Z"
}