example-data.com
Menu
Browse docs and collections

Overview

invoices / #214

invoices #214

fromUserId
Audreanne Will @audreanne_will
toUserId
Rubye Emmerich @rubye.emmerich
invoiceNumber
INV-2024-0214
status
sent
issuedAt
dueAt
paidAt
subtotal
15598.35
tax
1247.87
total
16846.22
currency
EUR
lineItems
              [
  {
    "description": "Implementation services",
    "quantity": 29,
    "unitPrice": 279.21,
    "lineTotal": 8097.09
  },
  {
    "description": "Technical support",
    "quantity": 1,
    "unitPrice": 480.65,
    "lineTotal": 480.65
  },
  {
    "description": "Training session",
    "quantity": 29,
    "unitPrice": 242.09,
    "lineTotal": 7020.61
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 214,
  "fromUserId": 127,
  "toUserId": 225,
  "invoiceNumber": "INV-2024-0214",
  "status": "sent",
  "issuedAt": "2024-08-18T12:07:38.753Z",
  "dueAt": "2024-09-20T12:07:38.753Z",
  "paidAt": null,
  "subtotal": 15598.35,
  "tax": 1247.87,
  "total": 16846.22,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Implementation services",
      "quantity": 29,
      "unitPrice": 279.21,
      "lineTotal": 8097.09
    },
    {
      "description": "Technical support",
      "quantity": 1,
      "unitPrice": 480.65,
      "lineTotal": 480.65
    },
    {
      "description": "Training session",
      "quantity": 29,
      "unitPrice": 242.09,
      "lineTotal": 7020.61
    }
  ],
  "createdAt": "2024-08-17T14:19:26.827Z"
}