Question

I'm trying to use the QBO v3 API object update function described here. The API explorer shows a different uri.

I'm trying to update an account with Id 42. Both of the following URIs get me a 401:

As the documentation would suggest:

https://quickbooks.api.intuit.com/v3/company/0123456789/account?requestid=42

(the above at least gives me a json blob with the 401)

As the api explorer would suggest:

https://qb.sbfinance.intuit.com/v3/company/0123456789/account?operation=update

(here I don't even get the json, just a plain 401)

My request body is successful when I use the api explorer, so I don't believe that's the problem. I also don't believe authentication is the problem, because I can successfully create objects and also make queries with the same headers.

What might I be missing?

Was it helpful?

Solution

Don't put the Account object's ID into the URL. The [?requestid=] from the documentation you mentioned apparently refers to an id related to the request (not the object in question). The API Explorer's URI appears to simply mislead (although I could certainly be missing something here).

In your example, just use this:

https://quickbooks.api.intuit.com/v3/company/0123456789/account

Let the headers and request body do the rest.

OTHER TIPS

Correct BASE URI: https://quickbooks.api.intuit.com/v3/company/

you can refer example request/response section of any entity doc.

To debug(401 authentication issue), you can use any standard RestClient. In the following thread, I've explained how to use RestClinet plugin of Mozilla to test any QBO V3 endpoint.

You can download IPP's devkit and using that devkit you can call any endpoints easily.

Hope it will be useful.

Thanks

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top