example-data.com
Menu
Browse docs and collections

Overview

invoices / #259

invoices #259

fromUserId
Minerva Hettinger @minerva_hettinger
toUserId
Virginie O'Connell @virginie.oconnell55
invoiceNumber
INV-2025-0259
status
overdue
issuedAt
dueAt
paidAt
subtotal
15449.89
tax
1544.99
total
16994.88
currency
CAD
lineItems
              [
  {
    "description": "Data analysis",
    "quantity": 19,
    "unitPrice": 434.55,
    "lineTotal": 8256.45
  },
  {
    "description": "Quality assurance",
    "quantity": 16,
    "unitPrice": 197.86,
    "lineTotal": 3165.76
  },
  {
    "description": "Legal review",
    "quantity": 12,
    "unitPrice": 335.64,
    "lineTotal": 4027.68
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 259,
  "fromUserId": 183,
  "toUserId": 70,
  "invoiceNumber": "INV-2025-0259",
  "status": "overdue",
  "issuedAt": "2025-03-24T13:33:16.900Z",
  "dueAt": "2025-04-17T13:33:16.900Z",
  "paidAt": null,
  "subtotal": 15449.89,
  "tax": 1544.99,
  "total": 16994.88,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Data analysis",
      "quantity": 19,
      "unitPrice": 434.55,
      "lineTotal": 8256.45
    },
    {
      "description": "Quality assurance",
      "quantity": 16,
      "unitPrice": 197.86,
      "lineTotal": 3165.76
    },
    {
      "description": "Legal review",
      "quantity": 12,
      "unitPrice": 335.64,
      "lineTotal": 4027.68
    }
  ],
  "createdAt": "2025-03-24T06:14:05.511Z"
}