example-data.com
Menu
Browse docs and collections

Overview

invoices / #37

invoices #37

fromUserId
Mike Zemlak @mike.zemlak96
toUserId
Clyde Bernier-Gleason @clyde_bernier-gleason6
invoiceNumber
INV-2025-0037
status
sent
issuedAt
dueAt
paidAt
subtotal
18159.36
tax
0
total
18159.36
currency
USD
lineItems
              [
  {
    "description": "Software development",
    "quantity": 20,
    "unitPrice": 441.28,
    "lineTotal": 8825.6
  },
  {
    "description": "System integration",
    "quantity": 13,
    "unitPrice": 269.92,
    "lineTotal": 3508.96
  },
  {
    "description": "Design work",
    "quantity": 18,
    "unitPrice": 323.6,
    "lineTotal": 5824.8
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 37,
  "fromUserId": 136,
  "toUserId": 143,
  "invoiceNumber": "INV-2025-0037",
  "status": "sent",
  "issuedAt": "2025-04-11T20:50:03.912Z",
  "dueAt": "2025-05-14T20:50:03.912Z",
  "paidAt": null,
  "subtotal": 18159.36,
  "tax": 0,
  "total": 18159.36,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Software development",
      "quantity": 20,
      "unitPrice": 441.28,
      "lineTotal": 8825.6
    },
    {
      "description": "System integration",
      "quantity": 13,
      "unitPrice": 269.92,
      "lineTotal": 3508.96
    },
    {
      "description": "Design work",
      "quantity": 18,
      "unitPrice": 323.6,
      "lineTotal": 5824.8
    }
  ],
  "createdAt": "2025-04-11T15:21:08.409Z"
}