Update existing invoice
PUT/truckers/invoices/
Updates the data of an existing invoice. It is verified that the invoice belongs to the authenticated carrier.
Modifiable fields:
- number: Only if it does not match another existing invoice
- date: Issue date
- amount: Total amount
- status: Current status
Example body: { _id: 507f1f77bcf86cd799439011, number: FAC-2023-001, date: 2023-05-15, amount: 1250.50, status: paid }
Notes:
- The _id field is mandatory to identify the invoice
- The truckerId cannot be modified after creation
Request
Responses
- 200
- 400
- 401
- 404
Individual Invoice
Invalid input data
Unauthorized
Invoice not found