example-data.com
Menu
Browse docs and collections

Overview

invoices / #60

invoices #60

fromUserId
Kennith Hahn @kennith.hahn
toUserId
Guy Christiansen @guy.christiansen40
invoiceNumber
INV-2025-0060
status
sent
issuedAt
dueAt
paidAt
subtotal
37161.32
tax
7432.26
total
44593.58
currency
GBP
lineItems
              [
  {
    "description": "Consulting services",
    "quantity": 18,
    "unitPrice": 406.42,
    "lineTotal": 7315.56
  },
  {
    "description": "Quality assurance",
    "quantity": 17,
    "unitPrice": 270.9,
    "lineTotal": 4605.3
  },
  {
    "description": "Quality assurance",
    "quantity": 19,
    "unitPrice": 410.47,
    "lineTotal": 7798.93
  },
  {
    "description": "Marketing services",
    "quantity": 19,
    "unitPrice": 225.07,
    "lineTotal": 4276.33
  },
  {
    "description": "Content writing",
    "quantity": 30,
    "unitPrice": 438.84,
    "lineTotal": 13165.2
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 60,
  "fromUserId": 201,
  "toUserId": 21,
  "invoiceNumber": "INV-2025-0060",
  "status": "sent",
  "issuedAt": "2025-12-02T16:21:06.285Z",
  "dueAt": "2026-01-13T16:21:06.285Z",
  "paidAt": null,
  "subtotal": 37161.32,
  "tax": 7432.26,
  "total": 44593.58,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Consulting services",
      "quantity": 18,
      "unitPrice": 406.42,
      "lineTotal": 7315.56
    },
    {
      "description": "Quality assurance",
      "quantity": 17,
      "unitPrice": 270.9,
      "lineTotal": 4605.3
    },
    {
      "description": "Quality assurance",
      "quantity": 19,
      "unitPrice": 410.47,
      "lineTotal": 7798.93
    },
    {
      "description": "Marketing services",
      "quantity": 19,
      "unitPrice": 225.07,
      "lineTotal": 4276.33
    },
    {
      "description": "Content writing",
      "quantity": 30,
      "unitPrice": 438.84,
      "lineTotal": 13165.2
    }
  ],
  "createdAt": "2025-12-02T14:56:51.104Z"
}