Can I access my hosted account via the webservice

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.

  1. Via webservice a customer is created if he doesn’t exist.

  2. An invoice is created for that customer.

  3. 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







    <!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

<![endif]–>



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-forum+un...@googlegroups.com.

To post to this group, send email to er...@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,

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

https://github.com/webnotes/wnframework/blob/master/webnotes/utils/webclient.py

Here is an example:

https://gist.github.com/rmehta/5418237


best,
Rushabh


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

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

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.
  1. Via webservice a customer is created if he doesn’t exist.

  2. An invoice is created for that customer.

  3. 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







<!–[if gte mso 10]> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

<![endif]–>




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-forum+un…@googlegroups.com.

To post to this group, send email to er…@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.

 

 




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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

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




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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/eaMmqChqKfkJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Ankit,

Your url is your account url for example:

myaccount.erpnext.com/server.py

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

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

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





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-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/eaMmqChqKfkJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/pUxNYEpJxuQJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

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 <ap...@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-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/pUxNYEpJxuQJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

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.



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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/poODM3ss_TQJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

i am substituting myaccount with the actual account name.
I have the latest version of the browser.
I am logged in.



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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/TN1eLuCkmEkJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Ankit - myaccount is just an example - use your own account url.



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

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.




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-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/poODM3ss_TQJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

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

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

i am substituting myaccount with the actual account name.
I have the latest version of the browser.
I am logged in.




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-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/TN1eLuCkmEkJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.