Can I access my hosted account via the webservice

42 views
Skip to first unread message

Ankit

unread,
Apr 19, 2013, 12:39:25 AM4/19/13
to erpnext-dev...@googlegroups.com
Hello,

I am trying to integrate a ticketing system with erpnext. We already have a hosted account with erpnext.
Is this possible?


To explain what I am trying to achieve, here is a use case scenario:
1. We create a ticket in the ticketing system. Once the job is done, we hit a button called send to erpnext.
2. Via webservice a customer is created if he doesn’t exist.
3. An invoice is created for that customer.
4. Optional from here on: Would be awesome to add items to that invoice by providing item codes through ticketing system.


All suggestion welcome.

regards
Ankit






Rushabh Mehta

unread,
Apr 19, 2013, 12:58:47 AM4/19/13
to erpnext-dev...@googlegroups.com
Ankit,

This is possible.

ERPNext exposes a JSON based web service API (which is incidentally used in the web UI also) and it can be used to login and get data / push data into erpnext.

here is how you do it in Python


Here is an example:



best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/vQze1MP2pjYJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ankit

unread,
Apr 19, 2013, 1:01:56 AM4/19/13
to erpnext-dev...@googlegroups.com
Hello Rushabh,

I have read this on the forum.
Can you please give the live url to access this webservice for my hosted account,
That way I can see all the methods available and start testing.

regards
Ankit


Rushabh Mehta

unread,
Apr 19, 2013, 1:08:37 AM4/19/13
to erpnext-dev...@googlegroups.com
Ankit,

Your url is your account url for example:


All the safe methods are currently in webclient.py (if you need more, just post them on the forum, but this should suffice for your current requirement)

best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.

Ankit

unread,
Apr 19, 2013, 1:12:02 AM4/19/13
to erpnext-dev...@googlegroups.com
Should i be able to access the webservice from the web browser?

Rushabh Mehta

unread,
Apr 19, 2013, 1:14:59 AM4/19/13
to erpnext-dev...@googlegroups.com
Ofcourse - like I said, this is the same way ERPNext application interacts with the server.



W: https://erpnext.com
T: @rushabh_mehta

On 19-Apr-2013, at 10:42 AM, Ankit <aps...@gmail.com> wrote:

Should i be able to access the webservice from the web browser?


--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.

Ankit

unread,
Apr 19, 2013, 1:21:23 AM4/19/13
to erpnext-dev...@googlegroups.com
myaccount.erpnext.com/server.py

redirects me to the login page.
can you try this on my behalf.

This is what I tried a few days ago and it didn't work then too.

Ankit

unread,
Apr 19, 2013, 1:22:17 AM4/19/13
to erpnext-dev...@googlegroups.com
i am substituting myaccount with the actual account name.
I have the latest version of the browser.
I am logged in.

Rushabh Mehta

unread,
Apr 19, 2013, 1:22:19 AM4/19/13
to erpnext-dev...@googlegroups.com
Ankit - myaccount is just an example - use your own account url.



--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.

Rushabh Mehta

unread,
Apr 19, 2013, 1:24:00 AM4/19/13
to erpnext-dev...@googlegroups.com
Ankit,

Please read webclient.py carefully.

You need the "cmd" argument to specify the method. Without that it will redirect you to login.

- Rushabh



W: https://erpnext.com
T: @rushabh_mehta

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages