example-data.com
Menu
Browse docs and collections

Overview

invoices / #286

invoices #286

fromUserId
Roberta Mueller-Yundt @roberta_mueller-yundt
toUserId
Myrl Pollich @myrl.pollich
invoiceNumber
INV-2024-0286
status
paid
issuedAt
dueAt
paidAt
subtotal
45358.72
tax
3628.7
total
48987.42
currency
USD
lineItems
              [
  {
    "description": "Documentation",
    "quantity": 13,
    "unitPrice": 417.91,
    "lineTotal": 5432.83
  },
  {
    "description": "Research services",
    "quantity": 33,
    "unitPrice": 302.08,
    "lineTotal": 9968.64
  },
  {
    "description": "Accounting services",
    "quantity": 37,
    "unitPrice": 408.62,
    "lineTotal": 15118.94
  },
  {
    "description": "Design work",
    "quantity": 23,
    "unitPrice": 299.14,
    "lineTotal": 6880.22
  },
  {
    "description": "Software development",
    "quantity": 8,
    "unitPrice": 153.37,
    "lineTotal": 1226.96
  },
  {
    "description": "Legal review",
    "quantity": 21,
    "unitPrice": 320.53,
    "lineTotal": 6731.13
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 286,
  "fromUserId": 162,
  "toUserId": 90,
  "invoiceNumber": "INV-2024-0286",
  "status": "paid",
  "issuedAt": "2024-06-20T15:06:03.371Z",
  "dueAt": "2024-07-19T15:06:03.371Z",
  "paidAt": "2024-07-05T12:47:06.547Z",
  "subtotal": 45358.72,
  "tax": 3628.7,
  "total": 48987.42,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Documentation",
      "quantity": 13,
      "unitPrice": 417.91,
      "lineTotal": 5432.83
    },
    {
      "description": "Research services",
      "quantity": 33,
      "unitPrice": 302.08,
      "lineTotal": 9968.64
    },
    {
      "description": "Accounting services",
      "quantity": 37,
      "unitPrice": 408.62,
      "lineTotal": 15118.94
    },
    {
      "description": "Design work",
      "quantity": 23,
      "unitPrice": 299.14,
      "lineTotal": 6880.22
    },
    {
      "description": "Software development",
      "quantity": 8,
      "unitPrice": 153.37,
      "lineTotal": 1226.96
    },
    {
      "description": "Legal review",
      "quantity": 21,
      "unitPrice": 320.53,
      "lineTotal": 6731.13
    }
  ],
  "createdAt": "2024-06-20T13:07:32.400Z"
}