example-data.com
Menu
Browse docs and collections

Overview

invoices / #251

invoices #251

fromUserId
Elvis Littel-Vandervort @elvis.littel-vandervort28
toUserId
Roma Durgan @roma.durgan
invoiceNumber
INV-2025-0251
status
viewed
issuedAt
dueAt
paidAt
subtotal
17706.46
tax
2655.97
total
20362.43
currency
AUD
lineItems
              [
  {
    "description": "Marketing services",
    "quantity": 22,
    "unitPrice": 439.74,
    "lineTotal": 9674.28
  },
  {
    "description": "Consulting services",
    "quantity": 26,
    "unitPrice": 308.93,
    "lineTotal": 8032.18
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 251,
  "fromUserId": 175,
  "toUserId": 215,
  "invoiceNumber": "INV-2025-0251",
  "status": "viewed",
  "issuedAt": "2025-07-14T20:12:01.190Z",
  "dueAt": "2025-09-09T20:12:01.190Z",
  "paidAt": null,
  "subtotal": 17706.46,
  "tax": 2655.97,
  "total": 20362.43,
  "currency": "AUD",
  "lineItems": [
    {
      "description": "Marketing services",
      "quantity": 22,
      "unitPrice": 439.74,
      "lineTotal": 9674.28
    },
    {
      "description": "Consulting services",
      "quantity": 26,
      "unitPrice": 308.93,
      "lineTotal": 8032.18
    }
  ],
  "createdAt": "2025-07-14T06:00:38.243Z"
}