example-data.com
Menu
Browse docs and collections

Overview

invoices / #119

invoices #119

fromUserId
Leora Doyle @leora_doyle
toUserId
Samson Stroman @samson_stroman
invoiceNumber
INV-2025-0119
status
paid
issuedAt
dueAt
paidAt
subtotal
37113.13
tax
3711.31
total
40824.44
currency
EUR
lineItems
              [
  {
    "description": "Design work",
    "quantity": 24,
    "unitPrice": 287.8,
    "lineTotal": 6907.2
  },
  {
    "description": "Design work",
    "quantity": 31,
    "unitPrice": 441.51,
    "lineTotal": 13686.81
  },
  {
    "description": "Maintenance contract",
    "quantity": 30,
    "unitPrice": 136.92,
    "lineTotal": 4107.6
  },
  {
    "description": "Quality assurance",
    "quantity": 14,
    "unitPrice": 412.25,
    "lineTotal": 5771.5
  },
  {
    "description": "Quality assurance",
    "quantity": 37,
    "unitPrice": 179.46,
    "lineTotal": 6640.02
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 119,
  "fromUserId": 117,
  "toUserId": 52,
  "invoiceNumber": "INV-2025-0119",
  "status": "paid",
  "issuedAt": "2025-03-14T15:52:44.497Z",
  "dueAt": "2025-03-28T15:52:44.497Z",
  "paidAt": "2025-03-28T05:05:05.444Z",
  "subtotal": 37113.13,
  "tax": 3711.31,
  "total": 40824.44,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Design work",
      "quantity": 24,
      "unitPrice": 287.8,
      "lineTotal": 6907.2
    },
    {
      "description": "Design work",
      "quantity": 31,
      "unitPrice": 441.51,
      "lineTotal": 13686.81
    },
    {
      "description": "Maintenance contract",
      "quantity": 30,
      "unitPrice": 136.92,
      "lineTotal": 4107.6
    },
    {
      "description": "Quality assurance",
      "quantity": 14,
      "unitPrice": 412.25,
      "lineTotal": 5771.5
    },
    {
      "description": "Quality assurance",
      "quantity": 37,
      "unitPrice": 179.46,
      "lineTotal": 6640.02
    }
  ],
  "createdAt": "2025-03-14T00:16:14.712Z"
}