v1

latestOpenAPI 3.1.0AGPL-3.0 license2026-07-1210336283.6 KB
Invoices

Retrieve a invoice

Retrieve a invoice by its unique identifier for the authenticated team.

get/invoices/{id}

Path parameters

idstring required

Response

Retrieve a invoice by its unique identifier for the authenticated team.

idstring uuid required

Unique identifier for the invoice

status'draft' | 'overdue' | 'paid' | 'unpaid' | 'canceled' | 'scheduled' required

Current status of the invoice

dueDatestring required

Due date of the invoice in ISO 8601 format

issueDatestring required

Issue date of the invoice in ISO 8601 format

invoiceNumberstring

Invoice number as shown to the customer (auto-generated if not provided)

amountnumber nullable required

Total amount of the invoice, or null if not yet calculated

currencystring nullable required

Currency code (ISO 4217) for the invoice amount

paidAtstring nullable required

Timestamp when the invoice was paid (ISO 8601), or null if unpaid

reminderSentAtstring nullable required

Timestamp when a payment reminder was sent (ISO 8601), or null if never sent

notestring nullable required

Optional note attached to the invoice

vatnumber nullable required

Value-added tax amount, or null if not applicable

taxnumber nullable required

Tax amount, or null if not applicable

discountnumber nullable required

Discount amount applied to the invoice, or null if none

subtotalnumber nullable required

Subtotal before taxes and discounts, or null if not calculated

viewedAtstring nullable required

Timestamp when the invoice was viewed by the customer (ISO 8601), or null if never viewed

customerNamestring nullable required

Name of the customer as shown on the invoice, or null if not set

sentTostring email nullable required

Email address to which the invoice was sent, or null if not sent

sentAtstring nullable required

Timestamp when the invoice was sent (ISO 8601), or null if not sent

createdAtstring required

Timestamp when the invoice was created (ISO 8601)

updatedAtstring required

Timestamp when the invoice was last updated (ISO 8601)

pdfUrlstring uri nullable required

URL to download the invoice PDF, or null if not generated

previewUrlstring uri nullable required

URL to preview the invoice in the browser, or null if not generated

Example response

{
  "id": "b3b7e6e2-8c2a-4e2a-9b1a-2e4b5c6d7f8a",
  "status": "paid",
  "dueDate": "2024-06-30T23:59:59.000Z",
  "issueDate": "2024-06-01T00:00:00.000Z",
  "invoiceNumber": "INV-2024-001",
  "amount": 1500.75,
  "currency": "USD",
  "customer": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Acme Corporation",
    "website": "https://acme.com",
    "email": "info@acme.com"
  },
  "paidAt": "2024-06-15T12:00:00.000Z",
  "reminderSentAt": "2024-06-10T09:00:00.000Z",
  "note": "Thank you for your business.",
  "vat": 120,
  "tax": 80,
  "discount": 50,
  "subtotal": 1400,
  "viewedAt": "2024-06-05T14:30:00.000Z",
  "customerName": "Acme Corporation",
  "sentTo": "billing@acme.com",
  "sentAt": "2024-06-02T08:00:00.000Z",
  "createdAt": "2024-06-01T07:00:00.000Z",
  "updatedAt": "2024-06-15T10:00:00.000Z",
  "pdfUrl": "https://app.midday.ai/api/download/invoice?token=eef58951-1682-4062-b010-425866032390",
  "previewUrl": "https://app.midday.ai/i/eef58951-1682-4062-b010-425866032390"
}