Create new invoice
POST/company/invoices/
Endpoint to create a new invoice for the company. Requires valid JWT authentication and validates the UTC date format.
Validations:
- The
amountfield must match the sum of (quantity * price) for all items - Each item must have a description, quantity, and price
- Dates must be in UTC format
Request
Responses
- 200
- 400
- 401
Invoice created successfully
Invalid request. Possible causes:
- The amount does not match the sum of items
- Required fields are missing
- Incorrect date format
Unauthorized. Invalid or missing JWT token.
Solution: Verify that the token is valid and included in the Authorization header.