example-data.com
Menu
Browse docs and collections

Overview

invoices / #115

invoices #115

fromUserId
Sonia Nolan @sonia_nolan
toUserId
Velma Jerde @velma.jerde56
invoiceNumber
INV-2025-0115
status
paid
issuedAt
dueAt
paidAt
subtotal
12557.6
tax
627.88
total
13185.48
currency
CAD
lineItems
              [
  {
    "description": "Hardware supply",
    "quantity": 5,
    "unitPrice": 481.86,
    "lineTotal": 2409.3
  },
  {
    "description": "System integration",
    "quantity": 5,
    "unitPrice": 366.41,
    "lineTotal": 1832.05
  },
  {
    "description": "License fee",
    "quantity": 35,
    "unitPrice": 215.69,
    "lineTotal": 7549.15
  },
  {
    "description": "Content writing",
    "quantity": 6,
    "unitPrice": 127.85,
    "lineTotal": 767.1
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 115,
  "fromUserId": 208,
  "toUserId": 93,
  "invoiceNumber": "INV-2025-0115",
  "status": "paid",
  "issuedAt": "2025-02-15T00:23:02.945Z",
  "dueAt": "2025-02-24T00:23:02.945Z",
  "paidAt": "2025-02-22T00:32:57.268Z",
  "subtotal": 12557.6,
  "tax": 627.88,
  "total": 13185.48,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Hardware supply",
      "quantity": 5,
      "unitPrice": 481.86,
      "lineTotal": 2409.3
    },
    {
      "description": "System integration",
      "quantity": 5,
      "unitPrice": 366.41,
      "lineTotal": 1832.05
    },
    {
      "description": "License fee",
      "quantity": 35,
      "unitPrice": 215.69,
      "lineTotal": 7549.15
    },
    {
      "description": "Content writing",
      "quantity": 6,
      "unitPrice": 127.85,
      "lineTotal": 767.1
    }
  ],
  "createdAt": "2025-02-14T10:09:04.420Z"
}