example-data.com
Menu
Browse docs and collections

Overview

invoices / #192

invoices #192

fromUserId
Otho Nikolaus @otho.nikolaus99
toUserId
Jennifer Hoeger @jennifer.hoeger
invoiceNumber
INV-2025-0192
status
viewed
issuedAt
dueAt
paidAt
subtotal
43568.8
tax
3485.5
total
47054.3
currency
GBP
lineItems
              [
  {
    "description": "Data analysis",
    "quantity": 37,
    "unitPrice": 414.8,
    "lineTotal": 15347.6
  },
  {
    "description": "Maintenance contract",
    "quantity": 37,
    "unitPrice": 438.83,
    "lineTotal": 16236.71
  },
  {
    "description": "Maintenance contract",
    "quantity": 27,
    "unitPrice": 353.23,
    "lineTotal": 9537.21
  },
  {
    "description": "Marketing services",
    "quantity": 22,
    "unitPrice": 111.24,
    "lineTotal": 2447.28
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 192,
  "fromUserId": 209,
  "toUserId": 119,
  "invoiceNumber": "INV-2025-0192",
  "status": "viewed",
  "issuedAt": "2025-02-20T20:04:55.547Z",
  "dueAt": "2025-04-19T20:04:55.547Z",
  "paidAt": null,
  "subtotal": 43568.8,
  "tax": 3485.5,
  "total": 47054.3,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Data analysis",
      "quantity": 37,
      "unitPrice": 414.8,
      "lineTotal": 15347.6
    },
    {
      "description": "Maintenance contract",
      "quantity": 37,
      "unitPrice": 438.83,
      "lineTotal": 16236.71
    },
    {
      "description": "Maintenance contract",
      "quantity": 27,
      "unitPrice": 353.23,
      "lineTotal": 9537.21
    },
    {
      "description": "Marketing services",
      "quantity": 22,
      "unitPrice": 111.24,
      "lineTotal": 2447.28
    }
  ],
  "createdAt": "2025-02-20T17:31:50.810Z"
}