Cloud version v22.9.5.365 is ahead of Desktop and Server editions that are v22.9.1.350 so as suggested maybe it is an issue with Manager cloud.
It’s true URLs have changed yesterday. Not API though. Just everything else outside of API.
For the record, I do value clean readable URLs. But they do introduce extra layer of complexity into the program. It got to the point where it’s just easier for me to encode query parameters as binary data (which can be compressed if needed).
There are no secrets in query parameter. It’s just encoded differently.
I know this kind of creates a problem where URLs are no longer “guessable”. But the way I look at this, “guessable” URLs are still in API and always will be.
How can I decode it using JavaScript?
Good to know
Wouldn’t be a problem if there were WebHooks. I would change the word “guessable” by “usable”. Now is not usable.
Can you please tell us how to get the query from this new way encoded string?
I just getting something like this afetr decoding base64:
(/sales-invoices?ogYJQ29uenVsdGVrwAwAyAwy bJHFv$|\
I haven’t figure out how to get the key of the document from here. This is the only thing I need.
@rdavidsc The query string is protocol buffers encoded in base64. The key itself is 128-bit label representing GUID.
So it’s not like there are any secrets in query string. But these query strings are not meant for API consumption or de-serializing at your end.
So rather than trying to de-serialize query string, what does your integration do and how API itself can be improved to achieve what you need?
Hi there! Thanks for you answer.
What I really need is to detect the moment when the user create a document (sales invoice and purchase invoice).
If there were WebHooks would be perfect because I could receive the data (FileID and key) so I could then make an API call and get the rest of the info and make some calculations like utility by invoice, commission, etc.
Meanwhile, as there are no WebHooks, what I was doing was using an JavaScript extension to detect when the user make a new invoice and send my own http request (emulating a Webhook). I used to take the FileID and key from the URL.
In addition to, now extensions are an obsolete feature…
All this described before, just to avoid to pool the API every second looking for a new invoice. WebHooks is a better solution because it saves a lot of CPU resources for both ends. The API call is made only when needed, not every second.
cBesides, when the API is called to get a list, there is no limit, no pagination, there is no filter… So every call will bring a lot of unnecessary data.
I hope you can consider to have WebHooks.
Cheers!
Is the API really the best way of doing this? Would not an external program call which is passed appropriate data be a cleaner solution? Similar calls are already required for tax authority reporting / integration elsewhere.
Hi @Patch !
How do you think a external program can get the appropriate data? I think the best way to make an integrations is using the API. What other solution do you propose?
In my case, that external call is made form another server where I have deployed my program. But this program need to be notified when a new invoice is created. And yes, other requirement I have is to pass the invoice data to the local tax authority.
-
Which country is this for?
-
Have you got your solution to submit data to your tax authority or just planning to in the future?
-
Have you considered contributing to the localisation for your country?
Panama Republic.
Yes, there are some providers government approved and the only thing is to send them a JSON or a XML with the data. And I have to be doing this before the year ends.
Yes, I would love to. I fact, I have made some language contributions several years before.
Hi @lubos, can you give an example of the .proto file you use to encode/decode? I have been studing the protobuffer and is seems to be necesary a estructure file.
Manager can be improved with Webhooks!
That sounds similar to
In summary, a Manager localisation which formats the data then facilitates communication with the tax authority has greater potential to share development costs than a separate program interrogating Manger and is consistent with development elsewhere in Manger. @rdavidsc you contributing to the Panama Republic localisation would be an excellent outcome imo
Sorry, I am not sure this is the right place to post this, but we are having issues with the API as well.
We used to get inventory items in json form by using this url manager.io/inventory-items.json?fileId but now this gives “Unimplemented error”. Any idea on how we can use that now. What we want is a list of inventory items but with some reporting like qtyOnHand, QtyTo receive, which the API doesn’t give currently.
Hi again. I haven’t found a solution for not having WebHooks yet. The thing is, I need to know the key of the document modified at the moment of the update.
If I use the API and look for the timestamp, still have a problem because after my calculations or modifications to the document, there is a new timestamp and the process calls it itself again and again in an infinite loop.
What do I need:
- Somewhere in the app where I can specify the type of document, the action (create, edit, delete) and the URL where to receive a Webhook.
- The Webhook should send the document type and key. Nothing else. With this info is possible to do the rest with the current API.
Hi there!
Where can I start looking into this? I have two choises: make custom enougth Manager for Panama and electronic invoicing or change to QB or something else after 6 years with Manager.
Thanks in advance.
@rdavidsc I’m planning to add webhooks fairly soon (possibly later this month). Right now, localizations do not deal with 3rd-party integrations which would be required for real-time submission. Mostly because I’m still exploring which direction to take. But for you, having webhooks would be step in the right direction.
My preference is for a solution which maximises functionality in Managers shared localisations and minimises the unshared programming required at each users premises. How to actually achieve this is however challenging.
That’s great news!!! Thanks a lot!
This will help a lot with integrations. Will be really easy to sync Manager with other apps.
I just need something else… is there any way to get the key (uuid) of the document in the “view sales invoice” page from the DOM ??
I would like to make an extension, but I’ll need this key.