Hello,
I’m trying to integrate erpnext for warehouse management to our own instrument register hosted at our local server. I’m using php and frappe client library.
The problem is I don’ know how to add new “Serial No” via api call.
I have the client configured and I can login and read user info, search serial numbers etc…
$client = new FrappeClient();
$result = $client->get(
"User"
,"myemail"
);
What parameters should I use to create new serial no?
I’m getting http error 500 with following parameters:
Update:
I tried adding “Person” via api to keep things simple.
now I got the following error
Server Error
Traceback (most recent call last):
File "/home/frappe/benches/bench-2016-12-27/apps/frappe/frappe/app.py", line 60, in application
response = frappe.api.handle()
File "/home/frappe/benches/bench-2016-12-27/apps/frappe/frappe/api.py", line 115, in handle
data = json.loads(frappe.local.form_dict.data)
File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Hello,
That is the one!
Just noticed that my curl is version 7.14 and requirement is 7.30. Maybe this will cause encoding etc. issues. I’ll update and then return.
Ok,
now I tested the script in another server (still windows apache), but with more recent version of php/curl (7.49.1).
I’m still getting the same error response.
Thanks,
sorry, I don’t have the code installed. I use erpnext.com hosted server. Our own server is windows 2008 r2 apache and I’m trying to access the rest interface from PHP code. I can login and read / search but cannot send any new items. The JSON is not accepted.