DELETE /api/v1/invoices/{id}/payments/{paymentId} read only the payment id: it would delete a payment that belonged to a different invoice from the one in the path, and answered 200 for a payment that did not exist. It now answers 404, and deletes nothing, when the invoice does not exist, the payment does not exist, or the payment belongs to another invoice.
Recording or removing a payment through the API now updates the invoice's state the way the app does, so an invoice paid in full reads paid, and one whose payment is removed goes back to open or partially_paid. Recording the payment that settles an invoice now sends the invoice.paid webhook, as it does from the app.
GET /api/v1/invoices?state=, GET /api/v1/users?role= and GET /api/v1/time_entries?approval_status= now answer an unknown value with a 400 that names the parameter and lists the values it takes. Before, the first two failed with a server error and the third ignored the filter and returned every entry.