Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Avalara/SDK/api/A1099/V2/companies_w9_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
limitations under the License.

Avalara 1099 & W-9 API Definition
## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id=<your client ID> client_secret=<your client secret> ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer <access_token> ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0)
> **Note:** You must have an active Avalara 1099 & W-9 subscription to authenticate and use these APIs. If you don't have a subscription, please contact our [Sales team](https://www.avalara.com/us/en/products/1099/request-a-demo.html). ## Authentication The Avalara 1099 & W-9 API uses **Bearer Token Authentication**. To authenticate, acquire a bearer token using a **Client ID** and **Client Secret** that you generate in the Avalara 1099 & W-9 web application. The sample cURL commands below use **production** URLs. For **sandbox**, replace them with the sandbox URLs listed in the Sandbox Environment table. ### Option 1 — Client ID and Client Secret (recommended) **Step 1: Create API credentials in the Avalara 1099 & W-9 web app** For a full walkthrough, see the [Avalara 1099 & W-9 integration guide](https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/siu2796410674799/). > **Note:** To enable credential creation you must first enter a valid company address in **Account Settings > Account** and enable two-factor authentication in **Account Settings > Security**. 1. In Avalara 1099 & W-9, open **Account Settings** (gear icon, top-right of any page) and select **API**. 2. Click **Create new credentials** (a valid company address and 2FA are required). 3. Copy your **Client Id** and **Client Secret** securely — they will not be shown again after you leave the screen. **Step 2: Request a bearer token** ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{client_id}}' \\ --data-urlencode 'client_secret={{client_secret}}' ``` ### Option 2 — Account ID and License Key If your organization already uses other Avalara products (AvaTax, CertCapture) and has access to the logged-in area of Avalara.com, you can generate the bearer token using your **Account ID** and **License Key**. > **Note:** If you already have a license key for other Avalara products you can reuse it. Generating a new key will reset any previously created key. 1. Log in to Avalara.com. 2. Go to **Settings → License and API Keys**. 3. Click **Generate New Key**. 4. Note your **Account ID** from the Account menu. ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{accountId}}' \\ --data-urlencode 'client_secret={{licenseKey}}' ``` ### Using and renewing the bearer token Include the token in the `Authorization` header on every request: ```http Authorization: Bearer {access_token} ``` Tokens expire after the number of seconds in the `expires_in` field of the token response. Your integration must renew the token before it expires. **Example token response** ```json { \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI...\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"scope\": \"avatax_api iam-ds\" } ``` ### Sandbox Environment Use the same steps as production, replacing the base URLs: | Purpose | Production | Sandbox | | --- | --- | --- | | Account & License Key management (web) | `https://www.avalara.com` | `https://sandbox.admin.avalara.com` | | Account & License Key management (API) | `https://rest.avatax.com` | `https://sandbox-rest.avatax.com` | | Token generation | `https://identity.avalara.com` | `https://ai-sbx.avlr.sh` | ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0)

@author Sachin Baijal <sachin.baijal@avalara.com>
@author Jonathan Wenger <jonathan.wenger@avalara.com>
@copyright 2022 Avalara, Inc.
@license https://www.apache.org/licenses/LICENSE-2.0
@version 26.5.0
@version 26.7.0
@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK
"""

Expand Down Expand Up @@ -60,7 +60,7 @@ def __verify_api_client(self,api_client):

def __set_configuration(self, api_client):
self.__verify_api_client(api_client)
api_client.set_sdk_version("26.5.0")
api_client.set_sdk_version("26.7.0")
self.api_client = api_client

self.create_company_endpoint = _Endpoint(
Expand Down
6 changes: 3 additions & 3 deletions Avalara/SDK/api/A1099/V2/forms1099_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
limitations under the License.

Avalara 1099 & W-9 API Definition
## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id=<your client ID> client_secret=<your client secret> ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer <access_token> ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0)
> **Note:** You must have an active Avalara 1099 & W-9 subscription to authenticate and use these APIs. If you don't have a subscription, please contact our [Sales team](https://www.avalara.com/us/en/products/1099/request-a-demo.html). ## Authentication The Avalara 1099 & W-9 API uses **Bearer Token Authentication**. To authenticate, acquire a bearer token using a **Client ID** and **Client Secret** that you generate in the Avalara 1099 & W-9 web application. The sample cURL commands below use **production** URLs. For **sandbox**, replace them with the sandbox URLs listed in the Sandbox Environment table. ### Option 1 — Client ID and Client Secret (recommended) **Step 1: Create API credentials in the Avalara 1099 & W-9 web app** For a full walkthrough, see the [Avalara 1099 & W-9 integration guide](https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/siu2796410674799/). > **Note:** To enable credential creation you must first enter a valid company address in **Account Settings > Account** and enable two-factor authentication in **Account Settings > Security**. 1. In Avalara 1099 & W-9, open **Account Settings** (gear icon, top-right of any page) and select **API**. 2. Click **Create new credentials** (a valid company address and 2FA are required). 3. Copy your **Client Id** and **Client Secret** securely — they will not be shown again after you leave the screen. **Step 2: Request a bearer token** ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{client_id}}' \\ --data-urlencode 'client_secret={{client_secret}}' ``` ### Option 2 — Account ID and License Key If your organization already uses other Avalara products (AvaTax, CertCapture) and has access to the logged-in area of Avalara.com, you can generate the bearer token using your **Account ID** and **License Key**. > **Note:** If you already have a license key for other Avalara products you can reuse it. Generating a new key will reset any previously created key. 1. Log in to Avalara.com. 2. Go to **Settings → License and API Keys**. 3. Click **Generate New Key**. 4. Note your **Account ID** from the Account menu. ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{accountId}}' \\ --data-urlencode 'client_secret={{licenseKey}}' ``` ### Using and renewing the bearer token Include the token in the `Authorization` header on every request: ```http Authorization: Bearer {access_token} ``` Tokens expire after the number of seconds in the `expires_in` field of the token response. Your integration must renew the token before it expires. **Example token response** ```json { \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI...\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"scope\": \"avatax_api iam-ds\" } ``` ### Sandbox Environment Use the same steps as production, replacing the base URLs: | Purpose | Production | Sandbox | | --- | --- | --- | | Account & License Key management (web) | `https://www.avalara.com` | `https://sandbox.admin.avalara.com` | | Account & License Key management (API) | `https://rest.avatax.com` | `https://sandbox-rest.avatax.com` | | Token generation | `https://identity.avalara.com` | `https://ai-sbx.avlr.sh` | ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0)

@author Sachin Baijal <sachin.baijal@avalara.com>
@author Jonathan Wenger <jonathan.wenger@avalara.com>
@copyright 2022 Avalara, Inc.
@license https://www.apache.org/licenses/LICENSE-2.0
@version 26.5.0
@version 26.7.0
@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK
"""

Expand Down Expand Up @@ -61,7 +61,7 @@ def __verify_api_client(self,api_client):

def __set_configuration(self, api_client):
self.__verify_api_client(api_client)
api_client.set_sdk_version("26.5.0")
api_client.set_sdk_version("26.7.0")
self.api_client = api_client

self.bulk_upsert1099_forms_endpoint = _Endpoint(
Expand Down
Loading
Loading