Welcome to the Invoice Pilot API documentation. This API provides functionality for creating, managing, and sending invoices. Below is an overview of the available endpoints and their functionalities.
The API uses token-based authentication. To authenticate, obtain a token by calling the login endpoint with valid credentials. Include the token in the Authorization header for subsequent requests.
- Endpoint:
POST /signup/ - Description: Create a new user account.
- Request:
- Body:
{ "username": "new_user", "password": "password123" }
- Body:
- Response:
- Successful:
{ "refresh": "<refresh_token>", "access": "<access_token>" }
- Successful:
- Endpoint:
POST /login/ - Description: Obtain a token for authentication.
- Request:
- Body:
{ "username": "existing_user", "password": "password123" }
- Body:
- Response:
- Successful:
{ "refresh": "<refresh_token>", "access": "<access_token>" }
- Successful:
- Endpoint:
GET /myaccount/ - Description: Retrieve user account details.
- Authentication: Required (Token)
- Response:
- User profile details.
- Endpoint:
GET /invoices/ - Description: Retrieve a list of invoices or create a new invoice.
- Authentication: Required (Token)
- Request (Creation):
- Body:
{ "title": "Invoice Title", "amount": 100.50, "recipent": 1 // Additional fields as needed }
- Body:
- Response (List):
- List of invoices.
- Endpoint:
GET /api/dashboard/metrics/ - Description: Retrieve the user's dashboard metrics, including total receivables, total sales, overdue invoices, and total receipts.
- Authentication: Required (Token)
- Request:
- Header:
Authorization: Bearer <access_token>
- Header:
- Response:
- Dashboard metrics data. ...
You can include additional endpoints and their documentation as needed.