Skip to main content

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.

EndpointMethodDescription
/api/public/budgetsGETList all budgets
/api/public/budgetsPOSTCreate a new budget
/api/public/budgets/{id}GETGet budget by ID
/api/public/budgets/{id}PUTUpdate budget
/api/public/budgets/{id}DELETEDelete budget

👥 Customers

Manage customer information and relationships.

EndpointMethodDescription
/api/public/customersGETList all customers
/api/public/customersPOSTCreate a new customer
/api/public/customers/{id}GETGet customer by ID
/api/public/customers/{id}PUTUpdate customer
/api/public/customers/{id}DELETEDelete customer

📦 Products

Handle product catalog and pricing information.

EndpointMethodDescription
/api/public/productsGETList all products
/api/public/productsPOSTCreate a new product
/api/public/products/{id}GETGet product by ID
/api/public/products/{id}PUTUpdate product
/api/public/products/{id}DELETEDelete product

🔗 Webhooks

Test and manage webhook notifications.

EndpointMethodDescription
/api/public/webhooks/testPOSTTest 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

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger10Items per page (max 100)

Filtering

ParameterTypeDescription
searchstringSearch term for name/description
statusstringFilter by status
createdAfterstringISO 8601 date
createdBeforestringISO 8601 date

Sorting

ParameterTypeDescription
sortstringField to sort by
orderstringasc 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

🔗 Additional Resources


Ready to dive into specific endpoints? Start with Budgets! 📋