example-data.com
Menu
Browse docs and collections

Overview

invoices / #206

invoices #206

fromUserId
Ressie Howell-Hodkiewicz @ressie_howell-hodkiewicz35
toUserId
Ike Breitenberg @ike.breitenberg
invoiceNumber
INV-2024-0206
status
paid
issuedAt
dueAt
paidAt
subtotal
21772.61
tax
0
total
21772.61
currency
EUR
lineItems
              [
  {
    "description": "Documentation",
    "quantity": 24,
    "unitPrice": 427.31,
    "lineTotal": 10255.44
  },
  {
    "description": "Marketing services",
    "quantity": 2,
    "unitPrice": 421.58,
    "lineTotal": 843.16
  },
  {
    "description": "Design work",
    "quantity": 10,
    "unitPrice": 100.23,
    "lineTotal": 1002.3
  },
  {
    "description": "Photography services",
    "quantity": 36,
    "unitPrice": 23.23,
    "lineTotal": 836.28
  },
  {
    "description": "Implementation services",
    "quantity": 29,
    "unitPrice": 304.67,
    "lineTotal": 8835.43
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 206,
  "fromUserId": 214,
  "toUserId": 72,
  "invoiceNumber": "INV-2024-0206",
  "status": "paid",
  "issuedAt": "2024-12-18T10:26:28.278Z",
  "dueAt": "2025-01-03T10:26:28.278Z",
  "paidAt": "2024-12-24T14:21:41.507Z",
  "subtotal": 21772.61,
  "tax": 0,
  "total": 21772.61,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Documentation",
      "quantity": 24,
      "unitPrice": 427.31,
      "lineTotal": 10255.44
    },
    {
      "description": "Marketing services",
      "quantity": 2,
      "unitPrice": 421.58,
      "lineTotal": 843.16
    },
    {
      "description": "Design work",
      "quantity": 10,
      "unitPrice": 100.23,
      "lineTotal": 1002.3
    },
    {
      "description": "Photography services",
      "quantity": 36,
      "unitPrice": 23.23,
      "lineTotal": 836.28
    },
    {
      "description": "Implementation services",
      "quantity": 29,
      "unitPrice": 304.67,
      "lineTotal": 8835.43
    }
  ],
  "createdAt": "2024-12-18T03:24:43.117Z"
}