Avalara-Developer
Avalara-Developer

Reputation: 36

How do I use filters to an AvaTax API query "api/v2/companies" to find a specific Company Id or other data points?

I am trying to find out how to setup an AvaTax API (RESTful) query by using filters to an AvaTax API query "api/v2/companies" I would like to know what the Account Id and other company properties? Is there Avalara documentation available on this topic?

Upvotes: 0

Views: 202

Answers (1)

Avalara-Developer
Avalara-Developer

Reputation: 36

Avalara documentation regarding Filtering in AvaTax REST can be found here: https://developer.avalara.com/avatax/filtering-in-rest/

An example of the request you are trying to build would be:

https://sandbox-rest.avatax.com/**api/v2/companies**?$filter=companyCode="*{your company code}*"

Sample Response:

[{
    "id": 26903,
    "accountId": 11000123456,
    "sstPid": "",
    "companyCode": "MyCompanyCode",
    "name": "MyCompanyName",
    "isDefault": false,
    "defaultLocationId": 0,
    "isActive": true,
    "taxpayerIdNumber": "987654321",
    "IsFein": false,
    "hasProfile": true,
    "isReportingEntity": true,
    "defaultCountry": "US",
    "baseCurrencyCode": "USD",
    "roundingLevelId": "Line",
    "warningsEnabled": false,
    "isTest": false,
    "inProgress": false,
    "createdDate": "2008-09-04T22:17:24.98",
    "createdUserId": 3902,
    "modifiedDate": "2008-09-04T22:17:24.98",
    "modifiedUserId": 3902
}

]

Upvotes: 1

Related Questions