example-data.com
Menu
Browse docs and collections

Overview

invoices / #171

invoices #171

fromUserId
Frederic Armstrong @frederic_armstrong96
toUserId
April Kihn @april.kihn55
invoiceNumber
INV-2025-0171
status
sent
issuedAt
dueAt
paidAt
subtotal
26575.88
tax
1328.79
total
27904.67
currency
GBP
lineItems
              [
  {
    "description": "Photography services",
    "quantity": 38,
    "unitPrice": 483.19,
    "lineTotal": 18361.22
  },
  {
    "description": "Software development",
    "quantity": 18,
    "unitPrice": 456.37,
    "lineTotal": 8214.66
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 171,
  "fromUserId": 199,
  "toUserId": 137,
  "invoiceNumber": "INV-2025-0171",
  "status": "sent",
  "issuedAt": "2025-04-23T03:29:55.263Z",
  "dueAt": "2025-05-02T03:29:55.263Z",
  "paidAt": null,
  "subtotal": 26575.88,
  "tax": 1328.79,
  "total": 27904.67,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Photography services",
      "quantity": 38,
      "unitPrice": 483.19,
      "lineTotal": 18361.22
    },
    {
      "description": "Software development",
      "quantity": 18,
      "unitPrice": 456.37,
      "lineTotal": 8214.66
    }
  ],
  "createdAt": "2025-04-22T06:45:24.435Z"
}