Expenses
Track your bakery's business expenses including ingredient purchases, equipment, and operating costs.
The expense model
Properties
- Name
id- Type
- string
- Description
Unique identifier for the expense.
- Name
amount- Type
- number
- Description
Expense amount.
- Name
currency- Type
- string
- Description
Currency code (default: "AUD").
- Name
date- Type
- string
- Description
Expense date (ISO 8601).
- Name
description- Type
- string
- Description
Expense description.
- Name
category- Type
- string
- Description
Expense category (e.g., "Ingredients", "Equipment", "Utilities").
- Name
supplier- Type
- object
- Description
Supplier details with
idandname.
- Name
tax- Type
- object
- Description
Tax details with
amount,rate, andincluded.
- Name
payment- Type
- object
- Description
Payment info with
method,due_date, andreference.
- Name
receipts- Type
- array
- Description
Array of receipt files with signed URLs.
- Name
status- Type
- string
- Description
Status:
draft,submitted,completed.
List all expenses
Retrieve a paginated list of expenses.
Query parameters
- Name
limit- Type
- integer
- Description
Number of expenses to return (default: 50, max: 100).
- Name
category- Type
- string
- Description
Filter by category.
- Name
supplier- Type
- string
- Description
Filter by supplier name.
- Name
status- Type
- string
- Description
Filter by status.
- Name
date_from- Type
- string
- Description
Filter by date range start (ISO 8601).
- Name
date_to- Type
- string
- Description
Filter by date range end (ISO 8601).
- Name
min_amount- Type
- number
- Description
Minimum amount filter.
- Name
max_amount- Type
- number
- Description
Maximum amount filter.
- Name
sort- Type
- string
- Description
Sort field:
date,amount,supplier.
Request
curl -G https://api.ibakepro.com/api/v1/expenses \
-H "Authorization: Bearer {api_key}" \
-d category=Ingredients \
-d date_from=2025-01-01
Response
{
"success": true,
"data": [
{
"id": "exp_abc123",
"amount": 150.00,
"currency": "AUD",
"date": "2025-01-15",
"category": "Ingredients",
"supplier_name": "Flour Mill Co",
"description": "Monthly flour delivery",
"status": "completed",
"is_draft": false,
"payment_method": "card",
"receipts_count": 1,
"created": "2025-01-15T09:00:00Z"
}
],
"pagination": { "limit": 50, "has_more": false }
}
Create an expense
Create a new expense record.
Required attributes
- Name
amount- Type
- number
- Description
Expense amount.
- Name
date- Type
- string
- Description
Expense date (ISO 8601).
Optional attributes
- Name
description- Type
- string
- Description
Expense description.
- Name
category- Type
- string
- Description
Expense category.
- Name
supplier- Type
- object
- Description
Supplier with
idandname.
- Name
tax- Type
- object
- Description
Tax details:
amount,rate,included.
- Name
payment- Type
- object
- Description
Payment info:
method,due_date,reference.
- Name
receipts- Type
- array
- Description
Array of receipt objects with
path,filename.
- Name
is_draft- Type
- boolean
- Description
Whether expense is a draft.
Request
curl -X POST https://api.ibakepro.com/api/v1/expenses \
-H "Authorization: Bearer {api_key}" \
-H "Content-Type: application/json" \
-d '{
"amount": 250.00,
"date": "2025-01-15",
"description": "Bulk butter purchase",
"category": "Ingredients",
"supplier": {
"name": "Dairy Direct"
},
"tax": {
"amount": 22.73,
"rate": 0.10,
"included": true
},
"payment": {
"method": "bank_transfer"
}
}'
Retrieve an expense
Get a single expense by ID. Receipt URLs are signed and expire after 15 minutes.
Request
curl https://api.ibakepro.com/api/v1/expenses/exp_abc123 \
-H "Authorization: Bearer {api_key}"
Response
{
"success": true,
"data": {
"id": "exp_abc123",
"amount": 150.00,
"currency": "AUD",
"date": "2025-01-15",
"description": "Monthly flour delivery",
"category": "Ingredients",
"supplier": {
"id": null,
"name": "Flour Mill Co"
},
"tax": {
"amount": 13.64,
"rate": 0.10,
"included": true
},
"payment": {
"method": "card",
"due_date": null,
"reference": ""
},
"receipts": [
{
"id": "receipt_0",
"url": "https://storage.googleapis.com/...?X-Goog-Signature=...",
"filename": "receipt.jpg",
"expires_at": "2025-01-15T09:15:00Z"
}
],
"status": "completed",
"created_at": "2025-01-15T09:00:00Z"
}
}
Update an expense
Update an existing expense.
Request
curl -X PATCH https://api.ibakepro.com/api/v1/expenses/exp_abc123 \
-H "Authorization: Bearer {api_key}" \
-H "Content-Type: application/json" \
-d '{
"category": "Supplies",
"status": "completed"
}'
