example-data.com
Menu
Browse docs and collections

Overview

invoices / #289

invoices #289

fromUserId
Jaylon Conroy @jaylon_conroy22
toUserId
Amely Daniel @amely_daniel
invoiceNumber
INV-2025-0289
status
paid
issuedAt
dueAt
paidAt
subtotal
21280.48
tax
2128.05
total
23408.53
currency
CAD
lineItems
              [
  {
    "description": "Content writing",
    "quantity": 27,
    "unitPrice": 455.17,
    "lineTotal": 12289.59
  },
  {
    "description": "Implementation services",
    "quantity": 20,
    "unitPrice": 168.62,
    "lineTotal": 3372.4
  },
  {
    "description": "Design work",
    "quantity": 9,
    "unitPrice": 410.65,
    "lineTotal": 3695.85
  },
  {
    "description": "Design work",
    "quantity": 8,
    "unitPrice": 240.33,
    "lineTotal": 1922.64
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 289,
  "fromUserId": 205,
  "toUserId": 41,
  "invoiceNumber": "INV-2025-0289",
  "status": "paid",
  "issuedAt": "2025-09-03T06:54:54.657Z",
  "dueAt": "2025-09-16T06:54:54.657Z",
  "paidAt": "2025-09-08T16:49:34.408Z",
  "subtotal": 21280.48,
  "tax": 2128.05,
  "total": 23408.53,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Content writing",
      "quantity": 27,
      "unitPrice": 455.17,
      "lineTotal": 12289.59
    },
    {
      "description": "Implementation services",
      "quantity": 20,
      "unitPrice": 168.62,
      "lineTotal": 3372.4
    },
    {
      "description": "Design work",
      "quantity": 9,
      "unitPrice": 410.65,
      "lineTotal": 3695.85
    },
    {
      "description": "Design work",
      "quantity": 8,
      "unitPrice": 240.33,
      "lineTotal": 1922.64
    }
  ],
  "createdAt": "2025-09-02T08:25:57.070Z"
}