API Reference Overview
Welcome to the Billoget API Reference! This section provides detailed documentation for all available endpoints, request/response formats, and examples.
🚀 Base URL
All API requests should be made to:
https://api.billoget.com/v1
🔐 Authentication
All endpoints require authentication using API Keys in the Authorization header:
Authorization: Bearer bk_live_1234567890abcdef...
📊 Available Resources
📋 Budgets
Create, manage, and track budgets with full CRUD operations.
Endpoint | Method | Description |
---|---|---|
/api/public/budgets | GET | List all budgets |
/api/public/budgets | POST | Create a new budget |
/api/public/budgets/{id} | GET | Get budget by ID |
/api/public/budgets/{id} | PUT | Update budget |
/api/public/budgets/{id} | DELETE | Delete budget |
👥 Customers
Manage customer information and relationships.
Endpoint | Method | Description |
---|---|---|
/api/public/customers | GET | List all customers |
/api/public/customers | POST | Create a new customer |
/api/public/customers/{id} | GET | Get customer by ID |
/api/public/customers/{id} | PUT | Update customer |
/api/public/customers/{id} | DELETE | Delete customer |
📦 Products
Handle product catalog and pricing information.
Endpoint | Method | Description |
---|---|---|
/api/public/products | GET | List all products |
/api/public/products | POST | Create a new product |
/api/public/products/{id} | GET | Get product by ID |
/api/public/products/{id} | PUT | Update product |
/api/public/products/{id} | DELETE | Delete product |
🔗 Webhooks
Test and manage webhook notifications.
Endpoint | Method | Description |
---|---|---|
/api/public/webhooks/test | POST | Test webhook delivery |
🔄 Common Request/Response Patterns
Request Headers
Content-Type: application/json
Authorization: Bearer bk_live_1234567890abcdef...
Response Format
All responses follow this structure:
{
"data": [...], // or single object
"pagination": {
"page": 1,
"limit": 10,
"total": 100,
"hasMore": true
},
"meta": {
"requestId": "req_1234567890abcdef",
"timestamp": "2024-01-15T10:30:00Z"
}
}
Error Response Format
{
"error": "error_code",
"message": "Human-readable error description",
"details": {
"field": "Additional context"
},
"timestamp": "2024-01-15T10:30:00Z",
"requestId": "req_1234567890abcdef"
}
📝 Query Parameters
Pagination
Parameter | Type | Default | Description |
---|---|---|---|
page | integer | 1 | Page number |
limit | integer | 10 | Items per page (max 100) |
Filtering
Parameter | Type | Description |
---|---|---|
search | string | Search term for name/description |
status | string | Filter by status |
createdAfter | string | ISO 8601 date |
createdBefore | string | ISO 8601 date |
Sorting
Parameter | Type | Description |
---|---|---|
sort | string | Field to sort by |
order | string | asc or desc |
Example Request
curl -X GET "https://api.billoget.com/v1/api/public/budgets?page=1&limit=20&status=PENDING&sort=createdAt&order=desc" \
-H "Authorization: Bearer bk_live_1234567890abcdef" \
-H "Content-Type: application/json"
🎯 Quick Examples
Create a Customer
curl -X POST "https://api.billoget.com/v1/api/public/customers" \
-H "Authorization: Bearer bk_live_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890"
}'
Create a Budget
curl -X POST "https://api.billoget.com/v1/api/public/budgets" \
-H "Authorization: Bearer bk_live_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"customerId": "customer_123",
"items": [
{
"productId": "product_456",
"quantity": 2,
"unitPrice": 100.00
}
],
"notes": "Budget for Q1 project"
}'
🚀 Quick Start with Postman
Download our Postman Collection for easy testing.
🔍 Testing Your Integration
Using cURL
All examples in this documentation include cURL commands for quick testing.
Response Validation
Always check the HTTP status code and response structure to ensure your integration handles all scenarios correctly.
📚 Next Steps
- Budgets API - Complete budget management
- Webhooks - Real-time notifications
🔗 Additional Resources
Ready to dive into specific endpoints? Start with Budgets! 📋