Finance API

Manage invoices, budgets, and expenses in your workspace. Use these endpoints to automate billing, track spending, and keep financial data in sync with the rest of your project.

Base URL

All Finance API endpoints are prefixed with:

Base path
/dev/finance

Authentication: All endpoints require a secret API key sent as a Bearer token in the Authorization header.

Invoice Management

Endpoints for listing, creating, retrieving, sending, and deleting invoices. Use these to automate your billing flows.

GET/dev/finance/invoices

List invoices

Retrieve a list of all invoices for the current project.

GEThttps://api.meetandrock.com/v1/dev/finance/invoices
List invoices

List all invoices for your workspace.

curl -X GET "https://api.meetandrock.com/v1/dev/finance/invoices" \
-H "Authorization: Bearer YOUR_API_KEY"
POST/dev/finance/invoices

Create invoice

Create a new invoice. Amount fields can be provided or computed by your own logic.

Optional fields

  • invoice_number (string)
  • client_name (string)
  • client_email (string, valid email)
  • client_address (string)
  • due_date (date)
  • status (enum: draft, sent, paid, overdue, cancelled)
  • subtotal (number, min 0)
  • tax (number, min 0)
  • total (number, min 0)
  • notes (string)
  • items (array of objects)

Items array

  • description (string, required)
  • quantity (integer, min 1, required)
  • unit_price (number, positive, required)
POSThttps://api.meetandrock.com/v1/dev/finance/invoices
Create invoice

Create a draft invoice with line items and totals.

curl -X POST "https://api.meetandrock.com/v1/dev/finance/invoices" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"invoice_number": "INV-2024-001",
"client_name": "Acme Corp",
"client_email": "billing@acme.com",
"client_address": "123 Main St",
"due_date": "2024-04-01",
"status": "draft",
"items": [
{
"description": "Service A",
"quantity": 1,
"unit_price": 100.00
},
{
"description": "Service B",
"quantity": 2,
"unit_price": 50.00
}
],
"subtotal": 200.00,
"tax": 20.00,
"total": 220.00,
"notes": "Payment due within 30 days"
}'
GET/dev/finance/invoices/:invoiceId

Get invoice

Retrieve full details of a specific invoice by its ID.

GEThttps://api.meetandrock.com/v1/dev/finance/invoices/:invoiceId
Get invoice

Retrieve an invoice by its unique identifier.

curl -X GET "https://api.meetandrock.com/v1/dev/finance/invoices/:invoiceId" \
-H "Authorization: Bearer YOUR_API_KEY"
POST/dev/finance/invoices/:invoiceId/send

Send invoice

Send an invoice to the client using the configured delivery channel (for example, email).

POSThttps://api.meetandrock.com/v1/dev/finance/invoices/:invoiceId/send
Send invoice

Trigger sending of an invoice to the client.

curl -X POST "https://api.meetandrock.com/v1/dev/finance/invoices/:invoiceId/send" \
-H "Authorization: Bearer YOUR_API_KEY"
DELETE/dev/finance/invoices/:invoiceId

Delete invoice

Permanently delete an existing invoice.

DELETEhttps://api.meetandrock.com/v1/dev/finance/invoices/:invoiceId
Delete invoice

Delete an invoice by its unique identifier.

curl -X DELETE "https://api.meetandrock.com/v1/dev/finance/invoices/:invoiceId" \
-H "Authorization: Bearer YOUR_API_KEY"

Budget Management

Endpoints for creating and tracking budgets for a time period.

GET/dev/finance/budgets

List budgets

Retrieve all budgets in the current project.

GEThttps://api.meetandrock.com/v1/dev/finance/budgets
List budgets

Fetch all configured budgets.

curl -X GET "https://api.meetandrock.com/v1/dev/finance/budgets" \
-H "Authorization: Bearer YOUR_API_KEY"
POST/dev/finance/budgets

Create budget

Define a budget for a specific time period and track spending against it.

Optional fields

  • name (string)
  • start_date (date)
  • end_date (date, must be greater than start_date)
  • total_amount (number, min 0, max 99,999,999.99)
  • spent_amount (number, min 0, max 99,999,999.99)
  • status (enum: active, completed, cancelled)
POSThttps://api.meetandrock.com/v1/dev/finance/budgets
Create budget

Create a new budget for a period like a quarter.

curl -X POST "https://api.meetandrock.com/v1/dev/finance/budgets" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Q1 2024",
"start_date": "2024-01-01",
"end_date": "2024-03-31",
"total_amount": 10000.00,
"spent_amount": 0.00,
"status": "active"
}'
PUT/dev/finance/budgets/:budgetId

Update budget

Update the name or amount values for an existing budget.

PUThttps://api.meetandrock.com/v1/dev/finance/budgets/:budgetId
Update budget

Update budget metadata and remaining amount.

curl -X PUT "https://api.meetandrock.com/v1/dev/finance/budgets/:budgetId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Q1 2024",
"total_amount": 12000.00,
"spent_amount": 5000.00
}'
DELETE/dev/finance/budgets/:budgetId

Delete budget

Permanently delete an existing budget.

DELETEhttps://api.meetandrock.com/v1/dev/finance/budgets/:budgetId
Delete budget

Delete a budget by its unique identifier.

curl -X DELETE "https://api.meetandrock.com/v1/dev/finance/budgets/:budgetId" \
-H "Authorization: Bearer YOUR_API_KEY"

Expense Management

Endpoints for recording and updating expenses, including optional receipt uploads.

GET/dev/finance/expenses

List expenses

Retrieve all expenses in the current project.

GEThttps://api.meetandrock.com/v1/dev/finance/expenses
List expenses

List all recorded expenses.

curl -X GET "https://api.meetandrock.com/v1/dev/finance/expenses" \
-H "Authorization: Bearer YOUR_API_KEY"
POST/dev/finance/expenses

Create expense

Record a new expense. You can optionally upload a receipt and associate the expense with a budget.

Optional fields

  • description (string)
  • amount (number, min 0)
  • date (date)
  • category (string)
  • receipt_url (string) — URL of uploaded receipt
  • budget_id (UUID)

Receipt files can be uploaded with multipart/form-data.

POSThttps://api.meetandrock.com/v1/dev/finance/expenses
Create expense

Record an expense with optional receipt file.

curl -X POST "https://api.meetandrock.com/v1/dev/finance/expenses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "amount=100.00" \
-F "description=Office Supplies" \
-F "category=supplies" \
-F "date=2024-01-15" \
-F "budget_id=uuid-here" \
-F "receipt=@/path/to/receipt.jpg"
PUT/dev/finance/expenses/:expenseId

Update expense

Update fields like amount, description, category, or date for an existing expense.

PUThttps://api.meetandrock.com/v1/dev/finance/expenses/:expenseId
Update expense

Update metadata for an existing expense.

curl -X PUT "https://api.meetandrock.com/v1/dev/finance/expenses/:expenseId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 150.00,
"description": "Updated Office Supplies",
"category": "supplies",
"date": "2024-01-16"
}'
DELETE/dev/finance/expenses/:expenseId

Delete expense

Permanently delete an expense entry.

DELETEhttps://api.meetandrock.com/v1/dev/finance/expenses/:expenseId
Delete expense

Delete an expense by its unique identifier.

curl -X DELETE "https://api.meetandrock.com/v1/dev/finance/expenses/:expenseId" \
-H "Authorization: Bearer YOUR_API_KEY"

Error responses

Standard error responses for all Finance API endpoints.

400 Bad Request

The request body or query parameters are invalid.

{
  "message": "Invalid request parameters"
}

401 Unauthorized

The API key is missing, expired, or invalid.

{
  "message": "Invalid or missing API key"
}

404 Not Found

The requested resource (invoice, budget, or expense) was not found.

{
  "message": "Resource not found"
}

422 Unprocessable Entity

The requested financial operation cannot be completed (for example, insufficient funds).

{
  "message": "Insufficient funds"
}

Contents