A 404 error is encountered while trying to retrieve information from Quickbooks using the MuleSoft Connector.
The error will look like the following:
Error
****************
ERROR 2022-02-16 17:30:58,506 [[quickbooks].rest.connect.Quickbooks_Online_Connector_Mule4Connector_Config.01 SelectorRunner] [processor: test-connectorsFlow2/processors/0; event: 198d5160-8f20-11ec-b392-72cf49356547] org.mule.runtime.core.internal.exception.OnErrorPropagateHandler:
********************************************************************************
Message: Request returned status code 404
Element : test-connectorsFlow2/processors/0 @ quickbooks:quickbooks.xml:30 (Get query)
Element DSL : <quickbooks-online-connector-mule-4:query-post32 doc:name="Get query" doc:id="6548e654-a60b-4c9e-b752-0cefde7892df" config-ref="Quickbooks_Online_Connector_Mule4Connector_Config" queryQueryParam="#["select * from Invoice"]" minorversionQueryParam="62" userAgentHeader="Intuit-qbov3-postman-collection1"></quickbooks-online-connector-mule-4:query-post32>
Error type: QUICKBOOKS-ONLINE-CONNECTOR-MULE-4:NOT_FOUND
FlowStack : at test-connectorsFlow2(test-connectorsFlow2/processors/0 @ quickbooks:quickbooks.xml:30 (Get query))
(set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
HTTP/1.1 500 Server Error
Content-Type: text/plain; charset=UTF-8
Content-Length: 32
Date: Wed, 16 Feb 2022 12:00:58 GMT
Connection: close
The cause of the 404 error trying to access data from QuickBooks is that the base URL used as per documentation, is not correct.
SOLUTION
On changing the Base URL from "https://sandbox-quickbooks.api.intuit.com" to "https://sandbox-quickbooks.api.intuit.com/v3/company/{ID}", the error no longer occurs.
To get the correct URL, verify using the POSTMAN collection.
001119179

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.