Skip to Content

Bills API

Access and create your purchase bills.

Read scope: bills:read Write scope: bills:write

List Bills

GET /bills

Returns all bills for your business.

Query Parameters

ParameterTypeDescription
statusstringFilter by status: draft, awaiting_payment, paid, overdue, voided
supplier_idstringFilter by supplier ID
from_datedateFilter bills from this date (YYYY-MM-DD)
to_datedateFilter bills 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/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

ParameterTypeDescription
idstring (UUID)The bill ID

Create Bill

POST /bills

Creates a new bill with line items. An internal reference number is automatically generated.

Request Body

FieldTypeRequiredDescription
supplier_idstringYesSupplier ID (must belong to your business)
bill_numberstringNoSupplier’s invoice/bill number
bill_datedateNoBill date in YYYY-MM-DD format (default: today)
due_datedateNoDue date in YYYY-MM-DD format (default: bill_date)
notesstringNoBill notes
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_idstringYesExpense 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 '{ "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

FieldTypeDescription
idstringUnique identifier (UUID)
bill_numberstringBill/invoice number from supplier
supplier_idstringSupplier ID
supplier_namestringSupplier name
statusstringBill status
bill_datedateBill date
due_datedateDue date
subtotaldecimalSubtotal before tax
tax_totaldecimalTotal tax amount
totaldecimalTotal including tax
amount_paiddecimalAmount paid
amount_duedecimalAmount still due
currencystringCurrency code
notesstringBill notes
line_itemsarrayLine items
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_idstringExpense account ID
tax_code_idstringTax code ID
Last updated on