API Documentation


1. Endpoint

POST /api/invoice

2. Description

This endpoint is used to generate an invoice file in PDF format.

3. Headers

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

8. Support Contact

If you need help regarding the API, please contact us at support@billingcenter.online.