example-data.com
Menu
Browse docs and collections

Overview

invoices / #186

invoices #186

fromUserId
Ken Towne @ken.towne
toUserId
Green Kozey @green_kozey22
invoiceNumber
INV-2025-0186
status
paid
issuedAt
dueAt
paidAt
subtotal
36756.56
tax
7351.31
total
44107.87
currency
AUD
lineItems
              [
  {
    "description": "Project management",
    "quantity": 15,
    "unitPrice": 50.35,
    "lineTotal": 755.25
  },
  {
    "description": "Software development",
    "quantity": 33,
    "unitPrice": 451.8,
    "lineTotal": 14909.4
  },
  {
    "description": "Legal review",
    "quantity": 29,
    "unitPrice": 328.43,
    "lineTotal": 9524.47
  },
  {
    "description": "System integration",
    "quantity": 16,
    "unitPrice": 369.82,
    "lineTotal": 5917.12
  },
  {
    "description": "Legal review",
    "quantity": 13,
    "unitPrice": 434.64,
    "lineTotal": 5650.32
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 186,
  "fromUserId": 248,
  "toUserId": 49,
  "invoiceNumber": "INV-2025-0186",
  "status": "paid",
  "issuedAt": "2025-04-22T10:34:10.083Z",
  "dueAt": "2025-06-16T10:34:10.083Z",
  "paidAt": "2025-06-11T05:31:43.259Z",
  "subtotal": 36756.56,
  "tax": 7351.31,
  "total": 44107.87,
  "currency": "AUD",
  "lineItems": [
    {
      "description": "Project management",
      "quantity": 15,
      "unitPrice": 50.35,
      "lineTotal": 755.25
    },
    {
      "description": "Software development",
      "quantity": 33,
      "unitPrice": 451.8,
      "lineTotal": 14909.4
    },
    {
      "description": "Legal review",
      "quantity": 29,
      "unitPrice": 328.43,
      "lineTotal": 9524.47
    },
    {
      "description": "System integration",
      "quantity": 16,
      "unitPrice": 369.82,
      "lineTotal": 5917.12
    },
    {
      "description": "Legal review",
      "quantity": 13,
      "unitPrice": 434.64,
      "lineTotal": 5650.32
    }
  ],
  "createdAt": "2025-04-21T21:57:28.083Z"
}