API Documentation
1. Endpoint
POST /api/invoice
2. Description
This endpoint is used to generate an invoice file in PDF format.
3. Headers
- Content-Type: application/json
4. Example JSON Body
{ "invoiceNumber": "INV-12345", "date": "2025-06-30", "dueDate": "2025-07-07", "client": { "name": "John Doe", "address": "123 Example Street" }, "items": [ { "description": "Product A", "quantity": 2, "price": 50 }, { "description": "Product B", "quantity": 1, "price": 100 } ], "notes": "Thank you for your business." }
5. Response
If successful, the API will return the generated PDF invoice as a file download.
6. Curl Example
curl -X POST https://billingcenter.online/api/invoice \ -H "Content-Type: application/json" \ -d '{ "invoiceNumber": "INV-12345", "date": "2025-06-30", "client": { "name": "John Doe" }, "items": [{ "description": "Service", "quantity": 1, "price": 100 }] }' --output invoice.pdf
7. Important Notes
- API only accepts POST method.
- Body must be valid JSON.
- Make sure to set Content-Type header to application/json.
8. Support Contact
If you need help regarding the API, please contact us at support@billingcenter.online.