Invoices API
Access and create your sales invoices.
Read scope: invoices:read
Write scope: invoices:write
List Invoices
GET /invoicesReturns all invoices for your business.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: draft, awaiting_payment, paid, overdue, voided |
client_id | string | Filter by client ID |
from_date | date | Filter invoices from this date (YYYY-MM-DD) |
to_date | date | Filter invoices to this date (YYYY-MM-DD) |
page | integer | Page number (default: 1) |
page_size | integer | Items 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
| Parameter | Type | Description |
|---|---|---|
id | string (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 /invoicesCreates a new invoice with line items. An invoice number is automatically generated.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
client_id | string | Yes | Client ID (must belong to your business) |
issue_date | date | No | Issue date in YYYY-MM-DD format (default: today) |
due_date | date | No | Due date in YYYY-MM-DD format |
payment_terms_days | integer | No | Days until due (used if due_date not provided) |
currency | string | No | Currency code (default: AUD) |
notes | string | No | Notes displayed on the invoice |
reference | string | No | External reference (e.g., client PO number) |
status | string | No | draft or awaiting_payment (default: draft) |
line_items | array | Yes | At least one line item (see below) |
Line Item Fields
| Field | Type | Required | Description |
|---|---|---|---|
description | string | No | Line item description |
quantity | decimal | No | Quantity (default: 1) |
unit_price | decimal | Yes | Price per unit |
account_id | string | Yes | Revenue account ID (from GET /accounts) |
tax_code_id | string | Yes | Tax code ID (from GET /tax-codes). The tax rate is looked up automatically. |
item_id | string | No | Catalog 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
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier (UUID) |
invoice_number | string | Auto-generated invoice number (e.g., INV-1001) |
client_id | string | Client ID |
client_name | string | Client name |
status | string | Invoice status |
issue_date | date | Issue date |
due_date | date | Due date |
subtotal | decimal | Subtotal before tax |
tax_total | decimal | Total tax amount |
total | decimal | Total including tax |
amount_paid | decimal | Amount paid |
amount_due | decimal | Amount still due |
currency | string | Currency code (e.g., AUD) |
notes | string | Invoice notes |
line_items | array | Line items (see below) |
created_at | datetime | When created |
updated_at | datetime | When last updated |
Line Item Object
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier |
description | string | Line item description |
quantity | decimal | Quantity |
unit_price | decimal | Price per unit |
amount | decimal | Line total (quantity x unit_price + tax) |
tax_amount | decimal | Tax amount for this line |
account_id | string | Revenue account ID |
tax_code_id | string | Tax code ID |
Last updated on