I have recently started using the manager API. I want to create a bunch of useful scripts for requesting info, in Python.
@Lubos, this is great! I’m really glad, so many years on, to be so gladly still using manager. It’s grown my business greatly! Hopefully, this API will make life even easier. Could you comment on the status of the API? Do we have anything more than GET at the moment?
I was hoping this would become a useful place to have some ‘centralised’ discussion on the API, as I see many have been created.
@everyone, who would be interested in the scripts I mentioned above? Maybe an Open Source project could be started for this, some basic interaction, and maybe more advanced options? Let me know in anyone is interested…
One note, I see that only admin accounts can access the API, is that the intended path for the API?
Hello Lubos, Is there any update on the API: POST, PUT and DELETE? I know you guys are busy with the road map, I just want to have some sort of indication, so I can plan a few things.
Hi All, sorry if this is a silly question but would the API allow me to “link” Manager to Paypal to pull in the payment data from a website. If so, are there any existing scripts that would be available to use? Thanks for your help.
Not at the moment, but the API would allow such an integration
@Lubos, do you plan to allow also API acces to the desktop version? I don’t need a multi-user server setup but allowing to interface with the desktop version would allow for some nice tricks…
Desktop edition will have API too. The reason why desktop edition doesn’t support API right now is that it doesn’t have a concept of users since it’s single-user product. And right now, API is relying on users for authentication.
I will be introducing ability to create API keys which will act as API credentials (users won’t be used to API) and this will be extended to desktop edition.
The API is currently broken for use with scripts (or my server setup is, but I think it’s manager)
I think it is just a redirection issue.
If one is logged into the website, one can then navigate to api with no issue, sign in and continue.
However, if your not logged in, api just redirects you to api/login.
On the same issue, objects still exists, but just gives you a blank page.
Also, navigating to <something-else> doesn’t redirect you to login, it redirects you to <something-else>/login.
I think this is just some of the server setup? I’m pretty sure it’s not on the OS side, is it?
All the problems I mentioned are now fixed. Thanks!
I’m starting to get somewhere. Thank you for including index.json objects on some of the pages. It makes it a lot nicer to find the next object in the string of objects.
Could you add an index page to all the pages? It will then make navigating the API through the script a lot easier.
At the moment the flow is like this.
Get the api index.json
Look for the specified business.
Get the index.json for the key at business (which we can’t do at the moment since there isn’t an index here.)
Look for the group … and so on.
Each time above, the script auths, fetches from the server, then searches the result for the next key.
This is very network intensive, but good enough for the work in progress that this is.
So the request is to ensure there is an index.json on each page.
Originally, I was using some html parser (BeautifulSoup) to find the hrefs, and I guess one could simply build the paths once off, then reference that from that object…
Then the flow would be:
Get index.json
Get business href page, store and parse this for easy ref
Get whatever object you want with those reff’s.
Another option, would be to have the root index.json actually contain the entire object path tree… Not sure how that sounds. But I think it is probably un-RESTful…
Any thoughts?
Am I correct in thinking we only have a tree depth of 4 here?
Reading over this now, maybe option 2 is best. More coding, but it’ll be less network intensive and will give you less work:-P
Lubos can answer this better than I, but I think documentation does not yet exist. However, if you visit the API page in your browser, you can get a summary of how it works. It’s pretty simple. I like it.
You are also free to look at my code above, it has some notes in it, and may help you understand how things are working. I have yet to implement PUT and POST though.
On that note, I’m wondering if manager will accept anything in the PUT and POST? Or will it validate the data first? @lubos
–EDIT–
Just realised I broke the link. It’s fixed now, sorry everyone.
Any word on work with the API? I still cannot create a receipt for an invoice, as the accountsReceivable account is not actually listed in the API page.
I’m guessing the API is going through some changes?
Whatever Manager can create, you can also create via API.
What I suggest is to create transaction in Manager, then look how it was saved in API.
In this case, Accounts Receivable account is in-built. It doesn’t have to be listed in API as an account. Manager has a few in-built accounts where GUID of the account is the same across all businesses. So you can use that GUID even without this account being explicitly created.