harshil
1
Hii
I have install invoice ninja using sdk-php from this url(GitHub - invoiceninja/sdk-php: PHP wrapper for Invoice Ninja's REST API).
And then create one file to add client in invoice ninja. And then run that file on server but it show this error.
I have attach the SS Please refer to that
hillel
2
Hi,
The PHP SDK is for the v4 app, it doesn’t yet support v5.
harshil
5
Hii
Thank you for your reply
Currently I’m testing in postman to create client but in that the same error is showing
I’m attaching SS of Postman please check
I have attach postman header SS and body SS
hillel
7
Contacts should be an array of objects but I don’t think it explains the error.
@david do you have any thoughts?
david
8
couple of things,
- don’t include clients on the clients routes
- contacts is an array
- your route doesn’t include the prefix api/v1 - full route look like /api/v1/clients
Here aer some resources
https://invoiceninja.github.io/docs/developer-guide/
https://app.swaggerhub.com/apis/invoiceninja/invoiceninja/5.3
harshil
9
@david the url is contains /api/v1/clients are we missing anything?
https://tools.thcitsolutions.com/invoiceninja/api/v1/clients
and 1st point we don’t understand.
david
10
I’d suggest testing with curl first using the examples in the docs i sent.
harshil
11
Hii
@david I have created simple curl example for creating client in invoice ninja as you suggest to look in docs.
But the same error “{“message”:“Method not supported for this route”}” is displaying
Please suggest…
david
12
I wonder if this is due to you having the app in a subdirectory…
harshil
13
Means i have to remove app from invoiceninja folder
david
14
or install on a subdomain.