example-data.com
Menu
Browse docs and collections

Overview

invoices / #299

invoices #299

fromUserId
Wallace Batz @wallace_batz
toUserId
Jarrell Flatley @jarrell_flatley39
invoiceNumber
INV-2024-0299
status
paid
issuedAt
dueAt
paidAt
subtotal
7226.13
tax
1083.92
total
8310.05
currency
GBP
lineItems
              [
  {
    "description": "Implementation services",
    "quantity": 26,
    "unitPrice": 59.85,
    "lineTotal": 1556.1
  },
  {
    "description": "Accounting services",
    "quantity": 9,
    "unitPrice": 258.71,
    "lineTotal": 2328.39
  },
  {
    "description": "Implementation services",
    "quantity": 12,
    "unitPrice": 162.38,
    "lineTotal": 1948.56
  },
  {
    "description": "Consulting services",
    "quantity": 39,
    "unitPrice": 35.72,
    "lineTotal": 1393.08
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 299,
  "fromUserId": 229,
  "toUserId": 61,
  "invoiceNumber": "INV-2024-0299",
  "status": "paid",
  "issuedAt": "2024-07-03T04:10:48.794Z",
  "dueAt": "2024-07-12T04:10:48.794Z",
  "paidAt": "2024-07-04T12:16:46.621Z",
  "subtotal": 7226.13,
  "tax": 1083.92,
  "total": 8310.05,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Implementation services",
      "quantity": 26,
      "unitPrice": 59.85,
      "lineTotal": 1556.1
    },
    {
      "description": "Accounting services",
      "quantity": 9,
      "unitPrice": 258.71,
      "lineTotal": 2328.39
    },
    {
      "description": "Implementation services",
      "quantity": 12,
      "unitPrice": 162.38,
      "lineTotal": 1948.56
    },
    {
      "description": "Consulting services",
      "quantity": 39,
      "unitPrice": 35.72,
      "lineTotal": 1393.08
    }
  ],
  "createdAt": "2024-07-02T15:07:13.840Z"
}