Module: AvaTax::Client::Companies
- Included in:
- AvaTax::Client
- Defined in:
- lib/avatax/client/companies.rb
Instance Method Summary collapse
-
#certify_integration(id) ⇒ String
Checks whether the integration being used to set up this company and run transactions onto this company is compliant to all requirements.
-
#change_filing_status(id, model) ⇒ String
Change the filing status of this company.
-
#company_initialize(model) ⇒ Object
Quick setup for a company with a single physical address.
-
#create_companies(model) ⇒ CompanyModel[]
Create new companies.
-
#create_company_parameters(companyId, model) ⇒ CompanyParameterDetailModel[]
Add parameters to a company.
-
#create_funding_request(id, model, options = {}) ⇒ Object
Request managed returns funding setup for a company.
-
#create_vat_numbers(companyId, model) ⇒ CustomerVatNumberModel[]
Create VAT Numbers for a company.
-
#delete_company(id) ⇒ ErrorDetail[]
Delete a single company.
-
#delete_company_parameter(companyId, id) ⇒ ErrorDetail[]
Delete a single company parameter.
-
#delete_vat_number(companyId, id) ⇒ ErrorDetail[]
Delete a single VAT Number.
-
#funding_configuration_by_company(companyId) ⇒ Object
Check the funding configuration of a company.
-
#funding_configurations_by_company_and_currency(companyId, options = {}) ⇒ FundingConfigurationModel[]
Check the funding configuration of a company.
-
#get_all_customers_and_suppliers_with_country_params(companyId, options = {}) ⇒ FetchResult
Retrieve all customers and suppliers with their country parameters for a company.
-
#get_company(id, options = {}) ⇒ Object
Retrieve a single company.
-
#get_company_configuration(id) ⇒ CompanyConfigurationModel[]
Get configuration settings for this company.
-
#get_company_parameter_detail(companyId, id) ⇒ Object
Retrieve a single company parameter.
-
#get_filing_status(id) ⇒ String
Get this company's filing status.
-
#get_vat_number(companyId, id) ⇒ Object
Retrieve a single VAT Number.
-
#list_a_c_h_entry_details_for_company(id, periodyear, periodmonth) ⇒ ACHEntryDetailModel[]
Get ACH entry detail report for company and period.
-
#list_company_parameter_details(companyId, options = {}) ⇒ FetchResult
Retrieve parameters for a company.
-
#list_funding_requests_by_company(id) ⇒ FundingStatusModel[]
Check managed returns funding status for a company.
-
#list_mrs_companies ⇒ FetchResult
Retrieve a list of MRS Companies with account.
-
#list_vat_numbers(companyId, options = {}) ⇒ FetchResult
Retrieve VAT Numbers for a company.
-
#query_companies(options = {}) ⇒ FetchResult
Retrieve all companies.
-
#set_company_configuration(id, model) ⇒ CompanyConfigurationModel[]
Change configuration settings for this company.
-
#update_company(id, model) ⇒ Object
Update a single company.
-
#update_company_parameter_detail(companyId, id, model) ⇒ Object
Update a company parameter.
-
#update_vat_number(companyId, id, model) ⇒ Object
Update a single VAT Number.
-
#validate_vat_number(companyId, model) ⇒ Object
Validate a VAT Number without storing it.
Instance Method Details
#certify_integration(id) ⇒ String
Checks whether the integration being used to set up this company and run transactions onto this company is compliant to all requirements.
Examines the most recent 100 transactions or data from the last month when verifying transaction-related integrations. For partners who write integrations against AvaTax for many clients, this API is a way to do a quick self testing to verify whether the written integrations for a company are sufficient enough to be delivered to the respective customers to start using it.
This API provides messages specific enough (through predefined checks) to guide the partner on what integrations are still missing from the company to get fully certified. The API makes the following checks to conclude if the company is NOT fully certified:
- Any past month items contains generic tax code of P0000000.
- All the companies on the requesting account are test companies.
- No Voided/Cancelled documents in the past 30 days.
- There are less than 2 committed documents.
- Any documentCode is a generic GUID string.
- Any customerCode on document is a generic GUID string.
- No document has more than 1 documentLine.
- All of the documents have missing exemptionNo, customerUsageType, taxDateOverride or negative amount.
- Any document quantity is a negative number.
- Any document have repeated lines.
- No document has shipping charge.
- All documents have same ItemCodes, descriptions and taxCodes.
- Less than 2 addresses used across all documents.
- Whether locationCode was used in documents.
- Account with AvaGlobal subscription and no documents have VATBuyerId.
- Any document has currencyCode not being USD for accounts with AvaGlobal subscription.
- All documents have countryCode used for accounts with AvaGlobal subscription.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
38 39 |
# File 'lib/avatax/client/companies.rb', line 38 def certify_integration(id) path = "/api/v2/companies/#{id}/certify" get(path, {}, AvaTax::VERSION) end |
#change_filing_status(id, model) ⇒ String
Change the filing status of this company
Changes the current filing status of this company.
For customers using Avalara's Managed Returns Service, each company within their account can request for Avalara to file tax returns on their behalf. Avalara compliance team members will review all requested filing calendars prior to beginning filing tax returns on behalf of this company.
The following changes may be requested through this API:
- If a company is in
NotYetFilingstatus, the customer may request this be changed toFilingRequested. - Avalara compliance team members may change a company from
FilingRequestedtoFirstFiling. - Avalara compliance team members may change a company from
FirstFilingtoActive.
All other status changes must be requested through the Avalara customer support team.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
64 65 |
# File 'lib/avatax/client/companies.rb', line 64 def change_filing_status(id, model) path = "/api/v2/companies/#{id}/filingstatus" post(path, model, {}, AvaTax::VERSION) end |
#company_initialize(model) ⇒ Object
Quick setup for a company with a single physical address
Shortcut to quickly setup a single-physical-location company with critical information and activate it. This API provides quick and simple company setup functionality and does the following things:
- Create a company object with its own tax profile
- Add a key contact person for the company
- Set up one physical location for the main office
- Declare nexus in all taxing jurisdictions for that main office address
- Activate the company
This API only provides a limited subset of functionality compared to the 'Create Company' API call. If you need additional features or options not present in this 'Quick Setup' API call, please use the full 'Create Company' call instead. Please allow 1 minute before making transactions using the company.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
88 89 |
# File 'lib/avatax/client/companies.rb', line 88 def company_initialize(model) path = "/api/v2/companies/initialize" post(path, model, {}, AvaTax::VERSION) end |
#create_companies(model) ⇒ CompanyModel[]
Create new companies
Create one or more new company objects. A 'company' represents a single corporation or individual that is registered to handle transactional taxes. You may attach nested data objects such as contacts, locations, and nexus with this CREATE call, and those objects will be created with the company.
NOTE: Please do not use these blacklisted characters in company name and code: ';', '', '|'.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
105 106 |
# File 'lib/avatax/client/companies.rb', line 105 def create_companies(model) path = "/api/v2/companies" post(path, model, {}, AvaTax::VERSION) end |
#create_company_parameters(companyId, model) ⇒ CompanyParameterDetailModel[]
Add parameters to a company.
Add parameters to a company.
Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company.
A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name.
To see available parameters for this company, call /api/v2/definitions/parameters?$filter=attributeType eq Company
Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
129 130 |
# File 'lib/avatax/client/companies.rb', line 129 def create_company_parameters(companyId, model) path = "/api/v2/companies/#{companyId}/parameters" post(path, model, {}, AvaTax::VERSION) end |
#create_funding_request(id, model, options = {}) ⇒ Object
Request managed returns funding setup for a company
This API is available by invitation only. Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are required to setup their funding configuration before Avalara can begin filing tax returns on their behalf. Funding configuration for each company is set up by submitting a funding setup request, which can be sent either via email or via an embedded HTML widget. When the funding configuration is submitted to Avalara, it will be reviewed by treasury team members before approval. This API records that an ambedded HTML funding setup widget was activated. This API requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
Security Policies
- This API depends on the following active services:Returns (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
155 156 |
# File 'lib/avatax/client/companies.rb', line 155 def create_funding_request(id, model, ={}) path = "/api/v2/companies/#{id}/funding/setup" post(path, model, , AvaTax::VERSION) end |
#create_vat_numbers(companyId, model) ⇒ CustomerVatNumberModel[]
Create VAT Numbers for a company
Create one or more VAT number records for a company.
Each record is validated synchronously against the ELR / Directory Search service
(which proxies VIES). The response includes validation results:
vatNumberStatus, registeredBusinessName, businessNameStatus, validationDate,
and validationSource.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
173 174 |
# File 'lib/avatax/client/companies.rb', line 173 def create_vat_numbers(companyId, model) path = "/api/v2/companies/#{companyId}/vatnumbers" post(path, model, {}, AvaTax::VERSION) end |
#delete_company(id) ⇒ ErrorDetail[]
Delete a single company
Deleting a company will delete all child companies, and all users attached to this company.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
186 187 |
# File 'lib/avatax/client/companies.rb', line 186 def delete_company(id) path = "/api/v2/companies/#{id}" delete(path, {}, AvaTax::VERSION) end |
#delete_company_parameter(companyId, id) ⇒ ErrorDetail[]
Delete a single company parameter
Delete a parameter of a company. Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company.
A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
205 206 |
# File 'lib/avatax/client/companies.rb', line 205 def delete_company_parameter(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}" delete(path, {}, AvaTax::VERSION) end |
#delete_vat_number(companyId, id) ⇒ ErrorDetail[]
Delete a single VAT Number
Marks the VAT number record identified by this URL as deleted.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
219 220 |
# File 'lib/avatax/client/companies.rb', line 219 def delete_vat_number(companyId, id) path = "/api/v2/companies/#{companyId}/vatnumbers/#{id}" delete(path, {}, AvaTax::VERSION) end |
#funding_configuration_by_company(companyId) ⇒ Object
Check the funding configuration of a company
This API is available by invitation only. Requires a subscription to Avalara Managed Returns or SST Certified Service Provider. Returns the funding configuration of the requested company. .
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
- This API depends on the following active services:Returns (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.Firm Managed (for accounts managed by a firm): ARA, ARAManaged. Swagger Name: AvaTaxClient
236 237 |
# File 'lib/avatax/client/companies.rb', line 236 def funding_configuration_by_company(companyId) path = "/api/v2/companies/#{companyId}/funding/configuration" get(path, {}, AvaTax::VERSION) end |
#funding_configurations_by_company_and_currency(companyId, options = {}) ⇒ FundingConfigurationModel[]
Check the funding configuration of a company
This API is available by invitation only. Requires a subscription to Avalara Managed Returns or SST Certified Service Provider. Returns the funding configuration of the requested company. .
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
- This API depends on the following active services:Returns (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.Firm Managed (for accounts managed by a firm): ARA, ARAManaged. Swagger Name: AvaTaxClient
254 255 |
# File 'lib/avatax/client/companies.rb', line 254 def funding_configurations_by_company_and_currency(companyId, ={}) path = "/api/v2/companies/#{companyId}/funding/configurations" get(path, , AvaTax::VERSION) end |
#get_all_customers_and_suppliers_with_country_params(companyId, options = {}) ⇒ FetchResult
Retrieve all customers and suppliers with their country parameters for a company
Retrieves all customers and suppliers for a company along with their country parameters. Records without country parameters will still be returned with null country parameter fields (LEFT JOIN behavior). Results are ordered by CustomerTypeId, CustomerCode, and Country.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
272 273 |
# File 'lib/avatax/client/companies.rb', line 272 def get_all_customers_and_suppliers_with_country_params(companyId, ={}) path = "/api/v2/companies/#{companyId}/supplierandcustomers/withcountryparams" get(path, , AvaTax::VERSION) end |
#get_company(id, options = {}) ⇒ Object
Retrieve a single company
Get the company object identified by this URL. A 'company' represents a single corporation or individual that is registered to handle transactional taxes. You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
- Contacts
- Items
- Locations
- Nexus
- Settings
- TaxCodes
- TaxRules
- UPC
- Parameters
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
298 299 |
# File 'lib/avatax/client/companies.rb', line 298 def get_company(id, ={}) path = "/api/v2/companies/#{id}" get(path, , AvaTax::VERSION) end |
#get_company_configuration(id) ⇒ CompanyConfigurationModel[]
Get configuration settings for this company
Retrieve a list of all configuration settings tied to this company.
Configuration settings provide you with the ability to control features of your account and of your
tax software. The category name AvaCertServiceConfig is reserved for
Avalara internal software configuration values; to store your own company-level settings, please
create a new category name that begins with X-, for example, X-MyCustomCategory.
Company settings are permanent settings that cannot be deleted. You can set the value of a company setting to null if desired and if the particular setting supports it.
Avalara-based company settings for AvaCertServiceConfig affect your company's exemption certificate
processing, and should be changed with care.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
322 323 |
# File 'lib/avatax/client/companies.rb', line 322 def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration" get(path, {}, AvaTax::VERSION) end |
#get_company_parameter_detail(companyId, id) ⇒ Object
Retrieve a single company parameter
Retrieves a single parameter of a company.
Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company.
A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
342 343 |
# File 'lib/avatax/client/companies.rb', line 342 def get_company_parameter_detail(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}" get(path, {}, AvaTax::VERSION) end |
#get_filing_status(id) ⇒ String
Get this company's filing status
Retrieve the current filing status of this company.
For customers using Avalara's Managed Returns Service, each company within their account can request for Avalara to file tax returns on their behalf. Avalara compliance team members will review all requested filing calendars prior to beginning filing tax returns on behalf of this company.
A company's filing status can be one of the following values:
NoReporting- This company is not configured to report tax returns; instead, it reports through a parent company.NotYetFiling- This company has not yet begun filing tax returns through Avalara's Managed Returns Service.FilingRequested- The company has requested to begin filing tax returns, but Avalara's compliance team has not yet begun filing.FirstFiling- The company has recently filing tax returns and is in a new status.Active- The company is currently active and is filing tax returns via Avalara Managed Returns.Inactive- The company is currently inactive.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
368 369 |
# File 'lib/avatax/client/companies.rb', line 368 def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus" get(path, {}, AvaTax::VERSION) end |
#get_vat_number(companyId, id) ⇒ Object
Retrieve a single VAT Number
Retrieve a single VAT Number record by its unique ID.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
382 383 |
# File 'lib/avatax/client/companies.rb', line 382 def get_vat_number(companyId, id) path = "/api/v2/companies/#{companyId}/vatnumbers/#{id}" get(path, {}, AvaTax::VERSION) end |
#list_a_c_h_entry_details_for_company(id, periodyear, periodmonth) ⇒ ACHEntryDetailModel[]
Get ACH entry detail report for company and period
This API is available by invitation only. Requires a subscription to Avalara Managed Returns or SST Certified Service Provider. Returns a list of ACH entry details for the given company and period. Each object in the result is an ach entry trace record for a payment made on behalf of this company.
Security Policies
- This API depends on the following active services:Returns (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
401 402 |
# File 'lib/avatax/client/companies.rb', line 401 def list_a_c_h_entry_details_for_company(id, periodyear, periodmonth) path = "/api/v2/companies/#{id}/paymentdetails/#{periodyear}/#{periodmonth}" get(path, {}, AvaTax::VERSION) end |
#list_company_parameter_details(companyId, options = {}) ⇒ FetchResult
Retrieve parameters for a company
Retrieve all parameters of a company.
Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company.
A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name.
Search for specific objects using the criteria in the $filter parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top, $skip, and $orderby parameters.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
427 428 |
# File 'lib/avatax/client/companies.rb', line 427 def list_company_parameter_details(companyId, ={}) path = "/api/v2/companies/#{companyId}/parameters" get(path, , AvaTax::VERSION) end |
#list_funding_requests_by_company(id) ⇒ FundingStatusModel[]
Check managed returns funding status for a company
This API is available by invitation only. Requires a subscription to Avalara Managed Returns or SST Certified Service Provider. Returns a list of funding setup requests and their current status. Each object in the result is a request that was made to setup or adjust funding status for this company.
Security Policies
- This API depends on the following active services:Returns (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
444 445 |
# File 'lib/avatax/client/companies.rb', line 444 def list_funding_requests_by_company(id) path = "/api/v2/companies/#{id}/funding" get(path, {}, AvaTax::VERSION) end |
#list_mrs_companies ⇒ FetchResult
Retrieve a list of MRS Companies with account
This API is available by invitation only.
Get a list of companies with an active MRS service.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
458 459 |
# File 'lib/avatax/client/companies.rb', line 458 def list_mrs_companies() path = "/api/v2/companies/mrs" get(path, {}, AvaTax::VERSION) end |
#list_vat_numbers(companyId, options = {}) ⇒ FetchResult
Retrieve VAT Numbers for a company
Retrieve all VAT Numbers associated with this company.
A VAT Number represents a customer's VAT identification number that has been validated against VIES (VAT Information Exchange System).
Search for specific records using the $filter parameter. Supported filters include:
vatNumber- Filter by VAT numbercountry- Filter by country code (e.g., "GB", "DE")vatNumberStatus- Filter by VAT number validation status (0=NotValidated, 1=Valid, 2=Invalid, 3=Error)businessNameStatus- Filter by business name comparison status (0=NotValidated, 1=Valid, 2=Invalid, 3=Error)businessName- Filter by business namevalidationSource- Filter by validation source ('VIES' or 'ELR')validationDate- Filter by last validation timestamp (e.g.,validationDate gt 2026-01-01)createdDate- Filter by record creation timestamp (e.g.,createdDate ge 2026-01-01)modifiedDate- Filter by record modification timestamp (e.g.,modifiedDate gt 2026-05-01T00:00:00Z)
Order results using $orderBy. Common orderings:
vatNumber ASC- Order by VAT number ascendingvalidationDate DESC- Order by most recently validated firstmodifiedDate DESC- Order by most recently modified first
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
494 495 |
# File 'lib/avatax/client/companies.rb', line 494 def list_vat_numbers(companyId, ={}) path = "/api/v2/companies/#{companyId}/vatnumbers" get(path, , AvaTax::VERSION) end |
#query_companies(options = {}) ⇒ FetchResult
Retrieve all companies
Get multiple company objects.
A company represents a single corporation or individual that is registered to handle transactional taxes.
Search for specific objects using the criteria in the $filter parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top, $skip, and $orderby parameters.
You may specify one or more of the following values in the $include parameter to fetch additional nested data, using commas to separate multiple values:
- Contacts
- Items
- Locations
- Nexus
- Settings
- TaxCodes
- TaxRules
- UPC
- Parameters
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
527 528 |
# File 'lib/avatax/client/companies.rb', line 527 def query_companies(={}) path = "/api/v2/companies" get(path, , AvaTax::VERSION) end |
#set_company_configuration(id, model) ⇒ CompanyConfigurationModel[]
Change configuration settings for this company
Update configuration settings tied to this company.
Configuration settings provide you with the ability to control features of your account and of your
tax software. The category names AvaCertServiceConfig is reserved for
Avalara internal software configuration values; to store your own company-level settings, please
create a new category name that begins with X-, for example, X-MyCustomCategory.
Company settings are permanent settings that cannot be deleted. You can set the value of a company setting to null if desired and if the particular setting supports it.
Avalara-based company settings for AvaCertServiceConfig affect your company's exemption certificate
processing, and should be changed with care.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
552 553 |
# File 'lib/avatax/client/companies.rb', line 552 def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/configuration" post(path, model, {}, AvaTax::VERSION) end |
#update_company(id, model) ⇒ Object
Update a single company
Replace the existing company object at this URL with an updated object.
A CompanyModel represents a single corporation or individual that is registered to handle transactional taxes.
All data from the existing object will be replaced with data in the object you PUT.
When calling UpdateCompany, you are permitted to update the company itself. Updates to the nested objects
such as contacts, locations, or settings are not permitted. To update the nested objects
To set a field's value to null, you may either set its value to null or omit that field from the object you PUT.
NOTE: Please do not use these blacklisted characters in company name and code: ';', '', '|'.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
576 577 |
# File 'lib/avatax/client/companies.rb', line 576 def update_company(id, model) path = "/api/v2/companies/#{id}" put(path, model, {}, AvaTax::VERSION) end |
#update_company_parameter_detail(companyId, id, model) ⇒ Object
Update a company parameter
Update a parameter of a company.
Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company.
A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
597 598 |
# File 'lib/avatax/client/companies.rb', line 597 def update_company_parameter_detail(companyId, id, model) path = "/api/v2/companies/#{companyId}/parameters/#{id}" put(path, model, {}, AvaTax::VERSION) end |
#update_vat_number(companyId, id, model) ⇒ Object
Update a single VAT Number
Replace the existing VAT number record with the data in the object you PUT.
Only vatNumber, businessName, and country fields can be updated. The
validation-related fields (vatNumberStatus, registeredBusinessName,
businessNameStatus, validationDate, validationSource) are managed by the
system and are refreshed automatically: every successful PUT re-triggers a
synchronous VAT validation against the ELR / Directory Search service (which
proxies VIES). This makes "Fix" flows work as expected — correcting an
invalid VAT number immediately updates its status.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
620 621 |
# File 'lib/avatax/client/companies.rb', line 620 def update_vat_number(companyId, id, model) path = "/api/v2/companies/#{companyId}/vatnumbers/#{id}" put(path, model, {}, AvaTax::VERSION) end |
#validate_vat_number(companyId, model) ⇒ Object
Validate a VAT Number without storing it
Performs a synchronous VAT number validation against the ELR / Directory Search service
(which proxies VIES) without persisting any record in the CustomerVatNumber table.
This is useful for UI flows that allow the user to "test" a VAT number before
deciding whether to add it. The response payload mirrors the shape returned by
the create/update endpoints, but id, createdDate, and modifiedDate are not set.
Business-name comparison is not performed here; use the create endpoint to persist
and obtain a businessNameStatus.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
641 642 |
# File 'lib/avatax/client/companies.rb', line 641 def validate_vat_number(companyId, model) path = "/api/v2/companies/#{companyId}/vatnumbers/validate" post(path, model, {}, AvaTax::VERSION) end |