List Invoices

GEThttps://backend.localbusiness.pro/api/v1/invoices

Returns a paginated list of invoices for the authenticated business, sorted by creation date (newest first).

X-Public-Keystringrequired

Your business public key. Used to identify which business is making the request.

X-Timestampstringrequired

Current Unix timestamp in seconds. Requests older than 5 minutes are rejected.

X-Signaturestringrequired

HMAC-SHA256 signature of the signing string: {timestamp}\n{METHOD}\n{path}\n{body}, using your private key as the secret.

pageinteger

Page number (1-indexed).

per_pageinteger

Items per page (max 100). Default: 25.

Values: 1-100

statusstring

Filter by invoice status (e.g., draft, sent, viewed, paid, overdue, voided).

Responses

{
  "invoices": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "invoice_number": "INV-00078",
      "title": "HVAC System Installation - Final Payment",
      "status": "sent",
      "subtotal": "8750.00",
      "discount_type": null,
      "discount_value": null,
      "tax_rate": "8.25",
      "tax_amount": "721.88",
      "total_amount": "9471.88",
      "paid_amount": "0.00",
      "due_at": "2026-04-01T00:00:00.000000Z",
      "issued_at": "2026-03-01T00:00:00.000000Z",
      "sent_at": "2026-03-01T12:30:00.000000Z",
      "paid_at": null,
      "created_at": "2026-03-01T10:00:00.000000Z",
      "updated_at": "2026-03-01T12:30:00.000000Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 25,
    "total_items": 78,
    "total_pages": 4
  }
}

Authentication — HMAC-SHA256

Every authenticated request requires three headers:

X-Public-KeyYour business public key
X-TimestampUnix timestamp (seconds)
X-SignatureHMAC-SHA256 of signing string

Signing string: {timestamp}\n{METHOD}\n{path}\n{body}

Request

GEThttps://backend.localbusiness.pro/api/v1/invoices

Rate Limits

With X-Public-Key: 60 req/min per key

Without: 10 req/min per IP

Code Examples

PUBLIC_KEY="pk_live_..."
PRIVATE_KEY="sk_live_..."
TIMESTAMP=$(date +%s)
PATH_URI="/api/v1/invoices?status=overdue"

SIGNATURE=$(printf '%s\n%s\n%s\n' "$TIMESTAMP" "GET" "$PATH_URI" \
  | openssl dgst -sha256 -hmac "$PRIVATE_KEY" | awk '{print $2}')

curl -H "X-Public-Key: $PUBLIC_KEY" \
     -H "X-Timestamp: $TIMESTAMP" \
     -H "X-Signature: $SIGNATURE" \
     "https://backend.localbusiness.pro$PATH_URI"