Finance API
Base URL
All URLs referenced in the documentation have the following base:
https://api.meetandrock.com/v1/dev
Invoice Management
Endpoints for managing invoices and billing
List Invoices
Retrieve a list of all invoices
curl -X GET "https://api.meetandrock.com/v1/dev/finance/invoices" \ -H "Authorization: Bearer YOUR_API_KEY"
Create Invoice
Create a new invoice
curl -X POST "https://api.meetandrock.com/v1/dev/finance/invoices" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "uuid",
"items": [
{
"description": "Service A",
"quantity": 1,
"price": 100.00
}
],
"due_date": "2024-04-01"
}'Get Invoice Details
Retrieve details of a specific invoice
curl -X GET "https://api.meetandrock.com/v1/dev/finance/invoices/:invoiceId" \ -H "Authorization: Bearer YOUR_API_KEY"
Send Invoice
Send an invoice to a customer
curl -X POST "https://api.meetandrock.com/v1/dev/finance/invoices/:invoiceId/send" \ -H "Authorization: Bearer YOUR_API_KEY"
Delete Invoice
Delete an existing invoice
curl -X DELETE "https://api.meetandrock.com/v1/dev/finance/invoices/:invoiceId" \ -H "Authorization: Bearer YOUR_API_KEY"
Budget Management
Endpoints for managing budgets and financial planning
List Budgets
Retrieve all budgets
curl -X GET "https://api.meetandrock.com/v1/dev/finance/budgets" \ -H "Authorization: Bearer YOUR_API_KEY"
Create Budget
Create a new budget
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",
"amount": 10000.00,
"period": "quarterly",
"start_date": "2024-01-01",
"end_date": "2024-03-31"
}'Update Budget
Update an existing budget
curl -X PUT "https://api.meetandrock.com/v1/dev/finance/budgets/:budgetId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 12000.00,
"name": "Updated Q1 2024"
}'Delete Budget
Delete an existing budget
curl -X DELETE "https://api.meetandrock.com/v1/dev/finance/budgets/:budgetId" \ -H "Authorization: Bearer YOUR_API_KEY"
Expense Management
Endpoints for tracking and managing expenses
List Expenses
Retrieve all expenses
curl -X GET "https://api.meetandrock.com/v1/dev/finance/expenses" \ -H "Authorization: Bearer YOUR_API_KEY"
Record Expense
Record a new expense with receipt
curl -X POST "https://api.meetandrock.com/v1/dev/finance/expenses" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "amount=100.00" \ -F "description=Office Supplies" \ -F "category=supplies" \ -F "receipt=@/path/to/receipt.pdf"
Update Expense
Update 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"
}'Delete Expense
Delete an existing expense
curl -X DELETE "https://api.meetandrock.com/v1/dev/finance/expenses/:expenseId" \ -H "Authorization: Bearer YOUR_API_KEY"
Error Responses
400 Bad Request
{
"message": "Invalid request parameters"
}
401 Unauthorized
{
"message": "Invalid or missing API key"
}
404 Not Found
{
"message": "Resource not found"
}
422 Unprocessable Entity
{
"message": "Insufficient funds"
}