Skip to main content
Avalara Help Center

Get Started with SaaS Pro - REST v2

This article applies to:

Follow the steps below to get started with Avalara for Communications REST v2.

Activate your Communications Customer Portal account

A Customer Portal account is created in both the Sandbox and Production environments.

  1. Request a Customer Portal account from your Customer Account Manager if you don't already have one.
  2. After your Customer Portal account is created, the AvaTax for Communications (AFC) Portal Account Activation email is sent.
    1. Click the Click here to activate link within the Activation email to activate your account
    2. Follow the on-screen instructions to set your password. Be mindful of the environment you are working in because your Sandbox and Production account passwords can be different.

Create a Client Profile

The AFC Tax Engine is customizable to fit your needs by creating and applying a Client Profile to REST v2.

  1. Determine if you need one or more of the following customization files:
    1. Bundle file to accurately calculate taxes on bundles transaction
    2. Exclusion file to indicate countries or states where no tax should be applied
    3. Override file to modify tax rates or tax logic
    4. Exemption file to indicate the jurisdictions, tax types, and tax levels where taxes should be exempted
    5. Nexus file to identify the jurisdictions that require you to calculate Sales and Use taxes
  2. Identify AFC Tax Engine Configuration Options:
Configuration setting Options Description
Return Non-Billable
  • False (default)
  • True
Non-billable items are compliance-only taxes or fees that are used for filing and are not passed on to the user. This option allows you to specify whether non-billable items should be included in the tax table returned by the tax calculation API functions in AFC or not.
Safe Harbor TAM Override(s)
  • Cellular TAM Override
  • VoIP TAM Override
  • Paging TAM Override
Safe Harbor TAM Override configuration settings allow traffic study values to be applied for a given session or account.

The results of percentages from a traffic study can be applied by administering traffic study TAM overrides. The TAM values for Cellular, VoIP and Paging are adjusted to reflect the percentages in the traffic study. While all all three types of TAM overrides can be set, it is possible to set only one or two of the options (Cellular, VoIP, or Paging).

Contact CommunicationSupport@avalara.com to request a new client profile for your account. A client_profile_id is provided once the customizations are applied to your account.

  • Request the configuration option updates required and any overrides, exclusions, exemptions, or bundles needed. Attach any existing customization files to the email.
  • Include instructions as to whether the client profile should be applied to Sandbox for testing purposes, Production, or both environments
  • Include the client_profile_id to be updated if changes are needed to an existing client profile
  • The account could take up to 24 hours to refresh with the new changes

Determine your api_key and run a sample transaction in Swagger

You now have the necessary items to run a test transaction in Swagger:

  • Customer Portal username
  • Customer Portal password
  • One or more client_profile_ids (if applicable)
  1. Navigate to the Communications Customer Portal.
    1. Log in to the Customer Portal with your Customer Portal username and password.
  2. Go to Apps > Developer Content to open the Swagger page.

    CustomerPortalDeveloperContent.png

  3. Verify the following:
    1. Version is v2.
    2. client_id is set to your expected Client ID. Select the appropriate client name from the Client drop down in the upper right corner of the page if the client_id is not set properly.
  4. Enter the client_profile_id in profile_id.
    1. Enter 0 or leave blank if not using a client profile
  5. Enter your Customer Portal username in email address
  6. Enter your Customer Portal password in password
  7. Click Generate api_key

    comms_rest_v2_swagger_api_key.png

    1. The api_key is now populated in api_key. Copy and save for later use.
    2. The api_key is the generated by encoding Customer Portal "username:Password" to Base64. For example, if your username is first.last@avalara.com and your password is secretpassword!, your api_key is Zmlyc3QubGFzdEBhdmFsYXJhLmNvbTpzZWNyZXRwYXNzd29yZCE=.
  8. Select and expand an endpoint. For example, expand Healthcheck > /api/v2/Healthcheck.
  9. Enter into edit mode for the endpoint by clicking Try it out.
    1. Update the request body if the selected endpoint is a POST request
    2. Learn about customizing transactions in the Communications Rest v2 Developer Guide
  10. Click Execute when ready to submit the request

    ExecuteEndpoint.png

  11. The response is returned in the Responses section. Important items to notice:
    1. A Curl statement is generated
    2. Response body details the response to your from the server
    3. Response headers shows additional details about the response
    4. The response Code is the HTML response code returned from the server

      EndpointResponseGuide.png

Download the REST Demo Application

Download the C# REST Demo Application to see how to integrate with and call the REST API.

  1. Navigate to the Avalara/Communications-Developer-Content repo on GitHub
  2. Clone the master branch of the Avalara/Communications-Developer-Content repository locally
  3. Extract the ZIP file contents and open the destination location
    1. Navigate to ..\Communications-Developer-Content-master\afc_saaspro_tax\afc_rest_apis\AfcRestDemoApp in the extracted folder
    2. Launch RestDemoApplication.exe
  4. Run sample transactions
    1. In Username, enter your Customer Portal username
    2. In Password, enter your Customer Portal password
    3. In Client ID, enter your client id
    4. In Profile ID, enter:
      • client_profile_id to use an existing client profile (if applicable)
      • 0 to use the default profile
    5. Modify the Request or simply use the transaction provided. Sample requests are found in the Communications Rest v2 Developer Guide.
    6. Click Process to run the transaction

      RESTDemoAppSimpleRequest.png

  5. Run performance tests
    1. Navigate to the Performance tab
    2. Set Max Threads and Max Run Time
    3. Click Start to start a performance test
    4. The results of the test are displayed within the Performance tab

      RESTDemoAppPerformance.png

  6. Review the C# Avalara for Communications REST Demo Application source code to prepare for integration
    1. Open the Communications-Developer-Content-master folder
    2. Navigate to ..\Communications-Developer-Content-master\afc_saaspro_tax\afc_rest_apis\AfcRestDemoSource
    3. Open RestDemoApplication.sln in Microsoft Visual Studio

Integrate with Communications REST v2

It's time to integrate your systems with Communications REST v2!

  1. You have access to two environments:
    1. Sandbox: Used for testing
    2. Production: Used for live transactions and bill runs
  2. The Communications REST v2 Developer Guide provides sample code, object reference information, endpoints, and other useful information
  3. Sample code is available in the Avalara/Communications-Developer-Content repo on GitHub
    1. Follow Steps 1-3 in Download the REST Demo Application to clone the Avalara/Communications-Developer-Content repo from GitHub
    2. Navigate to ..\Communications-Developer-Content-master\afc_saaspro_tax\afc_rest_apis. Sample code is available for the following languages:
      • C#
      • Java
      • Javascript
      • JSON
  4. Before you complete your integration, see Best Practices.

I'm in - now what?

You've made it through establishing client profiles, determining your api_key, running test transactions, and integrating Communications REST v2 with your systems. Let's dive more into the details:

 

  • Was this article helpful?