example-data.com
Menu
Browse docs and collections

Overview

invoices / #282

invoices #282

fromUserId
Alex Lang @alex_lang85
toUserId
Gavin Lowe @gavin_lowe
invoiceNumber
INV-2025-0282
status
sent
issuedAt
dueAt
paidAt
subtotal
34728.92
tax
0
total
34728.92
currency
CAD
lineItems
              [
  {
    "description": "Training session",
    "quantity": 35,
    "unitPrice": 298.91,
    "lineTotal": 10461.85
  },
  {
    "description": "Legal review",
    "quantity": 5,
    "unitPrice": 111.97,
    "lineTotal": 559.85
  },
  {
    "description": "System integration",
    "quantity": 17,
    "unitPrice": 278.03,
    "lineTotal": 4726.51
  },
  {
    "description": "Project management",
    "quantity": 29,
    "unitPrice": 66.59,
    "lineTotal": 1931.11
  },
  {
    "description": "Project management",
    "quantity": 29,
    "unitPrice": 40.14,
    "lineTotal": 1164.06
  },
  {
    "description": "Photography services",
    "quantity": 33,
    "unitPrice": 481.38,
    "lineTotal": 15885.54
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 282,
  "fromUserId": 163,
  "toUserId": 17,
  "invoiceNumber": "INV-2025-0282",
  "status": "sent",
  "issuedAt": "2025-04-13T04:51:05.263Z",
  "dueAt": "2025-04-20T04:51:05.263Z",
  "paidAt": null,
  "subtotal": 34728.92,
  "tax": 0,
  "total": 34728.92,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Training session",
      "quantity": 35,
      "unitPrice": 298.91,
      "lineTotal": 10461.85
    },
    {
      "description": "Legal review",
      "quantity": 5,
      "unitPrice": 111.97,
      "lineTotal": 559.85
    },
    {
      "description": "System integration",
      "quantity": 17,
      "unitPrice": 278.03,
      "lineTotal": 4726.51
    },
    {
      "description": "Project management",
      "quantity": 29,
      "unitPrice": 66.59,
      "lineTotal": 1931.11
    },
    {
      "description": "Project management",
      "quantity": 29,
      "unitPrice": 40.14,
      "lineTotal": 1164.06
    },
    {
      "description": "Photography services",
      "quantity": 33,
      "unitPrice": 481.38,
      "lineTotal": 15885.54
    }
  ],
  "createdAt": "2025-04-12T13:21:00.271Z"
}