example-data.com
Menu
Browse docs and collections

Overview

invoices / #148

invoices #148

fromUserId
Koby Pouros @koby_pouros60
toUserId
Conrad Connelly @conrad.connelly22
invoiceNumber
INV-2025-0148
status
overdue
issuedAt
dueAt
paidAt
subtotal
6130.45
tax
306.52
total
6436.97
currency
AUD
lineItems
              [
  {
    "description": "System integration",
    "quantity": 3,
    "unitPrice": 387.56,
    "lineTotal": 1162.68
  },
  {
    "description": "Marketing services",
    "quantity": 5,
    "unitPrice": 14.69,
    "lineTotal": 73.45
  },
  {
    "description": "System integration",
    "quantity": 4,
    "unitPrice": 45.98,
    "lineTotal": 183.92
  },
  {
    "description": "Maintenance contract",
    "quantity": 20,
    "unitPrice": 235.52,
    "lineTotal": 4710.4
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 148,
  "fromUserId": 34,
  "toUserId": 30,
  "invoiceNumber": "INV-2025-0148",
  "status": "overdue",
  "issuedAt": "2025-04-05T06:46:38.613Z",
  "dueAt": "2025-04-16T06:46:38.613Z",
  "paidAt": null,
  "subtotal": 6130.45,
  "tax": 306.52,
  "total": 6436.97,
  "currency": "AUD",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 3,
      "unitPrice": 387.56,
      "lineTotal": 1162.68
    },
    {
      "description": "Marketing services",
      "quantity": 5,
      "unitPrice": 14.69,
      "lineTotal": 73.45
    },
    {
      "description": "System integration",
      "quantity": 4,
      "unitPrice": 45.98,
      "lineTotal": 183.92
    },
    {
      "description": "Maintenance contract",
      "quantity": 20,
      "unitPrice": 235.52,
      "lineTotal": 4710.4
    }
  ],
  "createdAt": "2025-04-04T21:03:05.436Z"
}