We need to interact with the InvoiceNinja using the exposed API (https://www.invoiceninja.com/api-documentation/).
It is indicated that we could update the client data specifying a value for ‘id’. Nevertheless, we haven’t been able to achieve it, we always receive a response error, for example:
*When we have tried the “PUT” method with https://app.invoiceninja.com/api/v1/clients; the response is:
Something went wrong…
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException
*If we have tried the “PUT” method with https://app.invoiceninja.com/api/v1/clients/2 (client id=2 exists); the response is:
“Something went wrong… ErrorException”.
Note: We have tried with different bodies:
{“id”:“2”,“name”:“ClientTestXXXX”,“contact”:{“email":"testXXXX@gmail.com”}}
or
{“name”:“ClientTestXXXX”,“contact”:{“email":"testXXXX@gmail.com”}}
On the other side, we also need to update the invoices data (in draft status). However, in the documentation, it is not commented anything about this functionality (we have tried to use PUSH + invoice id, but it is not working).
We wonder if you could provide an example of how to update the client data and confirm us if we could update the invoices through the API REST.