example-data.com
Menu
Browse docs and collections

Overview

invoices / #188

invoices #188

fromUserId
Lamont Schroeder @lamont.schroeder89
toUserId
Hermina West @hermina.west3
invoiceNumber
INV-2025-0188
status
draft
issuedAt
dueAt
paidAt
subtotal
7063.94
tax
1412.79
total
8476.73
currency
USD
lineItems
              [
  {
    "description": "Accounting services",
    "quantity": 15,
    "unitPrice": 155.81,
    "lineTotal": 2337.15
  },
  {
    "description": "Content writing",
    "quantity": 4,
    "unitPrice": 412.91,
    "lineTotal": 1651.64
  },
  {
    "description": "Hardware supply",
    "quantity": 19,
    "unitPrice": 161.85,
    "lineTotal": 3075.15
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 188,
  "fromUserId": 180,
  "toUserId": 51,
  "invoiceNumber": "INV-2025-0188",
  "status": "draft",
  "issuedAt": "2025-03-18T16:02:00.257Z",
  "dueAt": "2025-04-06T16:02:00.257Z",
  "paidAt": null,
  "subtotal": 7063.94,
  "tax": 1412.79,
  "total": 8476.73,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Accounting services",
      "quantity": 15,
      "unitPrice": 155.81,
      "lineTotal": 2337.15
    },
    {
      "description": "Content writing",
      "quantity": 4,
      "unitPrice": 412.91,
      "lineTotal": 1651.64
    },
    {
      "description": "Hardware supply",
      "quantity": 19,
      "unitPrice": 161.85,
      "lineTotal": 3075.15
    }
  ],
  "createdAt": "2025-03-18T04:25:14.451Z"
}