Create new invoice
POST/truckers/invoices/
Create a new invoice associated with the authenticated carrier. Input data is validated, and it is verified that an invoice with the same number does not already exist.
Required fields:
- number: Unique invoice number
- date: Issue date (format YYYY-MM-DD)
- amount: Total amount (number with decimals)
- status: Initial status (draft, issued, paid, cancelled)
- truckerId: Carrier ID (must match the JWT)
Example body: { number: FAC-2023-001, date: 2023-05-15, amount: 1250.50, status: issued, truckerId: 507f1f77bcf86cd799439011 }
Request
Responses
- 200
- 400
- 401
Individual Invoice
Invalid input data
Unauthorized