Search code examples
phpoauth-2.0quickbooks-onlineintuit-partner-platform

Quickbooks installation, USA?


I have come across an issue with tax codes, and viewing the following SO topic I managed to discover the issue: https://stackoverflow.com/a/63719239/405764

However, the question now arises, as to if its possible to tell if the installation is a USA installation or not, from the API. Is there an endpoint I can use to find this out?

When I say "USA" installation, I am referring to the locale of the company. For instance, you can create sandbox companies (see image:)

sandbox companies

I currently have an application environment setting that I can switch on and off based on the installation, but I would much prefer it to be automated.

Anyone? Thanks

Chris


Solution

  • Intuit provides a CompanyInfo endpoint you can use to get this data.

    Specifically, the response looks something like this:

    {
      "CompanyInfo": {
        "SyncToken": "4", 
        "domain": "QBO", 
        "LegalAddr": {
          "City": "Mountain View", 
          "Country": "US", 
          "Line1": "2500 Garcia Ave", 
          "PostalCode": "94043", 
          "CountrySubDivisionCode": "CA", 
          "Id": "1"
        }, 
        "SupportedLanguages": "en", 
        "CompanyName": "Larry's Bakery", 
        "Country": "US", 
        "CompanyAddr": {
          "City": "Mountain View", 
          "Country": "US", 
    ... etc. etc. etc. 
    

    Where the important bit in there is the Country attribute, which is documented as:

    Country
    String
    Country name to which the company belongs for financial calculations.