example-data.com
Menu
Browse docs and collections

Overview

invoices / #36

invoices #36

fromUserId
Roberta Mueller-Yundt @roberta_mueller-yundt
toUserId
Tabitha McKenzie @tabitha_mckenzie
invoiceNumber
INV-2025-0036
status
draft
issuedAt
dueAt
paidAt
subtotal
21422.4
tax
0
total
21422.4
currency
GBP
lineItems
              [
  {
    "description": "System integration",
    "quantity": 15,
    "unitPrice": 421.84,
    "lineTotal": 6327.6
  },
  {
    "description": "Maintenance contract",
    "quantity": 35,
    "unitPrice": 431.28,
    "lineTotal": 15094.8
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 36,
  "fromUserId": 162,
  "toUserId": 98,
  "invoiceNumber": "INV-2025-0036",
  "status": "draft",
  "issuedAt": "2025-01-10T02:14:57.510Z",
  "dueAt": "2025-03-04T02:14:57.510Z",
  "paidAt": null,
  "subtotal": 21422.4,
  "tax": 0,
  "total": 21422.4,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 15,
      "unitPrice": 421.84,
      "lineTotal": 6327.6
    },
    {
      "description": "Maintenance contract",
      "quantity": 35,
      "unitPrice": 431.28,
      "lineTotal": 15094.8
    }
  ],
  "createdAt": "2025-01-09T21:15:02.002Z"
}