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! π