Skip to Content

Invoices API

Access and create your sales invoices.

Read scope: invoices:read Write scope: invoices:write

List Invoices

GET /invoices

Returns all invoices for your business.

Query Parameters

ParameterTypeDescription
statusstringFilter by status: draft, awaiting_payment, paid, overdue, voided
client_idstringFilter by client ID
from_datedateFilter invoices from this date (YYYY-MM-DD)
to_datedateFilter invoices to this date (YYYY-MM-DD)
pageintegerPage number (default: 1)
page_sizeintegerItems per page (default: 50, max: 100)

Example Request

curl -H "Authorization: Bearer rb_live_YOUR_API_KEY" \ "https://api.rebased.app/api/v1/external/invoices?status=awaiting_payment&from_date=2026-01-01"

Example Response

{ "invoices": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "invoice_number": "INV-1001", "client_id": "660e8400-e29b-41d4-a716-446655440000", "client_name": "Acme Corporation", "status": "awaiting_payment", "issue_date": "2026-02-15", "due_date": "2026-03-15", "subtotal": 1000.00, "tax_total": 100.00, "total": 1100.00, "amount_paid": 0.00, "amount_due": 1100.00, "currency": "AUD", "notes": "Thank you for your business", "line_items": [ { "id": "770e8400-e29b-41d4-a716-446655440000", "description": "Consulting Services", "quantity": 10, "unit_price": 100.00, "amount": 1000.00, "tax_amount": 100.00, "account_id": "880e8400-e29b-41d4-a716-446655440000", "tax_code_id": "990e8400-e29b-41d4-a716-446655440000" } ], "created_at": "2026-02-15T10:30:00Z", "updated_at": "2026-02-15T10:30:00Z" } ], "total": 1, "page": 1, "page_size": 50, "has_more": false }

Get Invoice

GET /invoices/{id}

Returns a single invoice by ID, including line items.

Path Parameters

ParameterTypeDescription
idstring (UUID)The invoice ID

Example Request

curl -H "Authorization: Bearer rb_live_YOUR_API_KEY" \ "https://api.rebased.app/api/v1/external/invoices/550e8400-e29b-41d4-a716-446655440000"

Create Invoice

POST /invoices

Creates a new invoice with line items. An invoice number is automatically generated.

Request Body

FieldTypeRequiredDescription
client_idstringYesClient ID (must belong to your business)
issue_datedateNoIssue date in YYYY-MM-DD format (default: today)
due_datedateNoDue date in YYYY-MM-DD format
payment_terms_daysintegerNoDays until due (used if due_date not provided)
currencystringNoCurrency code (default: AUD)
notesstringNoNotes displayed on the invoice
referencestringNoExternal reference (e.g., client PO number)
statusstringNodraft or awaiting_payment (default: draft)
line_itemsarrayYesAt least one line item (see below)

Line Item Fields

FieldTypeRequiredDescription
descriptionstringNoLine item description
quantitydecimalNoQuantity (default: 1)
unit_pricedecimalYesPrice per unit
account_idstringYesRevenue account ID (from GET /accounts)
tax_code_idstringYesTax code ID (from GET /tax-codes). The tax rate is looked up automatically.
item_idstringNoCatalog item ID

Example Request

curl -X POST \ -H "Authorization: Bearer rb_live_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "client_id": "660e8400-e29b-41d4-a716-446655440000", "issue_date": "2026-04-04", "payment_terms_days": 30, "notes": "Thank you for your business", "reference": "PO-12345", "line_items": [ { "description": "Consulting Services", "quantity": 10, "unit_price": 100.00, "account_id": "880e8400-e29b-41d4-a716-446655440000", "tax_code_id": "990e8400-e29b-41d4-a716-446655440000" }, { "description": "Travel Expenses", "quantity": 1, "unit_price": 250.00, "account_id": "880e8400-e29b-41d4-a716-446655440000", "tax_code_id": "990e8400-e29b-41d4-a716-446655440000" } ] }' \ "https://api.rebased.app/api/v1/external/invoices"

Example Response (201 Created)

{ "id": "550e8400-e29b-41d4-a716-446655440000", "invoice_number": "INV-1002", "client_id": "660e8400-e29b-41d4-a716-446655440000", "client_name": "Acme Corporation", "status": "draft", "issue_date": "2026-04-04", "due_date": "2026-05-04", "subtotal": 1250.00, "tax_total": 125.00, "total": 1375.00, "amount_paid": 0.00, "amount_due": 1375.00, "currency": "AUD", "notes": "Thank you for your business", "line_items": [ { "id": "770e8400-e29b-41d4-a716-446655440000", "description": "Consulting Services", "quantity": 10, "unit_price": 100.00, "amount": 1100.00, "tax_amount": 100.00, "account_id": null, "tax_code_id": null }, { "id": "771e8400-e29b-41d4-a716-446655440000", "description": "Travel Expenses", "quantity": 1, "unit_price": 250.00, "amount": 275.00, "tax_amount": 25.00, "account_id": null, "tax_code_id": null } ], "created_at": "2026-04-04T10:30:00Z", "updated_at": null }

Invoice Object

FieldTypeDescription
idstringUnique identifier (UUID)
invoice_numberstringAuto-generated invoice number (e.g., INV-1001)
client_idstringClient ID
client_namestringClient name
statusstringInvoice status
issue_datedateIssue date
due_datedateDue date
subtotaldecimalSubtotal before tax
tax_totaldecimalTotal tax amount
totaldecimalTotal including tax
amount_paiddecimalAmount paid
amount_duedecimalAmount still due
currencystringCurrency code (e.g., AUD)
notesstringInvoice notes
line_itemsarrayLine items (see below)
created_atdatetimeWhen created
updated_atdatetimeWhen last updated

Line Item Object

FieldTypeDescription
idstringUnique identifier
descriptionstringLine item description
quantitydecimalQuantity
unit_pricedecimalPrice per unit
amountdecimalLine total (quantity x unit_price + tax)
tax_amountdecimalTax amount for this line
account_idstringRevenue account ID
tax_code_idstringTax code ID
Last updated on