example-data.com
Menu
Browse docs and collections

Overview

invoices / #18

invoices #18

fromUserId
Lew O'Kon @lew.okon75
toUserId
Jarrell Flatley @jarrell_flatley39
invoiceNumber
INV-2025-0018
status
paid
issuedAt
dueAt
paidAt
subtotal
14189.2
tax
0
total
14189.2
currency
CAD
lineItems
              [
  {
    "description": "System integration",
    "quantity": 10,
    "unitPrice": 50,
    "lineTotal": 500
  },
  {
    "description": "Technical support",
    "quantity": 35,
    "unitPrice": 209.22,
    "lineTotal": 7322.7
  },
  {
    "description": "Technical support",
    "quantity": 34,
    "unitPrice": 187.25,
    "lineTotal": 6366.5
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 18,
  "fromUserId": 131,
  "toUserId": 61,
  "invoiceNumber": "INV-2025-0018",
  "status": "paid",
  "issuedAt": "2025-02-10T15:50:45.897Z",
  "dueAt": "2025-04-01T15:50:45.897Z",
  "paidAt": "2025-02-14T09:48:03.423Z",
  "subtotal": 14189.2,
  "tax": 0,
  "total": 14189.2,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 10,
      "unitPrice": 50,
      "lineTotal": 500
    },
    {
      "description": "Technical support",
      "quantity": 35,
      "unitPrice": 209.22,
      "lineTotal": 7322.7
    },
    {
      "description": "Technical support",
      "quantity": 34,
      "unitPrice": 187.25,
      "lineTotal": 6366.5
    }
  ],
  "createdAt": "2025-02-10T10:14:41.642Z"
}