example-data.com
Menu
Browse docs and collections

Overview

invoices / #173

invoices #173

fromUserId
Santa Corwin @santa.corwin59
toUserId
Camron O'Conner @camron.oconner54
invoiceNumber
INV-2024-0173
status
overdue
issuedAt
dueAt
paidAt
subtotal
34119.88
tax
0
total
34119.88
currency
USD
lineItems
              [
  {
    "description": "Implementation services",
    "quantity": 3,
    "unitPrice": 384.68,
    "lineTotal": 1154.04
  },
  {
    "description": "Project management",
    "quantity": 36,
    "unitPrice": 370.72,
    "lineTotal": 13345.92
  },
  {
    "description": "Hardware supply",
    "quantity": 25,
    "unitPrice": 194,
    "lineTotal": 4850
  },
  {
    "description": "Hardware supply",
    "quantity": 34,
    "unitPrice": 356.64,
    "lineTotal": 12125.76
  },
  {
    "description": "Software development",
    "quantity": 8,
    "unitPrice": 330.52,
    "lineTotal": 2644.16
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 173,
  "fromUserId": 247,
  "toUserId": 94,
  "invoiceNumber": "INV-2024-0173",
  "status": "overdue",
  "issuedAt": "2024-09-01T14:33:49.986Z",
  "dueAt": "2024-09-27T14:33:49.986Z",
  "paidAt": null,
  "subtotal": 34119.88,
  "tax": 0,
  "total": 34119.88,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Implementation services",
      "quantity": 3,
      "unitPrice": 384.68,
      "lineTotal": 1154.04
    },
    {
      "description": "Project management",
      "quantity": 36,
      "unitPrice": 370.72,
      "lineTotal": 13345.92
    },
    {
      "description": "Hardware supply",
      "quantity": 25,
      "unitPrice": 194,
      "lineTotal": 4850
    },
    {
      "description": "Hardware supply",
      "quantity": 34,
      "unitPrice": 356.64,
      "lineTotal": 12125.76
    },
    {
      "description": "Software development",
      "quantity": 8,
      "unitPrice": 330.52,
      "lineTotal": 2644.16
    }
  ],
  "createdAt": "2024-09-01T09:17:14.860Z"
}