Bills API
Access and create your purchase bills.
Read scope: bills:read
Write scope: bills:write
List Bills
GET /billsReturns all bills for your business.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: draft, awaiting_payment, paid, overdue, voided |
supplier_id | string | Filter by supplier ID |
from_date | date | Filter bills from this date (YYYY-MM-DD) |
to_date | date | Filter bills 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/bills?status=awaiting_payment"Example Response
{
"bills": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"bill_number": "BILL-0001",
"supplier_id": "660e8400-e29b-41d4-a716-446655440000",
"supplier_name": "Office Supplies Co",
"status": "awaiting_payment",
"bill_date": "2026-02-10",
"due_date": "2026-03-10",
"subtotal": 500.00,
"tax_total": 50.00,
"total": 550.00,
"amount_paid": 0.00,
"amount_due": 550.00,
"currency": "AUD",
"notes": null,
"line_items": [
{
"id": "770e8400-e29b-41d4-a716-446655440000",
"description": "Office Supplies",
"quantity": 1,
"unit_price": 500.00,
"amount": 500.00,
"tax_amount": 50.00,
"account_id": "880e8400-e29b-41d4-a716-446655440000",
"tax_code_id": "990e8400-e29b-41d4-a716-446655440000"
}
],
"created_at": "2026-02-10T09:00:00Z",
"updated_at": "2026-02-10T09:00:00Z"
}
],
"total": 1,
"page": 1,
"page_size": 50,
"has_more": false
}Get Bill
GET /bills/{id}Returns a single bill by ID, including line items.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | The bill ID |
Create Bill
POST /billsCreates a new bill with line items. An internal reference number is automatically generated.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
supplier_id | string | Yes | Supplier ID (must belong to your business) |
bill_number | string | No | Supplier’s invoice/bill number |
bill_date | date | No | Bill date in YYYY-MM-DD format (default: today) |
due_date | date | No | Due date in YYYY-MM-DD format (default: bill_date) |
notes | string | No | Bill notes |
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 | Expense 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 '{
"supplier_id": "660e8400-e29b-41d4-a716-446655440000",
"bill_number": "SUP-INV-2026-042",
"bill_date": "2026-04-01",
"due_date": "2026-05-01",
"line_items": [
{
"description": "Office Supplies",
"quantity": 1,
"unit_price": 500.00,
"account_id": "880e8400-e29b-41d4-a716-446655440000",
"tax_code_id": "990e8400-e29b-41d4-a716-446655440000"
}
]
}' \
"https://api.rebased.app/api/v1/external/bills"Example Response (201 Created)
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"bill_number": "SUP-INV-2026-042",
"supplier_id": "660e8400-e29b-41d4-a716-446655440000",
"supplier_name": "Office Supplies Co",
"status": "draft",
"bill_date": "2026-04-01",
"due_date": "2026-05-01",
"subtotal": 500.00,
"tax_total": 50.00,
"total": 550.00,
"amount_paid": 0.00,
"amount_due": 550.00,
"currency": "AUD",
"notes": null,
"line_items": [
{
"id": "770e8400-e29b-41d4-a716-446655440000",
"description": "Office Supplies",
"quantity": 1,
"unit_price": 500.00,
"amount": 550.00,
"tax_amount": 50.00,
"account_id": null,
"tax_code_id": null
}
],
"created_at": "2026-04-04T09:00:00Z",
"updated_at": null
}Bill Object
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier (UUID) |
bill_number | string | Bill/invoice number from supplier |
supplier_id | string | Supplier ID |
supplier_name | string | Supplier name |
status | string | Bill status |
bill_date | date | Bill 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 |
notes | string | Bill notes |
line_items | array | Line items |
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 | Expense account ID |
tax_code_id | string | Tax code ID |
Last updated on