diff --git a/Avalara/SDK/api/A1099/V2/companies_w9_api.py b/Avalara/SDK/api/A1099/V2/companies_w9_api.py index 79ca6f0..1082683 100644 --- a/Avalara/SDK/api/A1099/V2/companies_w9_api.py +++ b/Avalara/SDK/api/A1099/V2/companies_w9_api.py @@ -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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -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( diff --git a/Avalara/SDK/api/A1099/V2/forms1099_api.py b/Avalara/SDK/api/A1099/V2/forms1099_api.py index 2f1aee9..644c3a2 100644 --- a/Avalara/SDK/api/A1099/V2/forms1099_api.py +++ b/Avalara/SDK/api/A1099/V2/forms1099_api.py @@ -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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -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( diff --git a/Avalara/SDK/api/A1099/V2/forms_w9_api.py b/Avalara/SDK/api/A1099/V2/forms_w9_api.py index a54d822..3c13bd5 100644 --- a/Avalara/SDK/api/A1099/V2/forms_w9_api.py +++ b/Avalara/SDK/api/A1099/V2/forms_w9_api.py @@ -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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -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.create_and_send_w9_form_email_endpoint = _Endpoint( diff --git a/Avalara/SDK/api/A1099/V2/issuers1099_api.py b/Avalara/SDK/api/A1099/V2/issuers1099_api.py index 6cc2899..370ed10 100644 --- a/Avalara/SDK/api/A1099/V2/issuers1099_api.py +++ b/Avalara/SDK/api/A1099/V2/issuers1099_api.py @@ -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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -45,6 +45,7 @@ from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.issuer_request import IssuerRequest from Avalara.SDK.models.A1099.V2.issuer_response import IssuerResponse +from Avalara.SDK.models.A1099.V2.issuer_write_response import IssuerWriteResponse from Avalara.SDK.models.A1099.V2.paginated_query_result_model_issuer_response import PaginatedQueryResultModelIssuerResponse from Avalara.SDK.exceptions import ApiTypeError, ApiValueError, ApiException from Avalara.SDK.oauth_helper.AvalaraSdkOauthUtils import avalara_retry_oauth @@ -60,12 +61,12 @@ 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_issuer_endpoint = _Endpoint( settings={ - 'response_type': (IssuerResponse,), + 'response_type': (IssuerWriteResponse,), 'auth': [ 'bearer' ], @@ -371,7 +372,7 @@ def __set_configuration(self, api_client): ) self.update_issuer_endpoint = _Endpoint( settings={ - 'response_type': None, + 'response_type': (IssuerWriteResponse,), 'auth': [ 'bearer' ], @@ -491,7 +492,7 @@ def create_issuer( async_req (bool): execute request asynchronously Returns: - IssuerResponse + IssuerWriteResponse If the method is called asynchronously, returns the request thread. """ @@ -670,7 +671,7 @@ def get_issuers( ): """List issuers # noqa: E501 - List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. # noqa: E501 + List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, and lastName. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -746,7 +747,7 @@ def update_issuer( ): """Update an issuer # noqa: E501 - Update an issuer (also known as a Payer). # noqa: E501 + Update an issuer (also known as a Payer). When the payload violates field-level business rules, the issuer is still persisted and the response body includes a `validationErrors[]` array describing each violation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -782,7 +783,7 @@ def update_issuer( async_req (bool): execute request asynchronously Returns: - None + IssuerWriteResponse If the method is called asynchronously, returns the request thread. """ diff --git a/Avalara/SDK/api/A1099/V2/jobs_api.py b/Avalara/SDK/api/A1099/V2/jobs_api.py index 3a102d3..b077ac6 100644 --- a/Avalara/SDK/api/A1099/V2/jobs_api.py +++ b/Avalara/SDK/api/A1099/V2/jobs_api.py @@ -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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -58,7 +58,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.get_job_endpoint = _Endpoint( diff --git a/Avalara/SDK/api/A1099/V2/tin_matches_api.py b/Avalara/SDK/api/A1099/V2/tin_matches_api.py new file mode 100644 index 0000000..f058a2b --- /dev/null +++ b/Avalara/SDK/api/A1099/V2/tin_matches_api.py @@ -0,0 +1,207 @@ +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + > **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 +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 26.7.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +import re # noqa: F401 +import sys # noqa: F401 +import decimal + +from Avalara.SDK.api_client import ApiClient, Endpoint as _Endpoint +from Avalara.SDK.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.real_time_tin_match_request import RealTimeTinMatchRequest +from Avalara.SDK.models.A1099.V2.real_time_tin_match_response import RealTimeTinMatchResponse +from Avalara.SDK.exceptions import ApiTypeError, ApiValueError, ApiException +from Avalara.SDK.oauth_helper.AvalaraSdkOauthUtils import avalara_retry_oauth + +class TINMatchesApi(object): + + def __init__(self, api_client): + self.__set_configuration(api_client) + + def __verify_api_client(self,api_client): + if api_client is None: + raise ApiValueError("APIClient not defined") + + def __set_configuration(self, api_client): + self.__verify_api_client(api_client) + api_client.set_sdk_version("26.7.0") + self.api_client = api_client + + self.perform_real_time_tin_match_endpoint = _Endpoint( + settings={ + 'response_type': (RealTimeTinMatchResponse,), + 'auth': [ + 'bearer' + ], + 'endpoint_path': '/tin-matches/$real-time', + 'operation_id': 'perform_real_time_tin_match', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'avalara_version', + 'x_correlation_id', + 'x_avalara_client', + 'real_time_tin_match_request', + ], + 'required': [ + 'avalara_version', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'avalara_version': + (str,), + 'x_correlation_id': + (str,), + 'x_avalara_client': + (str,), + 'real_time_tin_match_request': + (RealTimeTinMatchRequest,), + }, + 'attribute_map': { + 'avalara_version': 'avalara-version', + 'x_correlation_id': 'X-Correlation-Id', + 'x_avalara_client': 'X-Avalara-Client', + }, + 'location_map': { + 'avalara_version': 'header', + 'x_correlation_id': 'header', + 'x_avalara_client': 'header', + 'real_time_tin_match_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'avalara-version': '2.0', + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json', + 'text/json', + 'application/*+json' + ] + }, + api_client=api_client, + required_scopes='', + microservice='A1099' + ) + + @avalara_retry_oauth(max_retry_attempts=2) + def perform_real_time_tin_match( + self, + avalara_version, + **kwargs + ): + """Perform real time TIN Match # noqa: E501 + + Perform real time TIN Match. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.perform_real_time_tin_match(avalara_version, async_req=True) + >>> result = thread.get() + + Args: + avalara_version (str): API version + + Keyword Args: + x_correlation_id (str): Unique correlation Id in a GUID format. [optional] + x_avalara_client (str): Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) .. [optional] + real_time_tin_match_request (RealTimeTinMatchRequest): Required data to perform TIN match. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + RealTimeTinMatchResponse + If the method is called asynchronously, returns the request + thread. + """ + self.__verify_api_client(self.api_client) + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['avalara_version'] = avalara_version + return self.perform_real_time_tin_match_endpoint.call_with_http_info(**kwargs) + diff --git a/Avalara/SDK/api/EInvoicing/V1/code_lists_api.py b/Avalara/SDK/api/EInvoicing/V1/code_lists_api.py index 80ec2fb..78db1de 100644 --- a/Avalara/SDK/api/EInvoicing/V1/code_lists_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/code_lists_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @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 """ @@ -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.get_code_list_endpoint = _Endpoint( diff --git a/Avalara/SDK/api/EInvoicing/V1/data_input_fields_api.py b/Avalara/SDK/api/EInvoicing/V1/data_input_fields_api.py index c5f69b3..60c5343 100644 --- a/Avalara/SDK/api/EInvoicing/V1/data_input_fields_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/data_input_fields_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @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 """ @@ -58,7 +58,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.get_data_input_fields_endpoint = _Endpoint( diff --git a/Avalara/SDK/api/EInvoicing/V1/documents_api.py b/Avalara/SDK/api/EInvoicing/V1/documents_api.py index 97ddf27..7d02c9f 100644 --- a/Avalara/SDK/api/EInvoicing/V1/documents_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/documents_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @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 """ @@ -64,7 +64,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.download_document_endpoint = _Endpoint( diff --git a/Avalara/SDK/api/EInvoicing/V1/interop_api.py b/Avalara/SDK/api/EInvoicing/V1/interop_api.py index eb0e122..565a31e 100644 --- a/Avalara/SDK/api/EInvoicing/V1/interop_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/interop_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @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 """ @@ -58,7 +58,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.submit_interop_document_endpoint = _Endpoint( diff --git a/Avalara/SDK/api/EInvoicing/V1/mandates_api.py b/Avalara/SDK/api/EInvoicing/V1/mandates_api.py index c1dae8f..b0c3862 100644 --- a/Avalara/SDK/api/EInvoicing/V1/mandates_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/mandates_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @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 """ @@ -59,7 +59,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.get_mandate_data_input_fields_endpoint = _Endpoint( diff --git a/Avalara/SDK/api/EInvoicing/V1/reports_api.py b/Avalara/SDK/api/EInvoicing/V1/reports_api.py index 6bdfced..4c82248 100644 --- a/Avalara/SDK/api/EInvoicing/V1/reports_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/reports_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @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 """ @@ -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.download_report_endpoint = _Endpoint( diff --git a/Avalara/SDK/api/EInvoicing/V1/subscriptions_api.py b/Avalara/SDK/api/EInvoicing/V1/subscriptions_api.py index 827dddd..29aae78 100644 --- a/Avalara/SDK/api/EInvoicing/V1/subscriptions_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/subscriptions_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @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 """ @@ -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.create_webhook_subscription_endpoint = _Endpoint( diff --git a/Avalara/SDK/api/EInvoicing/V1/tax_identifiers_api.py b/Avalara/SDK/api/EInvoicing/V1/tax_identifiers_api.py index 37065a8..5a13aec 100644 --- a/Avalara/SDK/api/EInvoicing/V1/tax_identifiers_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/tax_identifiers_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @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 """ @@ -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.tax_identifier_schema_by_country_endpoint = _Endpoint( diff --git a/Avalara/SDK/api/EInvoicing/V1/trading_partners_api.py b/Avalara/SDK/api/EInvoicing/V1/trading_partners_api.py index 0f3c2a1..e8f8ace 100644 --- a/Avalara/SDK/api/EInvoicing/V1/trading_partners_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/trading_partners_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @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 """ @@ -66,7 +66,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.batch_search_participants_endpoint = _Endpoint( diff --git a/Avalara/SDK/models/A1099/V2/company_base.py b/Avalara/SDK/models/A1099/V2/company_base.py index 5df8220..603dded 100644 --- a/Avalara/SDK/models/A1099/V2/company_base.py +++ b/Avalara/SDK/models/A1099/V2/company_base.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/company_request.py b/Avalara/SDK/models/A1099/V2/company_request.py index 01ceb7e..d4779e5 100644 --- a/Avalara/SDK/models/A1099/V2/company_request.py +++ b/Avalara/SDK/models/A1099/V2/company_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/company_response.py b/Avalara/SDK/models/A1099/V2/company_response.py index 6520503..e548f2f 100644 --- a/Avalara/SDK/models/A1099/V2/company_response.py +++ b/Avalara/SDK/models/A1099/V2/company_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -43,9 +43,6 @@ class CompanyResponse(BaseModel): """ CompanyResponse """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier set when the record is created.") - created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") - updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") name: Optional[StrictStr] = Field(description="Legal name. Not the DBA name.") dba_name: Optional[StrictStr] = Field(default=None, description="Doing Business As (DBA) name or continuation of a long legal name.", alias="dbaName") email: Optional[StrictStr] = Field(description="Contact email address. For inquiries by vendors/employees.") @@ -63,7 +60,10 @@ class CompanyResponse(BaseModel): resend_requests: Optional[StrictBool] = Field(default=None, description="Boolean to enable automatic reminder emails (default: false).", alias="resendRequests") resend_interval_days: Optional[StrictInt] = Field(default=None, description="Days between reminder emails (7-365, required if resendRequests is true).", alias="resendIntervalDays") max_reminder_attempts: Optional[StrictInt] = Field(default=None, description="Maximum number of reminder attempts (1-52, required if resendRequests is true).", alias="maxReminderAttempts") - __properties: ClassVar[List[str]] = ["name", "dbaName", "email", "address", "city", "state", "zip", "telephone", "tin", "referenceId", "doTinMatch", "groupName", "foreignProvince", "countryCode", "resendRequests", "resendIntervalDays", "maxReminderAttempts"] + id: Optional[StrictStr] = Field(default=None, description="Unique identifier set when the record is created.") + created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + __properties: ClassVar[List[str]] = ["name", "dbaName", "email", "address", "city", "state", "zip", "telephone", "tin", "referenceId", "doTinMatch", "groupName", "foreignProvince", "countryCode", "resendRequests", "resendIntervalDays", "maxReminderAttempts", "id", "createdAt", "updatedAt"] model_config = ConfigDict( populate_by_name=True, @@ -217,7 +217,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "countryCode": obj.get("countryCode"), "resendRequests": obj.get("resendRequests"), "resendIntervalDays": obj.get("resendIntervalDays"), - "maxReminderAttempts": obj.get("maxReminderAttempts") + "maxReminderAttempts": obj.get("maxReminderAttempts"), + "id": obj.get("id"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/covered_individual.py b/Avalara/SDK/models/A1099/V2/covered_individual.py index fb13fff..256f085 100644 --- a/Avalara/SDK/models/A1099/V2/covered_individual.py +++ b/Avalara/SDK/models/A1099/V2/covered_individual.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/create_and_send_w9_form_email_request.py b/Avalara/SDK/models/A1099/V2/create_and_send_w9_form_email_request.py index d165837..0a79f87 100644 --- a/Avalara/SDK/models/A1099/V2/create_and_send_w9_form_email_request.py +++ b/Avalara/SDK/models/A1099/V2/create_and_send_w9_form_email_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/create_company_request.py b/Avalara/SDK/models/A1099/V2/create_company_request.py index 5fc7696..baf7406 100644 --- a/Avalara/SDK/models/A1099/V2/create_company_request.py +++ b/Avalara/SDK/models/A1099/V2/create_company_request.py @@ -33,8 +33,8 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.company_create_update_request_model import CompanyCreateUpdateRequestModel -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.company_response import CompanyResponse +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.company_create_update_request_model import CompanyCreateUpdateRequestModel +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.company_response import CompanyResponse from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self diff --git a/Avalara/SDK/models/A1099/V2/create_issuer_request.py b/Avalara/SDK/models/A1099/V2/create_issuer_request.py index 8304f86..3fed027 100644 --- a/Avalara/SDK/models/A1099/V2/create_issuer_request.py +++ b/Avalara/SDK/models/A1099/V2/create_issuer_request.py @@ -33,8 +33,8 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.issuer_command import IssuerCommand -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.issuer_response import IssuerResponse +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.issuer_command import IssuerCommand +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.issuer_response import IssuerResponse from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self diff --git a/Avalara/SDK/models/A1099/V2/create_w9_form201_response.py b/Avalara/SDK/models/A1099/V2/create_w9_form201_response.py index 1a7d5bf..28c80c3 100644 --- a/Avalara/SDK/models/A1099/V2/create_w9_form201_response.py +++ b/Avalara/SDK/models/A1099/V2/create_w9_form201_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/create_w9_form_request.py b/Avalara/SDK/models/A1099/V2/create_w9_form_request.py index 9934345..630bca0 100644 --- a/Avalara/SDK/models/A1099/V2/create_w9_form_request.py +++ b/Avalara/SDK/models/A1099/V2/create_w9_form_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/entry_status_response.py b/Avalara/SDK/models/A1099/V2/entry_status_response.py index e2bc1b5..baba2b9 100644 --- a/Avalara/SDK/models/A1099/V2/entry_status_response.py +++ b/Avalara/SDK/models/A1099/V2/entry_status_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/error_response.py b/Avalara/SDK/models/A1099/V2/error_response.py index 35e999a..8d78e96 100644 --- a/Avalara/SDK/models/A1099/V2/error_response.py +++ b/Avalara/SDK/models/A1099/V2/error_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/error_response_item.py b/Avalara/SDK/models/A1099/V2/error_response_item.py index bc47414..0e0a07b 100644 --- a/Avalara/SDK/models/A1099/V2/error_response_item.py +++ b/Avalara/SDK/models/A1099/V2/error_response_item.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/form1042_s.py b/Avalara/SDK/models/A1099/V2/form1042_s.py index 0b62d37..82badf9 100644 --- a/Avalara/SDK/models/A1099/V2/form1042_s.py +++ b/Avalara/SDK/models/A1099/V2/form1042_s.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -49,7 +49,6 @@ class Form1042S(BaseModel): """ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding """ # noqa: E501 - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number", alias="tinType") unique_form_id: Optional[StrictStr] = Field(description="Unique form identifier", alias="uniqueFormId") recipient_date_of_birth: Optional[date] = Field(default=None, description="Recipient's date of birth", alias="recipientDateOfBirth") recipient_giin: Optional[StrictStr] = Field(default=None, description="Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'.", alias="recipientGiin") @@ -82,16 +81,13 @@ class Form1042S(BaseModel): tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") - recipient_name: Optional[StrictStr] = Field(description="Recipient name", alias="recipientName") - recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") address: Optional[StrictStr] = Field(description="Address.") address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") city: Optional[StrictStr] = Field(description="City.") state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") - account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") @@ -99,10 +95,8 @@ class Form1042S(BaseModel): state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") - no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") - second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") @@ -112,18 +106,20 @@ class Form1042S(BaseModel): validation_errors: Optional[List[ValidationError]] = Field(default=None, description="Validation errors", alias="validationErrors") created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + business_name: Optional[StrictStr] = Field(default=None, description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses.", alias="businessName2") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix_name: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.", alias="suffixName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "accountNumber", "officeCode", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "noTin", "addressVerification", "stateAndLocalWithholding", "secondTinNotice", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] - - @field_validator('tin_type') - def tin_type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): - raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") - return value + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt", "tinType", "businessName", "businessName2", "firstName", "middleName", "lastName", "suffixName", "recipientSecondName", "accountNumber", "officeCode", "noTin", "secondTinNotice"] @field_validator('lob_code') def lob_code_validate_enum(cls, value): @@ -212,6 +208,16 @@ def type_validate_enum(cls, value): raise ValueError("must be one of enum values ('1042-S', '1095-B', '1095-C', '1099-DIV', '1099-INT', '1099-K', '1099-MISC', '1099-NEC', '1099-R', 'W-2')") return value + @field_validator('tin_type') + def tin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN')") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -252,11 +258,9 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ - "tin_type", "id", "federal_efile_status", "state_efile_status", @@ -352,16 +356,6 @@ def to_dict(self) -> Dict[str, Any]: if self.recipient_name is None and "recipient_name" in self.model_fields_set: _dict['recipientName'] = None - # set to None if tin_type (nullable) is None - # and model_fields_set contains the field - if self.tin_type is None and "tin_type" in self.model_fields_set: - _dict['tinType'] = None - - # set to None if recipient_second_name (nullable) is None - # and model_fields_set contains the field - if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: - _dict['recipientSecondName'] = None - # set to None if address (nullable) is None # and model_fields_set contains the field if self.address is None and "address" in self.model_fields_set: @@ -392,16 +386,6 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None - # set to None if account_number (nullable) is None - # and model_fields_set contains the field - if self.account_number is None and "account_number" in self.model_fields_set: - _dict['accountNumber'] = None - - # set to None if office_code (nullable) is None - # and model_fields_set contains the field - if self.office_code is None and "office_code" in self.model_fields_set: - _dict['officeCode'] = None - # set to None if non_us_province (nullable) is None # and model_fields_set contains the field if self.non_us_province is None and "non_us_province" in self.model_fields_set: @@ -437,11 +421,6 @@ def to_dict(self) -> Dict[str, Any]: if self.tin_match is None and "tin_match" in self.model_fields_set: _dict['tinMatch'] = None - # set to None if no_tin (nullable) is None - # and model_fields_set contains the field - if self.no_tin is None and "no_tin" in self.model_fields_set: - _dict['noTin'] = None - # set to None if address_verification (nullable) is None # and model_fields_set contains the field if self.address_verification is None and "address_verification" in self.model_fields_set: @@ -452,11 +431,6 @@ def to_dict(self) -> Dict[str, Any]: if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: _dict['stateAndLocalWithholding'] = None - # set to None if second_tin_notice (nullable) is None - # and model_fields_set contains the field - if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: - _dict['secondTinNotice'] = None - # set to None if federal_efile_status (nullable) is None # and model_fields_set contains the field if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: @@ -492,6 +466,66 @@ def to_dict(self) -> Dict[str, Any]: if self.validation_errors is None and "validation_errors" in self.model_fields_set: _dict['validationErrors'] = None + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix_name (nullable) is None + # and model_fields_set contains the field + if self.suffix_name is None and "suffix_name" in self.model_fields_set: + _dict['suffixName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if no_tin (nullable) is None + # and model_fields_set contains the field + if self.no_tin is None and "no_tin" in self.model_fields_set: + _dict['noTin'] = None + + # set to None if second_tin_notice (nullable) is None + # and model_fields_set contains the field + if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: + _dict['secondTinNotice'] = None + return _dict @classmethod @@ -513,16 +547,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "referenceId": obj.get("referenceId"), "tin": obj.get("tin"), "recipientName": obj.get("recipientName"), - "tinType": obj.get("tinType"), - "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), "address2": obj.get("address2"), "city": obj.get("city"), "state": obj.get("state"), "zip": obj.get("zip"), "email": obj.get("email"), - "accountNumber": obj.get("accountNumber"), - "officeCode": obj.get("officeCode"), "nonUsProvince": obj.get("nonUsProvince"), "countryCode": obj.get("countryCode"), "federalEfileDate": obj.get("federalEfileDate"), @@ -530,10 +560,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stateEfileDate": obj.get("stateEfileDate"), "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), "tinMatch": obj.get("tinMatch"), - "noTin": obj.get("noTin"), "addressVerification": obj.get("addressVerification"), "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, - "secondTinNotice": obj.get("secondTinNotice"), "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, @@ -542,7 +570,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "eDeliveryStatus": Form1099StatusDetail.from_dict(obj["eDeliveryStatus"]) if obj.get("eDeliveryStatus") is not None else None, "validationErrors": [ValidationError.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") + "updatedAt": obj.get("updatedAt"), + "tinType": obj.get("tinType"), + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffixName": obj.get("suffixName"), + "recipientSecondName": obj.get("recipientSecondName"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "noTin": obj.get("noTin"), + "secondTinNotice": obj.get("secondTinNotice") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/Avalara/SDK/models/A1099/V2/form1095_b.py b/Avalara/SDK/models/A1099/V2/form1095_b.py index b7629b2..42e79cb 100644 --- a/Avalara/SDK/models/A1099/V2/form1095_b.py +++ b/Avalara/SDK/models/A1099/V2/form1095_b.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -63,17 +63,14 @@ class Form1095B(BaseModel): tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") - recipient_name: Optional[StrictStr] = Field(description="Recipient name", alias="recipientName") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number", alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") address: Optional[StrictStr] = Field(description="Address.") address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") city: Optional[StrictStr] = Field(description="City.") state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") - account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") @@ -81,10 +78,8 @@ class Form1095B(BaseModel): state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") - no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") - second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") @@ -95,7 +90,7 @@ class Form1095B(BaseModel): created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "accountNumber", "officeCode", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "noTin", "addressVerification", "stateAndLocalWithholding", "secondTinNotice", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] @field_validator('origin_of_health_coverage_code') def origin_of_health_coverage_code_validate_enum(cls, value): @@ -114,16 +109,6 @@ def type_validate_enum(cls, value): raise ValueError("must be one of enum values ('1042-S', '1095-B', '1095-C', '1099-DIV', '1099-INT', '1099-K', '1099-MISC', '1099-NEC', '1099-R', 'W-2')") return value - @field_validator('tin_type') - def tin_type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): - raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") - return value - model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -262,11 +247,6 @@ def to_dict(self) -> Dict[str, Any]: if self.recipient_name is None and "recipient_name" in self.model_fields_set: _dict['recipientName'] = None - # set to None if tin_type (nullable) is None - # and model_fields_set contains the field - if self.tin_type is None and "tin_type" in self.model_fields_set: - _dict['tinType'] = None - # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: @@ -302,16 +282,6 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None - # set to None if account_number (nullable) is None - # and model_fields_set contains the field - if self.account_number is None and "account_number" in self.model_fields_set: - _dict['accountNumber'] = None - - # set to None if office_code (nullable) is None - # and model_fields_set contains the field - if self.office_code is None and "office_code" in self.model_fields_set: - _dict['officeCode'] = None - # set to None if non_us_province (nullable) is None # and model_fields_set contains the field if self.non_us_province is None and "non_us_province" in self.model_fields_set: @@ -347,11 +317,6 @@ def to_dict(self) -> Dict[str, Any]: if self.tin_match is None and "tin_match" in self.model_fields_set: _dict['tinMatch'] = None - # set to None if no_tin (nullable) is None - # and model_fields_set contains the field - if self.no_tin is None and "no_tin" in self.model_fields_set: - _dict['noTin'] = None - # set to None if address_verification (nullable) is None # and model_fields_set contains the field if self.address_verification is None and "address_verification" in self.model_fields_set: @@ -362,11 +327,6 @@ def to_dict(self) -> Dict[str, Any]: if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: _dict['stateAndLocalWithholding'] = None - # set to None if second_tin_notice (nullable) is None - # and model_fields_set contains the field - if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: - _dict['secondTinNotice'] = None - # set to None if federal_efile_status (nullable) is None # and model_fields_set contains the field if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: @@ -423,7 +383,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "referenceId": obj.get("referenceId"), "tin": obj.get("tin"), "recipientName": obj.get("recipientName"), - "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), "address2": obj.get("address2"), @@ -431,8 +390,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "state": obj.get("state"), "zip": obj.get("zip"), "email": obj.get("email"), - "accountNumber": obj.get("accountNumber"), - "officeCode": obj.get("officeCode"), "nonUsProvince": obj.get("nonUsProvince"), "countryCode": obj.get("countryCode"), "federalEfileDate": obj.get("federalEfileDate"), @@ -440,10 +397,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stateEfileDate": obj.get("stateEfileDate"), "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), "tinMatch": obj.get("tinMatch"), - "noTin": obj.get("noTin"), "addressVerification": obj.get("addressVerification"), "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, - "secondTinNotice": obj.get("secondTinNotice"), "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, diff --git a/Avalara/SDK/models/A1099/V2/form1095_c.py b/Avalara/SDK/models/A1099/V2/form1095_c.py index 994e16e..da981b5 100644 --- a/Avalara/SDK/models/A1099/V2/form1095_c.py +++ b/Avalara/SDK/models/A1099/V2/form1095_c.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -66,17 +66,14 @@ class Form1095C(BaseModel): tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") - recipient_name: Optional[StrictStr] = Field(description="Recipient name", alias="recipientName") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number", alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") address: Optional[StrictStr] = Field(description="Address.") address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") city: Optional[StrictStr] = Field(description="City.") state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") - account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") @@ -84,10 +81,8 @@ class Form1095C(BaseModel): state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") - no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") - second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") @@ -98,7 +93,7 @@ class Form1095C(BaseModel): created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "accountNumber", "officeCode", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "noTin", "addressVerification", "stateAndLocalWithholding", "secondTinNotice", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] @field_validator('plan_start_month') def plan_start_month_validate_enum(cls, value): @@ -117,16 +112,6 @@ def type_validate_enum(cls, value): raise ValueError("must be one of enum values ('1042-S', '1095-B', '1095-C', '1099-DIV', '1099-INT', '1099-K', '1099-MISC', '1099-NEC', '1099-R', 'W-2')") return value - @field_validator('tin_type') - def tin_type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): - raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") - return value - model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -265,11 +250,6 @@ def to_dict(self) -> Dict[str, Any]: if self.recipient_name is None and "recipient_name" in self.model_fields_set: _dict['recipientName'] = None - # set to None if tin_type (nullable) is None - # and model_fields_set contains the field - if self.tin_type is None and "tin_type" in self.model_fields_set: - _dict['tinType'] = None - # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: @@ -305,16 +285,6 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None - # set to None if account_number (nullable) is None - # and model_fields_set contains the field - if self.account_number is None and "account_number" in self.model_fields_set: - _dict['accountNumber'] = None - - # set to None if office_code (nullable) is None - # and model_fields_set contains the field - if self.office_code is None and "office_code" in self.model_fields_set: - _dict['officeCode'] = None - # set to None if non_us_province (nullable) is None # and model_fields_set contains the field if self.non_us_province is None and "non_us_province" in self.model_fields_set: @@ -350,11 +320,6 @@ def to_dict(self) -> Dict[str, Any]: if self.tin_match is None and "tin_match" in self.model_fields_set: _dict['tinMatch'] = None - # set to None if no_tin (nullable) is None - # and model_fields_set contains the field - if self.no_tin is None and "no_tin" in self.model_fields_set: - _dict['noTin'] = None - # set to None if address_verification (nullable) is None # and model_fields_set contains the field if self.address_verification is None and "address_verification" in self.model_fields_set: @@ -365,11 +330,6 @@ def to_dict(self) -> Dict[str, Any]: if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: _dict['stateAndLocalWithholding'] = None - # set to None if second_tin_notice (nullable) is None - # and model_fields_set contains the field - if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: - _dict['secondTinNotice'] = None - # set to None if federal_efile_status (nullable) is None # and model_fields_set contains the field if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: @@ -426,7 +386,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "referenceId": obj.get("referenceId"), "tin": obj.get("tin"), "recipientName": obj.get("recipientName"), - "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), "address2": obj.get("address2"), @@ -434,8 +393,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "state": obj.get("state"), "zip": obj.get("zip"), "email": obj.get("email"), - "accountNumber": obj.get("accountNumber"), - "officeCode": obj.get("officeCode"), "nonUsProvince": obj.get("nonUsProvince"), "countryCode": obj.get("countryCode"), "federalEfileDate": obj.get("federalEfileDate"), @@ -443,10 +400,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stateEfileDate": obj.get("stateEfileDate"), "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), "tinMatch": obj.get("tinMatch"), - "noTin": obj.get("noTin"), "addressVerification": obj.get("addressVerification"), "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, - "secondTinNotice": obj.get("secondTinNotice"), "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, diff --git a/Avalara/SDK/models/A1099/V2/form1099_base.py b/Avalara/SDK/models/A1099/V2/form1099_base.py index d410636..fe02c51 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_base.py +++ b/Avalara/SDK/models/A1099/V2/form1099_base.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -55,17 +55,14 @@ class Form1099Base(BaseModel): tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") - recipient_name: Optional[StrictStr] = Field(description="Recipient name", alias="recipientName") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number", alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") address: Optional[StrictStr] = Field(description="Address.") address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") city: Optional[StrictStr] = Field(description="City.") state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") - account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") @@ -73,10 +70,8 @@ class Form1099Base(BaseModel): state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") - no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") - second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") @@ -87,7 +82,7 @@ class Form1099Base(BaseModel): created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "accountNumber", "officeCode", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "noTin", "addressVerification", "stateAndLocalWithholding", "secondTinNotice", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] @field_validator('type') def type_validate_enum(cls, value): @@ -96,16 +91,6 @@ def type_validate_enum(cls, value): raise ValueError("must be one of enum values ('1042-S', '1095-B', '1095-C', '1099-DIV', '1099-INT', '1099-K', '1099-MISC', '1099-NEC', '1099-R', 'W-2')") return value - @field_validator('tin_type') - def tin_type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): - raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") - return value - model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -244,11 +229,6 @@ def to_dict(self) -> Dict[str, Any]: if self.recipient_name is None and "recipient_name" in self.model_fields_set: _dict['recipientName'] = None - # set to None if tin_type (nullable) is None - # and model_fields_set contains the field - if self.tin_type is None and "tin_type" in self.model_fields_set: - _dict['tinType'] = None - # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: @@ -284,16 +264,6 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None - # set to None if account_number (nullable) is None - # and model_fields_set contains the field - if self.account_number is None and "account_number" in self.model_fields_set: - _dict['accountNumber'] = None - - # set to None if office_code (nullable) is None - # and model_fields_set contains the field - if self.office_code is None and "office_code" in self.model_fields_set: - _dict['officeCode'] = None - # set to None if non_us_province (nullable) is None # and model_fields_set contains the field if self.non_us_province is None and "non_us_province" in self.model_fields_set: @@ -329,11 +299,6 @@ def to_dict(self) -> Dict[str, Any]: if self.tin_match is None and "tin_match" in self.model_fields_set: _dict['tinMatch'] = None - # set to None if no_tin (nullable) is None - # and model_fields_set contains the field - if self.no_tin is None and "no_tin" in self.model_fields_set: - _dict['noTin'] = None - # set to None if address_verification (nullable) is None # and model_fields_set contains the field if self.address_verification is None and "address_verification" in self.model_fields_set: @@ -344,11 +309,6 @@ def to_dict(self) -> Dict[str, Any]: if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: _dict['stateAndLocalWithholding'] = None - # set to None if second_tin_notice (nullable) is None - # and model_fields_set contains the field - if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: - _dict['secondTinNotice'] = None - # set to None if federal_efile_status (nullable) is None # and model_fields_set contains the field if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: @@ -405,7 +365,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "referenceId": obj.get("referenceId"), "tin": obj.get("tin"), "recipientName": obj.get("recipientName"), - "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), "address2": obj.get("address2"), @@ -413,8 +372,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "state": obj.get("state"), "zip": obj.get("zip"), "email": obj.get("email"), - "accountNumber": obj.get("accountNumber"), - "officeCode": obj.get("officeCode"), "nonUsProvince": obj.get("nonUsProvince"), "countryCode": obj.get("countryCode"), "federalEfileDate": obj.get("federalEfileDate"), @@ -422,10 +379,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stateEfileDate": obj.get("stateEfileDate"), "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), "tinMatch": obj.get("tinMatch"), - "noTin": obj.get("noTin"), "addressVerification": obj.get("addressVerification"), "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, - "secondTinNotice": obj.get("secondTinNotice"), "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, diff --git a/Avalara/SDK/models/A1099/V2/form1099_div.py b/Avalara/SDK/models/A1099/V2/form1099_div.py index e229241..f5955dd 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_div.py +++ b/Avalara/SDK/models/A1099/V2/form1099_div.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -74,17 +74,13 @@ class Form1099Div(BaseModel): tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") - recipient_name: Optional[StrictStr] = Field(description="Recipient name", alias="recipientName") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number", alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") address: Optional[StrictStr] = Field(description="Address.") address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") city: Optional[StrictStr] = Field(description="City.") state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") - account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") @@ -92,10 +88,8 @@ class Form1099Div(BaseModel): state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") - no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") - second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") @@ -105,8 +99,20 @@ class Form1099Div(BaseModel): validation_errors: Optional[List[ValidationError]] = Field(default=None, description="Validation errors", alias="validationErrors") created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + business_name: Optional[StrictStr] = Field(default=None, description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses.", alias="businessName2") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix_name: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.", alias="suffixName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "accountNumber", "officeCode", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "noTin", "addressVerification", "stateAndLocalWithholding", "secondTinNotice", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt", "tinType", "businessName", "businessName2", "firstName", "middleName", "lastName", "suffixName", "recipientSecondName", "accountNumber", "officeCode", "noTin", "secondTinNotice"] @field_validator('type') def type_validate_enum(cls, value): @@ -121,8 +127,8 @@ def tin_type_validate_enum(cls, value): if value is None: return value - if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): - raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN')") return value model_config = ConfigDict( @@ -263,16 +269,6 @@ def to_dict(self) -> Dict[str, Any]: if self.recipient_name is None and "recipient_name" in self.model_fields_set: _dict['recipientName'] = None - # set to None if tin_type (nullable) is None - # and model_fields_set contains the field - if self.tin_type is None and "tin_type" in self.model_fields_set: - _dict['tinType'] = None - - # set to None if recipient_second_name (nullable) is None - # and model_fields_set contains the field - if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: - _dict['recipientSecondName'] = None - # set to None if address (nullable) is None # and model_fields_set contains the field if self.address is None and "address" in self.model_fields_set: @@ -303,16 +299,6 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None - # set to None if account_number (nullable) is None - # and model_fields_set contains the field - if self.account_number is None and "account_number" in self.model_fields_set: - _dict['accountNumber'] = None - - # set to None if office_code (nullable) is None - # and model_fields_set contains the field - if self.office_code is None and "office_code" in self.model_fields_set: - _dict['officeCode'] = None - # set to None if non_us_province (nullable) is None # and model_fields_set contains the field if self.non_us_province is None and "non_us_province" in self.model_fields_set: @@ -348,11 +334,6 @@ def to_dict(self) -> Dict[str, Any]: if self.tin_match is None and "tin_match" in self.model_fields_set: _dict['tinMatch'] = None - # set to None if no_tin (nullable) is None - # and model_fields_set contains the field - if self.no_tin is None and "no_tin" in self.model_fields_set: - _dict['noTin'] = None - # set to None if address_verification (nullable) is None # and model_fields_set contains the field if self.address_verification is None and "address_verification" in self.model_fields_set: @@ -363,11 +344,6 @@ def to_dict(self) -> Dict[str, Any]: if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: _dict['stateAndLocalWithholding'] = None - # set to None if second_tin_notice (nullable) is None - # and model_fields_set contains the field - if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: - _dict['secondTinNotice'] = None - # set to None if federal_efile_status (nullable) is None # and model_fields_set contains the field if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: @@ -403,6 +379,66 @@ def to_dict(self) -> Dict[str, Any]: if self.validation_errors is None and "validation_errors" in self.model_fields_set: _dict['validationErrors'] = None + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix_name (nullable) is None + # and model_fields_set contains the field + if self.suffix_name is None and "suffix_name" in self.model_fields_set: + _dict['suffixName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if no_tin (nullable) is None + # and model_fields_set contains the field + if self.no_tin is None and "no_tin" in self.model_fields_set: + _dict['noTin'] = None + + # set to None if second_tin_notice (nullable) is None + # and model_fields_set contains the field + if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: + _dict['secondTinNotice'] = None + return _dict @classmethod @@ -424,16 +460,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "referenceId": obj.get("referenceId"), "tin": obj.get("tin"), "recipientName": obj.get("recipientName"), - "tinType": obj.get("tinType"), - "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), "address2": obj.get("address2"), "city": obj.get("city"), "state": obj.get("state"), "zip": obj.get("zip"), "email": obj.get("email"), - "accountNumber": obj.get("accountNumber"), - "officeCode": obj.get("officeCode"), "nonUsProvince": obj.get("nonUsProvince"), "countryCode": obj.get("countryCode"), "federalEfileDate": obj.get("federalEfileDate"), @@ -441,10 +473,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stateEfileDate": obj.get("stateEfileDate"), "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), "tinMatch": obj.get("tinMatch"), - "noTin": obj.get("noTin"), "addressVerification": obj.get("addressVerification"), "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, - "secondTinNotice": obj.get("secondTinNotice"), "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, @@ -453,7 +483,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "eDeliveryStatus": Form1099StatusDetail.from_dict(obj["eDeliveryStatus"]) if obj.get("eDeliveryStatus") is not None else None, "validationErrors": [ValidationError.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") + "updatedAt": obj.get("updatedAt"), + "tinType": obj.get("tinType"), + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffixName": obj.get("suffixName"), + "recipientSecondName": obj.get("recipientSecondName"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "noTin": obj.get("noTin"), + "secondTinNotice": obj.get("secondTinNotice") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/Avalara/SDK/models/A1099/V2/form1099_int.py b/Avalara/SDK/models/A1099/V2/form1099_int.py index 4852634..d411636 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_int.py +++ b/Avalara/SDK/models/A1099/V2/form1099_int.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -70,17 +70,13 @@ class Form1099Int(BaseModel): tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") - recipient_name: Optional[StrictStr] = Field(description="Recipient name", alias="recipientName") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number", alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") address: Optional[StrictStr] = Field(description="Address.") address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") city: Optional[StrictStr] = Field(description="City.") state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") - account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") @@ -88,10 +84,8 @@ class Form1099Int(BaseModel): state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") - no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") - second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") @@ -101,8 +95,20 @@ class Form1099Int(BaseModel): validation_errors: Optional[List[ValidationError]] = Field(default=None, description="Validation errors", alias="validationErrors") created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + business_name: Optional[StrictStr] = Field(default=None, description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses.", alias="businessName2") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix_name: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.", alias="suffixName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "accountNumber", "officeCode", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "noTin", "addressVerification", "stateAndLocalWithholding", "secondTinNotice", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt", "tinType", "businessName", "businessName2", "firstName", "middleName", "lastName", "suffixName", "recipientSecondName", "accountNumber", "officeCode", "noTin", "secondTinNotice"] @field_validator('type') def type_validate_enum(cls, value): @@ -117,8 +123,8 @@ def tin_type_validate_enum(cls, value): if value is None: return value - if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): - raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN')") return value model_config = ConfigDict( @@ -259,16 +265,6 @@ def to_dict(self) -> Dict[str, Any]: if self.recipient_name is None and "recipient_name" in self.model_fields_set: _dict['recipientName'] = None - # set to None if tin_type (nullable) is None - # and model_fields_set contains the field - if self.tin_type is None and "tin_type" in self.model_fields_set: - _dict['tinType'] = None - - # set to None if recipient_second_name (nullable) is None - # and model_fields_set contains the field - if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: - _dict['recipientSecondName'] = None - # set to None if address (nullable) is None # and model_fields_set contains the field if self.address is None and "address" in self.model_fields_set: @@ -299,16 +295,6 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None - # set to None if account_number (nullable) is None - # and model_fields_set contains the field - if self.account_number is None and "account_number" in self.model_fields_set: - _dict['accountNumber'] = None - - # set to None if office_code (nullable) is None - # and model_fields_set contains the field - if self.office_code is None and "office_code" in self.model_fields_set: - _dict['officeCode'] = None - # set to None if non_us_province (nullable) is None # and model_fields_set contains the field if self.non_us_province is None and "non_us_province" in self.model_fields_set: @@ -344,11 +330,6 @@ def to_dict(self) -> Dict[str, Any]: if self.tin_match is None and "tin_match" in self.model_fields_set: _dict['tinMatch'] = None - # set to None if no_tin (nullable) is None - # and model_fields_set contains the field - if self.no_tin is None and "no_tin" in self.model_fields_set: - _dict['noTin'] = None - # set to None if address_verification (nullable) is None # and model_fields_set contains the field if self.address_verification is None and "address_verification" in self.model_fields_set: @@ -359,11 +340,6 @@ def to_dict(self) -> Dict[str, Any]: if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: _dict['stateAndLocalWithholding'] = None - # set to None if second_tin_notice (nullable) is None - # and model_fields_set contains the field - if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: - _dict['secondTinNotice'] = None - # set to None if federal_efile_status (nullable) is None # and model_fields_set contains the field if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: @@ -399,6 +375,66 @@ def to_dict(self) -> Dict[str, Any]: if self.validation_errors is None and "validation_errors" in self.model_fields_set: _dict['validationErrors'] = None + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix_name (nullable) is None + # and model_fields_set contains the field + if self.suffix_name is None and "suffix_name" in self.model_fields_set: + _dict['suffixName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if no_tin (nullable) is None + # and model_fields_set contains the field + if self.no_tin is None and "no_tin" in self.model_fields_set: + _dict['noTin'] = None + + # set to None if second_tin_notice (nullable) is None + # and model_fields_set contains the field + if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: + _dict['secondTinNotice'] = None + return _dict @classmethod @@ -420,16 +456,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "referenceId": obj.get("referenceId"), "tin": obj.get("tin"), "recipientName": obj.get("recipientName"), - "tinType": obj.get("tinType"), - "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), "address2": obj.get("address2"), "city": obj.get("city"), "state": obj.get("state"), "zip": obj.get("zip"), "email": obj.get("email"), - "accountNumber": obj.get("accountNumber"), - "officeCode": obj.get("officeCode"), "nonUsProvince": obj.get("nonUsProvince"), "countryCode": obj.get("countryCode"), "federalEfileDate": obj.get("federalEfileDate"), @@ -437,10 +469,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stateEfileDate": obj.get("stateEfileDate"), "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), "tinMatch": obj.get("tinMatch"), - "noTin": obj.get("noTin"), "addressVerification": obj.get("addressVerification"), "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, - "secondTinNotice": obj.get("secondTinNotice"), "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, @@ -449,7 +479,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "eDeliveryStatus": Form1099StatusDetail.from_dict(obj["eDeliveryStatus"]) if obj.get("eDeliveryStatus") is not None else None, "validationErrors": [ValidationError.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") + "updatedAt": obj.get("updatedAt"), + "tinType": obj.get("tinType"), + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffixName": obj.get("suffixName"), + "recipientSecondName": obj.get("recipientSecondName"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "noTin": obj.get("noTin"), + "secondTinNotice": obj.get("secondTinNotice") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/Avalara/SDK/models/A1099/V2/form1099_k.py b/Avalara/SDK/models/A1099/V2/form1099_k.py index 1d45e0c..f0080ec 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_k.py +++ b/Avalara/SDK/models/A1099/V2/form1099_k.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -75,17 +75,13 @@ class Form1099K(BaseModel): tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") - recipient_name: Optional[StrictStr] = Field(description="Recipient name", alias="recipientName") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number", alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") address: Optional[StrictStr] = Field(description="Address.") address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") city: Optional[StrictStr] = Field(description="City.") state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") - account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") @@ -93,10 +89,8 @@ class Form1099K(BaseModel): state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") - no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") - second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") @@ -106,8 +100,20 @@ class Form1099K(BaseModel): validation_errors: Optional[List[ValidationError]] = Field(default=None, description="Validation errors", alias="validationErrors") created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + business_name: Optional[StrictStr] = Field(default=None, description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses.", alias="businessName2") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix_name: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.", alias="suffixName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "accountNumber", "officeCode", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "noTin", "addressVerification", "stateAndLocalWithholding", "secondTinNotice", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt", "tinType", "businessName", "businessName2", "firstName", "middleName", "lastName", "suffixName", "recipientSecondName", "accountNumber", "officeCode", "noTin", "secondTinNotice"] @field_validator('filer_type') def filer_type_validate_enum(cls, value): @@ -142,8 +148,8 @@ def tin_type_validate_enum(cls, value): if value is None: return value - if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): - raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN')") return value model_config = ConfigDict( @@ -284,16 +290,6 @@ def to_dict(self) -> Dict[str, Any]: if self.recipient_name is None and "recipient_name" in self.model_fields_set: _dict['recipientName'] = None - # set to None if tin_type (nullable) is None - # and model_fields_set contains the field - if self.tin_type is None and "tin_type" in self.model_fields_set: - _dict['tinType'] = None - - # set to None if recipient_second_name (nullable) is None - # and model_fields_set contains the field - if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: - _dict['recipientSecondName'] = None - # set to None if address (nullable) is None # and model_fields_set contains the field if self.address is None and "address" in self.model_fields_set: @@ -324,16 +320,6 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None - # set to None if account_number (nullable) is None - # and model_fields_set contains the field - if self.account_number is None and "account_number" in self.model_fields_set: - _dict['accountNumber'] = None - - # set to None if office_code (nullable) is None - # and model_fields_set contains the field - if self.office_code is None and "office_code" in self.model_fields_set: - _dict['officeCode'] = None - # set to None if non_us_province (nullable) is None # and model_fields_set contains the field if self.non_us_province is None and "non_us_province" in self.model_fields_set: @@ -369,11 +355,6 @@ def to_dict(self) -> Dict[str, Any]: if self.tin_match is None and "tin_match" in self.model_fields_set: _dict['tinMatch'] = None - # set to None if no_tin (nullable) is None - # and model_fields_set contains the field - if self.no_tin is None and "no_tin" in self.model_fields_set: - _dict['noTin'] = None - # set to None if address_verification (nullable) is None # and model_fields_set contains the field if self.address_verification is None and "address_verification" in self.model_fields_set: @@ -384,11 +365,6 @@ def to_dict(self) -> Dict[str, Any]: if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: _dict['stateAndLocalWithholding'] = None - # set to None if second_tin_notice (nullable) is None - # and model_fields_set contains the field - if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: - _dict['secondTinNotice'] = None - # set to None if federal_efile_status (nullable) is None # and model_fields_set contains the field if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: @@ -424,6 +400,66 @@ def to_dict(self) -> Dict[str, Any]: if self.validation_errors is None and "validation_errors" in self.model_fields_set: _dict['validationErrors'] = None + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix_name (nullable) is None + # and model_fields_set contains the field + if self.suffix_name is None and "suffix_name" in self.model_fields_set: + _dict['suffixName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if no_tin (nullable) is None + # and model_fields_set contains the field + if self.no_tin is None and "no_tin" in self.model_fields_set: + _dict['noTin'] = None + + # set to None if second_tin_notice (nullable) is None + # and model_fields_set contains the field + if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: + _dict['secondTinNotice'] = None + return _dict @classmethod @@ -445,16 +481,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "referenceId": obj.get("referenceId"), "tin": obj.get("tin"), "recipientName": obj.get("recipientName"), - "tinType": obj.get("tinType"), - "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), "address2": obj.get("address2"), "city": obj.get("city"), "state": obj.get("state"), "zip": obj.get("zip"), "email": obj.get("email"), - "accountNumber": obj.get("accountNumber"), - "officeCode": obj.get("officeCode"), "nonUsProvince": obj.get("nonUsProvince"), "countryCode": obj.get("countryCode"), "federalEfileDate": obj.get("federalEfileDate"), @@ -462,10 +494,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stateEfileDate": obj.get("stateEfileDate"), "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), "tinMatch": obj.get("tinMatch"), - "noTin": obj.get("noTin"), "addressVerification": obj.get("addressVerification"), "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, - "secondTinNotice": obj.get("secondTinNotice"), "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, @@ -474,7 +504,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "eDeliveryStatus": Form1099StatusDetail.from_dict(obj["eDeliveryStatus"]) if obj.get("eDeliveryStatus") is not None else None, "validationErrors": [ValidationError.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") + "updatedAt": obj.get("updatedAt"), + "tinType": obj.get("tinType"), + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffixName": obj.get("suffixName"), + "recipientSecondName": obj.get("recipientSecondName"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "noTin": obj.get("noTin"), + "secondTinNotice": obj.get("secondTinNotice") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/Avalara/SDK/models/A1099/V2/form1099_list_request.py b/Avalara/SDK/models/A1099/V2/form1099_list_request.py index 46e1ed0..0c7d55b 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_list_request.py +++ b/Avalara/SDK/models/A1099/V2/form1099_list_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/form1099_misc.py b/Avalara/SDK/models/A1099/V2/form1099_misc.py index 6232621..e0d92a8 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_misc.py +++ b/Avalara/SDK/models/A1099/V2/form1099_misc.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -70,17 +70,13 @@ class Form1099Misc(BaseModel): tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") - recipient_name: Optional[StrictStr] = Field(description="Recipient name", alias="recipientName") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number", alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") address: Optional[StrictStr] = Field(description="Address.") address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") city: Optional[StrictStr] = Field(description="City.") state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") - account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") @@ -88,10 +84,8 @@ class Form1099Misc(BaseModel): state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") - no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") - second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") @@ -101,8 +95,20 @@ class Form1099Misc(BaseModel): validation_errors: Optional[List[ValidationError]] = Field(default=None, description="Validation errors", alias="validationErrors") created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + business_name: Optional[StrictStr] = Field(default=None, description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses.", alias="businessName2") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix_name: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.", alias="suffixName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "accountNumber", "officeCode", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "noTin", "addressVerification", "stateAndLocalWithholding", "secondTinNotice", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt", "tinType", "businessName", "businessName2", "firstName", "middleName", "lastName", "suffixName", "recipientSecondName", "accountNumber", "officeCode", "noTin", "secondTinNotice"] @field_validator('type') def type_validate_enum(cls, value): @@ -117,8 +123,8 @@ def tin_type_validate_enum(cls, value): if value is None: return value - if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): - raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN')") return value model_config = ConfigDict( @@ -259,16 +265,6 @@ def to_dict(self) -> Dict[str, Any]: if self.recipient_name is None and "recipient_name" in self.model_fields_set: _dict['recipientName'] = None - # set to None if tin_type (nullable) is None - # and model_fields_set contains the field - if self.tin_type is None and "tin_type" in self.model_fields_set: - _dict['tinType'] = None - - # set to None if recipient_second_name (nullable) is None - # and model_fields_set contains the field - if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: - _dict['recipientSecondName'] = None - # set to None if address (nullable) is None # and model_fields_set contains the field if self.address is None and "address" in self.model_fields_set: @@ -299,16 +295,6 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None - # set to None if account_number (nullable) is None - # and model_fields_set contains the field - if self.account_number is None and "account_number" in self.model_fields_set: - _dict['accountNumber'] = None - - # set to None if office_code (nullable) is None - # and model_fields_set contains the field - if self.office_code is None and "office_code" in self.model_fields_set: - _dict['officeCode'] = None - # set to None if non_us_province (nullable) is None # and model_fields_set contains the field if self.non_us_province is None and "non_us_province" in self.model_fields_set: @@ -344,11 +330,6 @@ def to_dict(self) -> Dict[str, Any]: if self.tin_match is None and "tin_match" in self.model_fields_set: _dict['tinMatch'] = None - # set to None if no_tin (nullable) is None - # and model_fields_set contains the field - if self.no_tin is None and "no_tin" in self.model_fields_set: - _dict['noTin'] = None - # set to None if address_verification (nullable) is None # and model_fields_set contains the field if self.address_verification is None and "address_verification" in self.model_fields_set: @@ -359,11 +340,6 @@ def to_dict(self) -> Dict[str, Any]: if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: _dict['stateAndLocalWithholding'] = None - # set to None if second_tin_notice (nullable) is None - # and model_fields_set contains the field - if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: - _dict['secondTinNotice'] = None - # set to None if federal_efile_status (nullable) is None # and model_fields_set contains the field if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: @@ -399,6 +375,66 @@ def to_dict(self) -> Dict[str, Any]: if self.validation_errors is None and "validation_errors" in self.model_fields_set: _dict['validationErrors'] = None + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix_name (nullable) is None + # and model_fields_set contains the field + if self.suffix_name is None and "suffix_name" in self.model_fields_set: + _dict['suffixName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if no_tin (nullable) is None + # and model_fields_set contains the field + if self.no_tin is None and "no_tin" in self.model_fields_set: + _dict['noTin'] = None + + # set to None if second_tin_notice (nullable) is None + # and model_fields_set contains the field + if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: + _dict['secondTinNotice'] = None + return _dict @classmethod @@ -420,16 +456,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "referenceId": obj.get("referenceId"), "tin": obj.get("tin"), "recipientName": obj.get("recipientName"), - "tinType": obj.get("tinType"), - "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), "address2": obj.get("address2"), "city": obj.get("city"), "state": obj.get("state"), "zip": obj.get("zip"), "email": obj.get("email"), - "accountNumber": obj.get("accountNumber"), - "officeCode": obj.get("officeCode"), "nonUsProvince": obj.get("nonUsProvince"), "countryCode": obj.get("countryCode"), "federalEfileDate": obj.get("federalEfileDate"), @@ -437,10 +469,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stateEfileDate": obj.get("stateEfileDate"), "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), "tinMatch": obj.get("tinMatch"), - "noTin": obj.get("noTin"), "addressVerification": obj.get("addressVerification"), "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, - "secondTinNotice": obj.get("secondTinNotice"), "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, @@ -449,7 +479,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "eDeliveryStatus": Form1099StatusDetail.from_dict(obj["eDeliveryStatus"]) if obj.get("eDeliveryStatus") is not None else None, "validationErrors": [ValidationError.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") + "updatedAt": obj.get("updatedAt"), + "tinType": obj.get("tinType"), + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffixName": obj.get("suffixName"), + "recipientSecondName": obj.get("recipientSecondName"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "noTin": obj.get("noTin"), + "secondTinNotice": obj.get("secondTinNotice") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/Avalara/SDK/models/A1099/V2/form1099_nec.py b/Avalara/SDK/models/A1099/V2/form1099_nec.py index f6038f2..318f9d7 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_nec.py +++ b/Avalara/SDK/models/A1099/V2/form1099_nec.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -59,17 +59,13 @@ class Form1099Nec(BaseModel): tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") - recipient_name: Optional[StrictStr] = Field(description="Recipient name", alias="recipientName") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number", alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") address: Optional[StrictStr] = Field(description="Address.") address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") city: Optional[StrictStr] = Field(description="City.") state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") - account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") @@ -77,10 +73,8 @@ class Form1099Nec(BaseModel): state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") - no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") - second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") @@ -90,8 +84,20 @@ class Form1099Nec(BaseModel): validation_errors: Optional[List[ValidationError]] = Field(default=None, description="Validation errors", alias="validationErrors") created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + business_name: Optional[StrictStr] = Field(default=None, description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses.", alias="businessName2") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix_name: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.", alias="suffixName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "accountNumber", "officeCode", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "noTin", "addressVerification", "stateAndLocalWithholding", "secondTinNotice", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt", "tinType", "businessName", "businessName2", "firstName", "middleName", "lastName", "suffixName", "recipientSecondName", "accountNumber", "officeCode", "noTin", "secondTinNotice"] @field_validator('type') def type_validate_enum(cls, value): @@ -106,8 +112,8 @@ def tin_type_validate_enum(cls, value): if value is None: return value - if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): - raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN')") return value model_config = ConfigDict( @@ -248,16 +254,6 @@ def to_dict(self) -> Dict[str, Any]: if self.recipient_name is None and "recipient_name" in self.model_fields_set: _dict['recipientName'] = None - # set to None if tin_type (nullable) is None - # and model_fields_set contains the field - if self.tin_type is None and "tin_type" in self.model_fields_set: - _dict['tinType'] = None - - # set to None if recipient_second_name (nullable) is None - # and model_fields_set contains the field - if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: - _dict['recipientSecondName'] = None - # set to None if address (nullable) is None # and model_fields_set contains the field if self.address is None and "address" in self.model_fields_set: @@ -288,16 +284,6 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None - # set to None if account_number (nullable) is None - # and model_fields_set contains the field - if self.account_number is None and "account_number" in self.model_fields_set: - _dict['accountNumber'] = None - - # set to None if office_code (nullable) is None - # and model_fields_set contains the field - if self.office_code is None and "office_code" in self.model_fields_set: - _dict['officeCode'] = None - # set to None if non_us_province (nullable) is None # and model_fields_set contains the field if self.non_us_province is None and "non_us_province" in self.model_fields_set: @@ -333,11 +319,6 @@ def to_dict(self) -> Dict[str, Any]: if self.tin_match is None and "tin_match" in self.model_fields_set: _dict['tinMatch'] = None - # set to None if no_tin (nullable) is None - # and model_fields_set contains the field - if self.no_tin is None and "no_tin" in self.model_fields_set: - _dict['noTin'] = None - # set to None if address_verification (nullable) is None # and model_fields_set contains the field if self.address_verification is None and "address_verification" in self.model_fields_set: @@ -348,11 +329,6 @@ def to_dict(self) -> Dict[str, Any]: if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: _dict['stateAndLocalWithholding'] = None - # set to None if second_tin_notice (nullable) is None - # and model_fields_set contains the field - if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: - _dict['secondTinNotice'] = None - # set to None if federal_efile_status (nullable) is None # and model_fields_set contains the field if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: @@ -388,6 +364,66 @@ def to_dict(self) -> Dict[str, Any]: if self.validation_errors is None and "validation_errors" in self.model_fields_set: _dict['validationErrors'] = None + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix_name (nullable) is None + # and model_fields_set contains the field + if self.suffix_name is None and "suffix_name" in self.model_fields_set: + _dict['suffixName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if no_tin (nullable) is None + # and model_fields_set contains the field + if self.no_tin is None and "no_tin" in self.model_fields_set: + _dict['noTin'] = None + + # set to None if second_tin_notice (nullable) is None + # and model_fields_set contains the field + if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: + _dict['secondTinNotice'] = None + return _dict @classmethod @@ -409,16 +445,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "referenceId": obj.get("referenceId"), "tin": obj.get("tin"), "recipientName": obj.get("recipientName"), - "tinType": obj.get("tinType"), - "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), "address2": obj.get("address2"), "city": obj.get("city"), "state": obj.get("state"), "zip": obj.get("zip"), "email": obj.get("email"), - "accountNumber": obj.get("accountNumber"), - "officeCode": obj.get("officeCode"), "nonUsProvince": obj.get("nonUsProvince"), "countryCode": obj.get("countryCode"), "federalEfileDate": obj.get("federalEfileDate"), @@ -426,10 +458,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stateEfileDate": obj.get("stateEfileDate"), "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), "tinMatch": obj.get("tinMatch"), - "noTin": obj.get("noTin"), "addressVerification": obj.get("addressVerification"), "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, - "secondTinNotice": obj.get("secondTinNotice"), "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, @@ -438,7 +468,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "eDeliveryStatus": Form1099StatusDetail.from_dict(obj["eDeliveryStatus"]) if obj.get("eDeliveryStatus") is not None else None, "validationErrors": [ValidationError.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") + "updatedAt": obj.get("updatedAt"), + "tinType": obj.get("tinType"), + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffixName": obj.get("suffixName"), + "recipientSecondName": obj.get("recipientSecondName"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "noTin": obj.get("noTin"), + "secondTinNotice": obj.get("secondTinNotice") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/Avalara/SDK/models/A1099/V2/form1099_r.py b/Avalara/SDK/models/A1099/V2/form1099_r.py index e5ae6b5..85c2de8 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_r.py +++ b/Avalara/SDK/models/A1099/V2/form1099_r.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -75,17 +75,13 @@ class Form1099R(BaseModel): tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") - recipient_name: Optional[StrictStr] = Field(description="Recipient name", alias="recipientName") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number", alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") address: Optional[StrictStr] = Field(description="Address.") address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") city: Optional[StrictStr] = Field(description="City.") state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") - account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") @@ -93,10 +89,8 @@ class Form1099R(BaseModel): state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") - no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") - second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") @@ -106,8 +100,20 @@ class Form1099R(BaseModel): validation_errors: Optional[List[ValidationError]] = Field(default=None, description="Validation errors", alias="validationErrors") created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + business_name: Optional[StrictStr] = Field(default=None, description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses.", alias="businessName2") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix_name: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.", alias="suffixName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "accountNumber", "officeCode", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "noTin", "addressVerification", "stateAndLocalWithholding", "secondTinNotice", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt", "tinType", "businessName", "businessName2", "firstName", "middleName", "lastName", "suffixName", "recipientSecondName", "accountNumber", "officeCode", "noTin", "secondTinNotice"] @field_validator('distribution_code') def distribution_code_validate_enum(cls, value): @@ -142,8 +148,8 @@ def tin_type_validate_enum(cls, value): if value is None: return value - if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): - raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN')") return value model_config = ConfigDict( @@ -284,16 +290,6 @@ def to_dict(self) -> Dict[str, Any]: if self.recipient_name is None and "recipient_name" in self.model_fields_set: _dict['recipientName'] = None - # set to None if tin_type (nullable) is None - # and model_fields_set contains the field - if self.tin_type is None and "tin_type" in self.model_fields_set: - _dict['tinType'] = None - - # set to None if recipient_second_name (nullable) is None - # and model_fields_set contains the field - if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: - _dict['recipientSecondName'] = None - # set to None if address (nullable) is None # and model_fields_set contains the field if self.address is None and "address" in self.model_fields_set: @@ -324,16 +320,6 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None - # set to None if account_number (nullable) is None - # and model_fields_set contains the field - if self.account_number is None and "account_number" in self.model_fields_set: - _dict['accountNumber'] = None - - # set to None if office_code (nullable) is None - # and model_fields_set contains the field - if self.office_code is None and "office_code" in self.model_fields_set: - _dict['officeCode'] = None - # set to None if non_us_province (nullable) is None # and model_fields_set contains the field if self.non_us_province is None and "non_us_province" in self.model_fields_set: @@ -369,11 +355,6 @@ def to_dict(self) -> Dict[str, Any]: if self.tin_match is None and "tin_match" in self.model_fields_set: _dict['tinMatch'] = None - # set to None if no_tin (nullable) is None - # and model_fields_set contains the field - if self.no_tin is None and "no_tin" in self.model_fields_set: - _dict['noTin'] = None - # set to None if address_verification (nullable) is None # and model_fields_set contains the field if self.address_verification is None and "address_verification" in self.model_fields_set: @@ -384,11 +365,6 @@ def to_dict(self) -> Dict[str, Any]: if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: _dict['stateAndLocalWithholding'] = None - # set to None if second_tin_notice (nullable) is None - # and model_fields_set contains the field - if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: - _dict['secondTinNotice'] = None - # set to None if federal_efile_status (nullable) is None # and model_fields_set contains the field if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: @@ -424,6 +400,66 @@ def to_dict(self) -> Dict[str, Any]: if self.validation_errors is None and "validation_errors" in self.model_fields_set: _dict['validationErrors'] = None + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix_name (nullable) is None + # and model_fields_set contains the field + if self.suffix_name is None and "suffix_name" in self.model_fields_set: + _dict['suffixName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if no_tin (nullable) is None + # and model_fields_set contains the field + if self.no_tin is None and "no_tin" in self.model_fields_set: + _dict['noTin'] = None + + # set to None if second_tin_notice (nullable) is None + # and model_fields_set contains the field + if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: + _dict['secondTinNotice'] = None + return _dict @classmethod @@ -445,16 +481,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "referenceId": obj.get("referenceId"), "tin": obj.get("tin"), "recipientName": obj.get("recipientName"), - "tinType": obj.get("tinType"), - "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), "address2": obj.get("address2"), "city": obj.get("city"), "state": obj.get("state"), "zip": obj.get("zip"), "email": obj.get("email"), - "accountNumber": obj.get("accountNumber"), - "officeCode": obj.get("officeCode"), "nonUsProvince": obj.get("nonUsProvince"), "countryCode": obj.get("countryCode"), "federalEfileDate": obj.get("federalEfileDate"), @@ -462,10 +494,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stateEfileDate": obj.get("stateEfileDate"), "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), "tinMatch": obj.get("tinMatch"), - "noTin": obj.get("noTin"), "addressVerification": obj.get("addressVerification"), "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, - "secondTinNotice": obj.get("secondTinNotice"), "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, @@ -474,7 +504,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "eDeliveryStatus": Form1099StatusDetail.from_dict(obj["eDeliveryStatus"]) if obj.get("eDeliveryStatus") is not None else None, "validationErrors": [ValidationError.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") + "updatedAt": obj.get("updatedAt"), + "tinType": obj.get("tinType"), + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffixName": obj.get("suffixName"), + "recipientSecondName": obj.get("recipientSecondName"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "noTin": obj.get("noTin"), + "secondTinNotice": obj.get("secondTinNotice") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/Avalara/SDK/models/A1099/V2/form1099_status_detail.py b/Avalara/SDK/models/A1099/V2/form1099_status_detail.py index 380d850..dbe6f39 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_status_detail.py +++ b/Avalara/SDK/models/A1099/V2/form1099_status_detail.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/form1099_w2.py b/Avalara/SDK/models/A1099/V2/form1099_w2.py index 4d85af8..79c94f1 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_w2.py +++ b/Avalara/SDK/models/A1099/V2/form1099_w2.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -86,17 +86,13 @@ class Form1099W2(BaseModel): tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") - recipient_name: Optional[StrictStr] = Field(description="Recipient name", alias="recipientName") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number", alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") address: Optional[StrictStr] = Field(description="Address.") address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") city: Optional[StrictStr] = Field(description="City.") state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") - account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") @@ -104,10 +100,8 @@ class Form1099W2(BaseModel): state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") - no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") - second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") @@ -117,8 +111,20 @@ class Form1099W2(BaseModel): validation_errors: Optional[List[ValidationError]] = Field(default=None, description="Validation errors", alias="validationErrors") created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + business_name: Optional[StrictStr] = Field(default=None, description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses.", alias="businessName2") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix_name: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.", alias="suffixName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "email", "accountNumber", "officeCode", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "noTin", "addressVerification", "stateAndLocalWithholding", "secondTinNotice", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt", "tinType", "businessName", "businessName2", "firstName", "middleName", "lastName", "suffixName", "recipientSecondName", "accountNumber", "officeCode", "noTin", "secondTinNotice"] @field_validator('type') def type_validate_enum(cls, value): @@ -133,8 +139,8 @@ def tin_type_validate_enum(cls, value): if value is None: return value - if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): - raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN')") return value model_config = ConfigDict( @@ -275,16 +281,6 @@ def to_dict(self) -> Dict[str, Any]: if self.recipient_name is None and "recipient_name" in self.model_fields_set: _dict['recipientName'] = None - # set to None if tin_type (nullable) is None - # and model_fields_set contains the field - if self.tin_type is None and "tin_type" in self.model_fields_set: - _dict['tinType'] = None - - # set to None if recipient_second_name (nullable) is None - # and model_fields_set contains the field - if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: - _dict['recipientSecondName'] = None - # set to None if address (nullable) is None # and model_fields_set contains the field if self.address is None and "address" in self.model_fields_set: @@ -315,16 +311,6 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None - # set to None if account_number (nullable) is None - # and model_fields_set contains the field - if self.account_number is None and "account_number" in self.model_fields_set: - _dict['accountNumber'] = None - - # set to None if office_code (nullable) is None - # and model_fields_set contains the field - if self.office_code is None and "office_code" in self.model_fields_set: - _dict['officeCode'] = None - # set to None if non_us_province (nullable) is None # and model_fields_set contains the field if self.non_us_province is None and "non_us_province" in self.model_fields_set: @@ -360,11 +346,6 @@ def to_dict(self) -> Dict[str, Any]: if self.tin_match is None and "tin_match" in self.model_fields_set: _dict['tinMatch'] = None - # set to None if no_tin (nullable) is None - # and model_fields_set contains the field - if self.no_tin is None and "no_tin" in self.model_fields_set: - _dict['noTin'] = None - # set to None if address_verification (nullable) is None # and model_fields_set contains the field if self.address_verification is None and "address_verification" in self.model_fields_set: @@ -375,11 +356,6 @@ def to_dict(self) -> Dict[str, Any]: if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: _dict['stateAndLocalWithholding'] = None - # set to None if second_tin_notice (nullable) is None - # and model_fields_set contains the field - if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: - _dict['secondTinNotice'] = None - # set to None if federal_efile_status (nullable) is None # and model_fields_set contains the field if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: @@ -415,6 +391,66 @@ def to_dict(self) -> Dict[str, Any]: if self.validation_errors is None and "validation_errors" in self.model_fields_set: _dict['validationErrors'] = None + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix_name (nullable) is None + # and model_fields_set contains the field + if self.suffix_name is None and "suffix_name" in self.model_fields_set: + _dict['suffixName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if no_tin (nullable) is None + # and model_fields_set contains the field + if self.no_tin is None and "no_tin" in self.model_fields_set: + _dict['noTin'] = None + + # set to None if second_tin_notice (nullable) is None + # and model_fields_set contains the field + if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: + _dict['secondTinNotice'] = None + return _dict @classmethod @@ -436,16 +472,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "referenceId": obj.get("referenceId"), "tin": obj.get("tin"), "recipientName": obj.get("recipientName"), - "tinType": obj.get("tinType"), - "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), "address2": obj.get("address2"), "city": obj.get("city"), "state": obj.get("state"), "zip": obj.get("zip"), "email": obj.get("email"), - "accountNumber": obj.get("accountNumber"), - "officeCode": obj.get("officeCode"), "nonUsProvince": obj.get("nonUsProvince"), "countryCode": obj.get("countryCode"), "federalEfileDate": obj.get("federalEfileDate"), @@ -453,10 +485,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "stateEfileDate": obj.get("stateEfileDate"), "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), "tinMatch": obj.get("tinMatch"), - "noTin": obj.get("noTin"), "addressVerification": obj.get("addressVerification"), "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, - "secondTinNotice": obj.get("secondTinNotice"), "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, @@ -465,7 +495,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "eDeliveryStatus": Form1099StatusDetail.from_dict(obj["eDeliveryStatus"]) if obj.get("eDeliveryStatus") is not None else None, "validationErrors": [ValidationError.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") + "updatedAt": obj.get("updatedAt"), + "tinType": obj.get("tinType"), + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffixName": obj.get("suffixName"), + "recipientSecondName": obj.get("recipientSecondName"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "noTin": obj.get("noTin"), + "secondTinNotice": obj.get("secondTinNotice") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/Avalara/SDK/models/A1099/V2/get1099_form200_response.py b/Avalara/SDK/models/A1099/V2/get1099_form200_response.py index f83fbdb..d650970 100644 --- a/Avalara/SDK/models/A1099/V2/get1099_form200_response.py +++ b/Avalara/SDK/models/A1099/V2/get1099_form200_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/get_issuer200_response.py b/Avalara/SDK/models/A1099/V2/get_issuer200_response.py new file mode 100644 index 0000000..7fc6735 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/get_issuer200_response.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + > **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 +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 26.7.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from Avalara.SDK.models.A1099.V2.A1099.V2.issuer_response import IssuerResponse +from Avalara.SDK.models.A1099.V2.A1099.V2.issuer_write_response import IssuerWriteResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +GETISSUER200RESPONSE_ONE_OF_SCHEMAS = ["IssuerResponse", "IssuerWriteResponse"] + +class GetIssuer200Response(BaseModel): + """ + GetIssuer200Response + """ + # data type: IssuerResponse + oneof_schema_1_validator: Optional[IssuerResponse] = None + # data type: IssuerWriteResponse + oneof_schema_2_validator: Optional[IssuerWriteResponse] = None + actual_instance: Optional[Union[IssuerResponse, IssuerWriteResponse]] = None + one_of_schemas: Set[str] = { "IssuerResponse", "IssuerWriteResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = GetIssuer200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: IssuerResponse + if not isinstance(v, IssuerResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `IssuerResponse`") + else: + match += 1 + # validate data type: IssuerWriteResponse + if not isinstance(v, IssuerWriteResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `IssuerWriteResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in GetIssuer200Response with oneOf schemas: IssuerResponse, IssuerWriteResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in GetIssuer200Response with oneOf schemas: IssuerResponse, IssuerWriteResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IssuerResponse + try: + instance.actual_instance = IssuerResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into IssuerWriteResponse + try: + instance.actual_instance = IssuerWriteResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into GetIssuer200Response with oneOf schemas: IssuerResponse, IssuerWriteResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into GetIssuer200Response with oneOf schemas: IssuerResponse, IssuerWriteResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IssuerResponse, IssuerWriteResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through.py b/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through.py index 6a7894a..1b48d85 100644 --- a/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through.py +++ b/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/iris_form_base.py b/Avalara/SDK/models/A1099/V2/iris_form_base.py new file mode 100644 index 0000000..1015b84 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/iris_form_base.py @@ -0,0 +1,475 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + > **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 +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 26.7.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import date, datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.A1099.V2.form1099_status_detail import Form1099StatusDetail +from Avalara.SDK.models.A1099.V2.state_and_local_withholding import StateAndLocalWithholding +from Avalara.SDK.models.A1099.V2.state_efile_status_detail import StateEfileStatusDetail +from Avalara.SDK.models.A1099.V2.validation_error import ValidationError +from typing import Optional, Set +from typing_extensions import Self + +class IrisFormBase(BaseModel): + """ + IrisFormBase + """ # noqa: E501 + type: StrictStr = Field(description="Form type.") + id: Optional[StrictStr] = Field(default=None, description="Form ID. Unique identifier set when the record is created.") + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID - only required when creating forms", alias="issuerId") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID - only required when creating forms via $bulk-upsert", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN - readonly", alias="issuerTin") + tax_year: Optional[StrictInt] = Field(default=None, description="Tax Year - only required when creating forms via $bulk-upsert", alias="taxYear") + reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient.", alias="referenceId") + tin: Optional[StrictStr] = Field(default=None, description="Recipient's Federal Tax Identification Number (TIN).") + recipient_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals.", alias="recipientName") + address: Optional[StrictStr] = Field(description="Address.") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2.") + city: Optional[StrictStr] = Field(description="City.") + state: Optional[StrictStr] = Field(default=None, description="Two-letter US state or Canadian province code (required for US/CA addresses).") + zip: Optional[StrictStr] = Field(default=None, description="ZIP/postal code.") + email: Optional[StrictStr] = Field(default=None, description="Recipient's Contact email address.") + non_us_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="nonUsProvince") + country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.", alias="countryCode") + federal_efile_date: Optional[date] = Field(default=None, description="Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="federalEfileDate") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_efile_date: Optional[date] = Field(default=None, description="Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="stateEfileDate") + recipient_edelivery_date: Optional[date] = Field(default=None, description="Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.", alias="recipientEdeliveryDate") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholding] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + federal_efile_status: Optional[Form1099StatusDetail] = Field(default=None, description="Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)", alias="federalEfileStatus") + state_efile_status: Optional[List[StateEfileStatusDetail]] = Field(default=None, description="State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state", alias="stateEfileStatus") + postal_mail_status: Optional[Form1099StatusDetail] = Field(default=None, description="Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered", alias="postalMailStatus") + tin_match_status: Optional[Form1099StatusDetail] = Field(default=None, description="TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued", alias="tinMatchStatus") + address_verification_status: Optional[Form1099StatusDetail] = Field(default=None, description="Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted", alias="addressVerificationStatus") + e_delivery_status: Optional[Form1099StatusDetail] = Field(default=None, description="EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)", alias="eDeliveryStatus") + validation_errors: Optional[List[ValidationError]] = Field(default=None, description="Validation errors", alias="validationErrors") + created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + business_name: Optional[StrictStr] = Field(default=None, description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses.", alias="businessName2") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix_name: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.", alias="suffixName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Use `businessName2` instead.", alias="recipientSecondName") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") + __properties: ClassVar[List[str]] = ["type", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "tin", "recipientName", "address", "address2", "city", "state", "zip", "email", "nonUsProvince", "countryCode", "federalEfileDate", "postalMail", "stateEfileDate", "recipientEdeliveryDate", "tinMatch", "addressVerification", "stateAndLocalWithholding", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "eDeliveryStatus", "validationErrors", "createdAt", "updatedAt", "tinType", "businessName", "businessName2", "firstName", "middleName", "lastName", "suffixName", "recipientSecondName", "accountNumber", "officeCode", "noTin", "secondTinNotice"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1042-S', '1095-B', '1095-C', '1099-DIV', '1099-INT', '1099-K', '1099-MISC', '1099-NEC', '1099-R', 'W-2']): + raise ValueError("must be one of enum values ('1042-S', '1095-B', '1095-C', '1099-DIV', '1099-INT', '1099-K', '1099-MISC', '1099-NEC', '1099-R', 'W-2')") + return value + + @field_validator('tin_type') + def tin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN', 'INDIVIDUAL', 'BUSINESS', 'UNKNOWN')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IrisFormBase from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "federal_efile_status", + "state_efile_status", + "postal_mail_status", + "tin_match_status", + "address_verification_status", + "e_delivery_status", + "validation_errors", + "created_at", + "updated_at", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of state_and_local_withholding + if self.state_and_local_withholding: + _dict['stateAndLocalWithholding'] = self.state_and_local_withholding.to_dict() + # override the default output from pydantic by calling `to_dict()` of federal_efile_status + if self.federal_efile_status: + _dict['federalEfileStatus'] = self.federal_efile_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in state_efile_status (list) + _items = [] + if self.state_efile_status: + for _item in self.state_efile_status: + if _item: + _items.append(_item.to_dict()) + _dict['stateEfileStatus'] = _items + # override the default output from pydantic by calling `to_dict()` of postal_mail_status + if self.postal_mail_status: + _dict['postalMailStatus'] = self.postal_mail_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of tin_match_status + if self.tin_match_status: + _dict['tinMatchStatus'] = self.tin_match_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of address_verification_status + if self.address_verification_status: + _dict['addressVerificationStatus'] = self.address_verification_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of e_delivery_status + if self.e_delivery_status: + _dict['eDeliveryStatus'] = self.e_delivery_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in validation_errors (list) + _items = [] + if self.validation_errors: + for _item in self.validation_errors: + if _item: + _items.append(_item.to_dict()) + _dict['validationErrors'] = _items + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if issuer_id (nullable) is None + # and model_fields_set contains the field + if self.issuer_id is None and "issuer_id" in self.model_fields_set: + _dict['issuerId'] = None + + # set to None if issuer_reference_id (nullable) is None + # and model_fields_set contains the field + if self.issuer_reference_id is None and "issuer_reference_id" in self.model_fields_set: + _dict['issuerReferenceId'] = None + + # set to None if issuer_tin (nullable) is None + # and model_fields_set contains the field + if self.issuer_tin is None and "issuer_tin" in self.model_fields_set: + _dict['issuerTin'] = None + + # set to None if tax_year (nullable) is None + # and model_fields_set contains the field + if self.tax_year is None and "tax_year" in self.model_fields_set: + _dict['taxYear'] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if tin (nullable) is None + # and model_fields_set contains the field + if self.tin is None and "tin" in self.model_fields_set: + _dict['tin'] = None + + # set to None if recipient_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_name is None and "recipient_name" in self.model_fields_set: + _dict['recipientName'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict['address2'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict['zip'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if non_us_province (nullable) is None + # and model_fields_set contains the field + if self.non_us_province is None and "non_us_province" in self.model_fields_set: + _dict['nonUsProvince'] = None + + # set to None if country_code (nullable) is None + # and model_fields_set contains the field + if self.country_code is None and "country_code" in self.model_fields_set: + _dict['countryCode'] = None + + # set to None if federal_efile_date (nullable) is None + # and model_fields_set contains the field + if self.federal_efile_date is None and "federal_efile_date" in self.model_fields_set: + _dict['federalEfileDate'] = None + + # set to None if postal_mail (nullable) is None + # and model_fields_set contains the field + if self.postal_mail is None and "postal_mail" in self.model_fields_set: + _dict['postalMail'] = None + + # set to None if state_efile_date (nullable) is None + # and model_fields_set contains the field + if self.state_efile_date is None and "state_efile_date" in self.model_fields_set: + _dict['stateEfileDate'] = None + + # set to None if recipient_edelivery_date (nullable) is None + # and model_fields_set contains the field + if self.recipient_edelivery_date is None and "recipient_edelivery_date" in self.model_fields_set: + _dict['recipientEdeliveryDate'] = None + + # set to None if tin_match (nullable) is None + # and model_fields_set contains the field + if self.tin_match is None and "tin_match" in self.model_fields_set: + _dict['tinMatch'] = None + + # set to None if address_verification (nullable) is None + # and model_fields_set contains the field + if self.address_verification is None and "address_verification" in self.model_fields_set: + _dict['addressVerification'] = None + + # set to None if state_and_local_withholding (nullable) is None + # and model_fields_set contains the field + if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: + _dict['stateAndLocalWithholding'] = None + + # set to None if federal_efile_status (nullable) is None + # and model_fields_set contains the field + if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: + _dict['federalEfileStatus'] = None + + # set to None if state_efile_status (nullable) is None + # and model_fields_set contains the field + if self.state_efile_status is None and "state_efile_status" in self.model_fields_set: + _dict['stateEfileStatus'] = None + + # set to None if postal_mail_status (nullable) is None + # and model_fields_set contains the field + if self.postal_mail_status is None and "postal_mail_status" in self.model_fields_set: + _dict['postalMailStatus'] = None + + # set to None if tin_match_status (nullable) is None + # and model_fields_set contains the field + if self.tin_match_status is None and "tin_match_status" in self.model_fields_set: + _dict['tinMatchStatus'] = None + + # set to None if address_verification_status (nullable) is None + # and model_fields_set contains the field + if self.address_verification_status is None and "address_verification_status" in self.model_fields_set: + _dict['addressVerificationStatus'] = None + + # set to None if e_delivery_status (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_status is None and "e_delivery_status" in self.model_fields_set: + _dict['eDeliveryStatus'] = None + + # set to None if validation_errors (nullable) is None + # and model_fields_set contains the field + if self.validation_errors is None and "validation_errors" in self.model_fields_set: + _dict['validationErrors'] = None + + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix_name (nullable) is None + # and model_fields_set contains the field + if self.suffix_name is None and "suffix_name" in self.model_fields_set: + _dict['suffixName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if no_tin (nullable) is None + # and model_fields_set contains the field + if self.no_tin is None and "no_tin" in self.model_fields_set: + _dict['noTin'] = None + + # set to None if second_tin_notice (nullable) is None + # and model_fields_set contains the field + if self.second_tin_notice is None and "second_tin_notice" in self.model_fields_set: + _dict['secondTinNotice'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IrisFormBase from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "issuerId": obj.get("issuerId"), + "issuerReferenceId": obj.get("issuerReferenceId"), + "issuerTin": obj.get("issuerTin"), + "taxYear": obj.get("taxYear"), + "referenceId": obj.get("referenceId"), + "tin": obj.get("tin"), + "recipientName": obj.get("recipientName"), + "address": obj.get("address"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "email": obj.get("email"), + "nonUsProvince": obj.get("nonUsProvince"), + "countryCode": obj.get("countryCode"), + "federalEfileDate": obj.get("federalEfileDate"), + "postalMail": obj.get("postalMail"), + "stateEfileDate": obj.get("stateEfileDate"), + "recipientEdeliveryDate": obj.get("recipientEdeliveryDate"), + "tinMatch": obj.get("tinMatch"), + "addressVerification": obj.get("addressVerification"), + "stateAndLocalWithholding": StateAndLocalWithholding.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, + "federalEfileStatus": Form1099StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, + "stateEfileStatus": [StateEfileStatusDetail.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "postalMailStatus": Form1099StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, + "tinMatchStatus": Form1099StatusDetail.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, + "addressVerificationStatus": Form1099StatusDetail.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, + "eDeliveryStatus": Form1099StatusDetail.from_dict(obj["eDeliveryStatus"]) if obj.get("eDeliveryStatus") is not None else None, + "validationErrors": [ValidationError.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "tinType": obj.get("tinType"), + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffixName": obj.get("suffixName"), + "recipientSecondName": obj.get("recipientSecondName"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "noTin": obj.get("noTin"), + "secondTinNotice": obj.get("secondTinNotice") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/irs_response.py b/Avalara/SDK/models/A1099/V2/irs_response.py index 7eeaed6..2660d6b 100644 --- a/Avalara/SDK/models/A1099/V2/irs_response.py +++ b/Avalara/SDK/models/A1099/V2/irs_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/issuer_base.py b/Avalara/SDK/models/A1099/V2/issuer_base.py index d70d7cd..280caf0 100644 --- a/Avalara/SDK/models/A1099/V2/issuer_base.py +++ b/Avalara/SDK/models/A1099/V2/issuer_base.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -33,7 +33,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -42,8 +42,15 @@ class IssuerBase(BaseModel): """ IssuerBase """ # noqa: E501 - name: Optional[StrictStr] = Field(description="Legal name. Not the DBA name.") - dba_name: Optional[StrictStr] = Field(default=None, description="Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'.", alias="dbaName") + business_name: Optional[StrictStr] = Field(description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'.", alias="businessName2") + name: Optional[StrictStr] = Field(default=None, description="Legal name. Not the DBA name. Deprecated alias for 'businessName'.") + dba_name: Optional[StrictStr] = Field(default=None, description="Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'.", alias="dbaName") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.") tin: Optional[StrictStr] = Field(default=None, description="Federal Tax Identification Number (TIN).") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces.", alias="referenceId") telephone: Optional[StrictStr] = Field(description="Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries.") @@ -57,7 +64,17 @@ class IssuerBase(BaseModel): foreign_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="foreignProvince") transfer_agent_name: Optional[StrictStr] = Field(default=None, description="Name of the transfer agent, if applicable — optional; use either this or 'dbaName'.", alias="transferAgentName") last_filing: Optional[StrictBool] = Field(description="Indicates if this is the issuer's final year filing.", alias="lastFiling") - __properties: ClassVar[List[str]] = ["name", "dbaName", "tin", "referenceId", "telephone", "taxYear", "countryCode", "email", "address", "city", "state", "zip", "foreignProvince", "transferAgentName", "lastFiling"] + __properties: ClassVar[List[str]] = ["businessName", "businessName2", "name", "dbaName", "tinType", "firstName", "middleName", "lastName", "suffix", "tin", "referenceId", "telephone", "taxYear", "countryCode", "email", "address", "city", "state", "zip", "foreignProvince", "transferAgentName", "lastFiling"] + + @field_validator('tin_type') + def tin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['UNKNOWN', 'INDIVIDUAL', 'BUSINESS']): + raise ValueError("must be one of enum values ('UNKNOWN', 'INDIVIDUAL', 'BUSINESS')") + return value model_config = ConfigDict( populate_by_name=True, @@ -98,6 +115,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + # set to None if name (nullable) is None # and model_fields_set contains the field if self.name is None and "name" in self.model_fields_set: @@ -108,6 +135,31 @@ def to_dict(self) -> Dict[str, Any]: if self.dba_name is None and "dba_name" in self.model_fields_set: _dict['dbaName'] = None + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix (nullable) is None + # and model_fields_set contains the field + if self.suffix is None and "suffix" in self.model_fields_set: + _dict['suffix'] = None + # set to None if tin (nullable) is None # and model_fields_set contains the field if self.tin is None and "tin" in self.model_fields_set: @@ -185,8 +237,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), "name": obj.get("name"), "dbaName": obj.get("dbaName"), + "tinType": obj.get("tinType"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffix": obj.get("suffix"), "tin": obj.get("tin"), "referenceId": obj.get("referenceId"), "telephone": obj.get("telephone"), diff --git a/Avalara/SDK/models/A1099/V2/issuer_request.py b/Avalara/SDK/models/A1099/V2/issuer_request.py index 96b2494..fe9b248 100644 --- a/Avalara/SDK/models/A1099/V2/issuer_request.py +++ b/Avalara/SDK/models/A1099/V2/issuer_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -33,7 +33,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -42,8 +42,15 @@ class IssuerRequest(BaseModel): """ IssuerRequest """ # noqa: E501 - name: Optional[StrictStr] = Field(description="Legal name. Not the DBA name.") - dba_name: Optional[StrictStr] = Field(default=None, description="Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'.", alias="dbaName") + business_name: Optional[StrictStr] = Field(description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'.", alias="businessName2") + name: Optional[StrictStr] = Field(default=None, description="Legal name. Not the DBA name. Deprecated alias for 'businessName'.") + dba_name: Optional[StrictStr] = Field(default=None, description="Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'.", alias="dbaName") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.") tin: Optional[StrictStr] = Field(default=None, description="Federal Tax Identification Number (TIN).") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces.", alias="referenceId") telephone: Optional[StrictStr] = Field(description="Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries.") @@ -57,7 +64,17 @@ class IssuerRequest(BaseModel): foreign_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="foreignProvince") transfer_agent_name: Optional[StrictStr] = Field(default=None, description="Name of the transfer agent, if applicable — optional; use either this or 'dbaName'.", alias="transferAgentName") last_filing: Optional[StrictBool] = Field(description="Indicates if this is the issuer's final year filing.", alias="lastFiling") - __properties: ClassVar[List[str]] = ["name", "dbaName", "tin", "referenceId", "telephone", "taxYear", "countryCode", "email", "address", "city", "state", "zip", "foreignProvince", "transferAgentName", "lastFiling"] + __properties: ClassVar[List[str]] = ["businessName", "businessName2", "name", "dbaName", "tinType", "firstName", "middleName", "lastName", "suffix", "tin", "referenceId", "telephone", "taxYear", "countryCode", "email", "address", "city", "state", "zip", "foreignProvince", "transferAgentName", "lastFiling"] + + @field_validator('tin_type') + def tin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['UNKNOWN', 'INDIVIDUAL', 'BUSINESS']): + raise ValueError("must be one of enum values ('UNKNOWN', 'INDIVIDUAL', 'BUSINESS')") + return value model_config = ConfigDict( populate_by_name=True, @@ -98,6 +115,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + # set to None if name (nullable) is None # and model_fields_set contains the field if self.name is None and "name" in self.model_fields_set: @@ -108,6 +135,31 @@ def to_dict(self) -> Dict[str, Any]: if self.dba_name is None and "dba_name" in self.model_fields_set: _dict['dbaName'] = None + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix (nullable) is None + # and model_fields_set contains the field + if self.suffix is None and "suffix" in self.model_fields_set: + _dict['suffix'] = None + # set to None if tin (nullable) is None # and model_fields_set contains the field if self.tin is None and "tin" in self.model_fields_set: @@ -185,8 +237,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), "name": obj.get("name"), "dbaName": obj.get("dbaName"), + "tinType": obj.get("tinType"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffix": obj.get("suffix"), "tin": obj.get("tin"), "referenceId": obj.get("referenceId"), "telephone": obj.get("telephone"), diff --git a/Avalara/SDK/models/A1099/V2/issuer_response.py b/Avalara/SDK/models/A1099/V2/issuer_response.py index e3aa002..440db6c 100644 --- a/Avalara/SDK/models/A1099/V2/issuer_response.py +++ b/Avalara/SDK/models/A1099/V2/issuer_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -34,7 +34,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -43,11 +43,15 @@ class IssuerResponse(BaseModel): """ IssuerResponse """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier set when the record is created.") - created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") - updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") - name: Optional[StrictStr] = Field(description="Legal name. Not the DBA name.") - dba_name: Optional[StrictStr] = Field(default=None, description="Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'.", alias="dbaName") + business_name: Optional[StrictStr] = Field(description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'.", alias="businessName2") + name: Optional[StrictStr] = Field(default=None, description="Legal name. Not the DBA name. Deprecated alias for 'businessName'.") + dba_name: Optional[StrictStr] = Field(default=None, description="Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'.", alias="dbaName") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.") tin: Optional[StrictStr] = Field(default=None, description="Federal Tax Identification Number (TIN).") reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces.", alias="referenceId") telephone: Optional[StrictStr] = Field(description="Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries.") @@ -61,7 +65,20 @@ class IssuerResponse(BaseModel): foreign_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="foreignProvince") transfer_agent_name: Optional[StrictStr] = Field(default=None, description="Name of the transfer agent, if applicable — optional; use either this or 'dbaName'.", alias="transferAgentName") last_filing: Optional[StrictBool] = Field(description="Indicates if this is the issuer's final year filing.", alias="lastFiling") - __properties: ClassVar[List[str]] = ["name", "dbaName", "tin", "referenceId", "telephone", "taxYear", "countryCode", "email", "address", "city", "state", "zip", "foreignProvince", "transferAgentName", "lastFiling"] + id: Optional[StrictStr] = Field(default=None, description="Unique identifier set when the record is created.") + created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + __properties: ClassVar[List[str]] = ["businessName", "businessName2", "name", "dbaName", "tinType", "firstName", "middleName", "lastName", "suffix", "tin", "referenceId", "telephone", "taxYear", "countryCode", "email", "address", "city", "state", "zip", "foreignProvince", "transferAgentName", "lastFiling", "id", "createdAt", "updatedAt"] + + @field_validator('tin_type') + def tin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['UNKNOWN', 'INDIVIDUAL', 'BUSINESS']): + raise ValueError("must be one of enum values ('UNKNOWN', 'INDIVIDUAL', 'BUSINESS')") + return value model_config = ConfigDict( populate_by_name=True, @@ -102,6 +119,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + # set to None if name (nullable) is None # and model_fields_set contains the field if self.name is None and "name" in self.model_fields_set: @@ -112,6 +139,31 @@ def to_dict(self) -> Dict[str, Any]: if self.dba_name is None and "dba_name" in self.model_fields_set: _dict['dbaName'] = None + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix (nullable) is None + # and model_fields_set contains the field + if self.suffix is None and "suffix" in self.model_fields_set: + _dict['suffix'] = None + # set to None if tin (nullable) is None # and model_fields_set contains the field if self.tin is None and "tin" in self.model_fields_set: @@ -189,8 +241,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), "name": obj.get("name"), "dbaName": obj.get("dbaName"), + "tinType": obj.get("tinType"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffix": obj.get("suffix"), "tin": obj.get("tin"), "referenceId": obj.get("referenceId"), "telephone": obj.get("telephone"), @@ -203,7 +262,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "zip": obj.get("zip"), "foreignProvince": obj.get("foreignProvince"), "transferAgentName": obj.get("transferAgentName"), - "lastFiling": obj.get("lastFiling") + "lastFiling": obj.get("lastFiling"), + "id": obj.get("id"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/issuer_write_response.py b/Avalara/SDK/models/A1099/V2/issuer_write_response.py new file mode 100644 index 0000000..79be505 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/issuer_write_response.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + > **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 +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 26.7.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.A1099.V2.validation_error import ValidationError +from typing import Optional, Set +from typing_extensions import Self + +class IssuerWriteResponse(BaseModel): + """ + IssuerWriteResponse + """ # noqa: E501 + business_name: Optional[StrictStr] = Field(description="Business name. Required when the recipient of the form is a business; should only be used for businesses.", alias="businessName") + business_name2: Optional[StrictStr] = Field(default=None, description="Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'.", alias="businessName2") + name: Optional[StrictStr] = Field(default=None, description="Legal name. Not the DBA name. Deprecated alias for 'businessName'.") + dba_name: Optional[StrictStr] = Field(default=None, description="Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'.", alias="dbaName") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") + first_name: Optional[StrictStr] = Field(default=None, description="First name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name. Should only be used for individuals.", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Last name. Required when the recipient of the form is an individual; should only be used for individuals.", alias="lastName") + suffix: Optional[StrictStr] = Field(default=None, description="Suffix name. Should only be used for individuals.") + tin: Optional[StrictStr] = Field(default=None, description="Federal Tax Identification Number (TIN).") + reference_id: Optional[StrictStr] = Field(default=None, description="Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces.", alias="referenceId") + telephone: Optional[StrictStr] = Field(description="Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries.") + tax_year: Optional[StrictInt] = Field(description="Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. It's only required on creation, and cannot be modified on update.", alias="taxYear") + country_code: Optional[StrictStr] = Field(description="Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address.", alias="countryCode") + email: Optional[StrictStr] = Field(default=None, description="Contact email address. For recipient inquiries. Phone will be used on communications if you don't specify an email") + address: Optional[StrictStr] = Field(description="Address.") + city: Optional[StrictStr] = Field(description="City.") + state: Optional[StrictStr] = Field(description="Two-letter US state or Canadian province code (required for US/CA addresses).") + zip: Optional[StrictStr] = Field(description="ZIP/postal code.") + foreign_province: Optional[StrictStr] = Field(default=None, description="Province or region for non-US/CA addresses.", alias="foreignProvince") + transfer_agent_name: Optional[StrictStr] = Field(default=None, description="Name of the transfer agent, if applicable — optional; use either this or 'dbaName'.", alias="transferAgentName") + last_filing: Optional[StrictBool] = Field(description="Indicates if this is the issuer's final year filing.", alias="lastFiling") + id: Optional[StrictStr] = Field(default=None, description="Unique identifier set when the record is created.") + created_at: Optional[datetime] = Field(default=None, description="Date time when the record was created.", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Date time when the record was last updated.", alias="updatedAt") + validation_errors: Optional[List[ValidationError]] = Field(default=None, description="Field-level validation errors. Populated when a POST or PUT request violated business rules but the issuer was still persisted. Each entry identifies the affected field and the issue. Empty array when the payload was fully valid.", alias="validationErrors") + __properties: ClassVar[List[str]] = ["businessName", "businessName2", "name", "dbaName", "tinType", "firstName", "middleName", "lastName", "suffix", "tin", "referenceId", "telephone", "taxYear", "countryCode", "email", "address", "city", "state", "zip", "foreignProvince", "transferAgentName", "lastFiling", "id", "createdAt", "updatedAt", "validationErrors"] + + @field_validator('tin_type') + def tin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['UNKNOWN', 'INDIVIDUAL', 'BUSINESS']): + raise ValueError("must be one of enum values ('UNKNOWN', 'INDIVIDUAL', 'BUSINESS')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IssuerWriteResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "validation_errors", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in validation_errors (list) + _items = [] + if self.validation_errors: + for _item in self.validation_errors: + if _item: + _items.append(_item.to_dict()) + _dict['validationErrors'] = _items + # set to None if business_name (nullable) is None + # and model_fields_set contains the field + if self.business_name is None and "business_name" in self.model_fields_set: + _dict['businessName'] = None + + # set to None if business_name2 (nullable) is None + # and model_fields_set contains the field + if self.business_name2 is None and "business_name2" in self.model_fields_set: + _dict['businessName2'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if dba_name (nullable) is None + # and model_fields_set contains the field + if self.dba_name is None and "dba_name" in self.model_fields_set: + _dict['dbaName'] = None + + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if suffix (nullable) is None + # and model_fields_set contains the field + if self.suffix is None and "suffix" in self.model_fields_set: + _dict['suffix'] = None + + # set to None if tin (nullable) is None + # and model_fields_set contains the field + if self.tin is None and "tin" in self.model_fields_set: + _dict['tin'] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if telephone (nullable) is None + # and model_fields_set contains the field + if self.telephone is None and "telephone" in self.model_fields_set: + _dict['telephone'] = None + + # set to None if tax_year (nullable) is None + # and model_fields_set contains the field + if self.tax_year is None and "tax_year" in self.model_fields_set: + _dict['taxYear'] = None + + # set to None if country_code (nullable) is None + # and model_fields_set contains the field + if self.country_code is None and "country_code" in self.model_fields_set: + _dict['countryCode'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict['zip'] = None + + # set to None if foreign_province (nullable) is None + # and model_fields_set contains the field + if self.foreign_province is None and "foreign_province" in self.model_fields_set: + _dict['foreignProvince'] = None + + # set to None if transfer_agent_name (nullable) is None + # and model_fields_set contains the field + if self.transfer_agent_name is None and "transfer_agent_name" in self.model_fields_set: + _dict['transferAgentName'] = None + + # set to None if last_filing (nullable) is None + # and model_fields_set contains the field + if self.last_filing is None and "last_filing" in self.model_fields_set: + _dict['lastFiling'] = None + + # set to None if validation_errors (nullable) is None + # and model_fields_set contains the field + if self.validation_errors is None and "validation_errors" in self.model_fields_set: + _dict['validationErrors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IssuerWriteResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "businessName": obj.get("businessName"), + "businessName2": obj.get("businessName2"), + "name": obj.get("name"), + "dbaName": obj.get("dbaName"), + "tinType": obj.get("tinType"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "suffix": obj.get("suffix"), + "tin": obj.get("tin"), + "referenceId": obj.get("referenceId"), + "telephone": obj.get("telephone"), + "taxYear": obj.get("taxYear"), + "countryCode": obj.get("countryCode"), + "email": obj.get("email"), + "address": obj.get("address"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "foreignProvince": obj.get("foreignProvince"), + "transferAgentName": obj.get("transferAgentName"), + "lastFiling": obj.get("lastFiling"), + "id": obj.get("id"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "validationErrors": [ValidationError.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/iw9_form_data_models_one_of.py b/Avalara/SDK/models/A1099/V2/iw9_form_data_models_one_of.py index c7687ce..397b07b 100644 --- a/Avalara/SDK/models/A1099/V2/iw9_form_data_models_one_of.py +++ b/Avalara/SDK/models/A1099/V2/iw9_form_data_models_one_of.py @@ -33,11 +33,11 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w4_form_data_model import W4FormDataModel -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_form_data_model import W8BenFormDataModel -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_bene_form_data_model import W8BeneFormDataModel -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_imy_form_data_model import W8ImyFormDataModel -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w9_form_data_model import W9FormDataModel +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w4_form_data_model import W4FormDataModel +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_form_data_model import W8BenFormDataModel +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_bene_form_data_model import W8BeneFormDataModel +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_imy_form_data_model import W8ImyFormDataModel +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w9_form_data_model import W9FormDataModel from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self diff --git a/Avalara/SDK/models/A1099/V2/job_response.py b/Avalara/SDK/models/A1099/V2/job_response.py index aec6e9e..ba40e0c 100644 --- a/Avalara/SDK/models/A1099/V2/job_response.py +++ b/Avalara/SDK/models/A1099/V2/job_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/offer_and_coverage.py b/Avalara/SDK/models/A1099/V2/offer_and_coverage.py index 2819a13..afd9ef2 100644 --- a/Avalara/SDK/models/A1099/V2/offer_and_coverage.py +++ b/Avalara/SDK/models/A1099/V2/offer_and_coverage.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_company_response.py b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_company_response.py index 61c8e89..f106436 100644 --- a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_company_response.py +++ b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_company_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_form1099_base.py b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_form1099_base.py index edaab39..c67b62c 100644 --- a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_form1099_base.py +++ b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_form1099_base.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_issuer_response.py b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_issuer_response.py index 096b28c..b94e64b 100644 --- a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_issuer_response.py +++ b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_issuer_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_w9_form_base_response.py b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_w9_form_base_response.py index efa05aa..2d84f62 100644 --- a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_w9_form_base_response.py +++ b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_w9_form_base_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/primary_withholding_agent.py b/Avalara/SDK/models/A1099/V2/primary_withholding_agent.py index 0d4e5dc..9a8a96d 100644 --- a/Avalara/SDK/models/A1099/V2/primary_withholding_agent.py +++ b/Avalara/SDK/models/A1099/V2/primary_withholding_agent.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/real_time_tin_match_irs_response.py b/Avalara/SDK/models/A1099/V2/real_time_tin_match_irs_response.py new file mode 100644 index 0000000..7bda506 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/real_time_tin_match_irs_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + > **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 +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 26.7.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RealTimeTinMatchIrsResponse(BaseModel): + """ + RealTimeTinMatchIrsResponse + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The IRS response code.") + description: Optional[StrictStr] = Field(default=None, description="The description for the IRS response.") + __properties: ClassVar[List[str]] = ["code", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RealTimeTinMatchIrsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RealTimeTinMatchIrsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "description": obj.get("description") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/real_time_tin_match_request.py b/Avalara/SDK/models/A1099/V2/real_time_tin_match_request.py new file mode 100644 index 0000000..a82f600 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/real_time_tin_match_request.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + > **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 +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 26.7.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RealTimeTinMatchRequest(BaseModel): + """ + RealTimeTinMatchRequest + """ # noqa: E501 + tin_type: Optional[StrictStr] = Field(default=None, description="The TIN type.", alias="tinType") + tin: Optional[StrictStr] = Field(default=None, description="The TIN to be submitted to TIN match.") + name: Optional[StrictStr] = Field(default=None, description="The entity name to be submitted to TIN match.") + __properties: ClassVar[List[str]] = ["tinType", "tin", "name"] + + @field_validator('tin_type') + def tin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Business', 'Individual', 'Unknown']): + raise ValueError("must be one of enum values ('Business', 'Individual', 'Unknown')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RealTimeTinMatchRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RealTimeTinMatchRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tinType": obj.get("tinType"), + "tin": obj.get("tin"), + "name": obj.get("name") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/real_time_tin_match_response.py b/Avalara/SDK/models/A1099/V2/real_time_tin_match_response.py new file mode 100644 index 0000000..4ca0f5f --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/real_time_tin_match_response.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + > **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 +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 26.7.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.A1099.V2.real_time_tin_match_irs_response import RealTimeTinMatchIrsResponse +from typing import Optional, Set +from typing_extensions import Self + +class RealTimeTinMatchResponse(BaseModel): + """ + RealTimeTinMatchResponse + """ # noqa: E501 + status: Optional[StrictStr] = Field(default=None, description="The status of the TIN match (matched or rejected).") + irs_response: Optional[RealTimeTinMatchIrsResponse] = Field(default=None, description="The IRS response details.", alias="irsResponse") + __properties: ClassVar[List[str]] = ["status", "irsResponse"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RealTimeTinMatchResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of irs_response + if self.irs_response: + _dict['irsResponse'] = self.irs_response.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RealTimeTinMatchResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "irsResponse": RealTimeTinMatchIrsResponse.from_dict(obj["irsResponse"]) if obj.get("irsResponse") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/state_and_local_withholding.py b/Avalara/SDK/models/A1099/V2/state_and_local_withholding.py index cd87b6d..bcb0349 100644 --- a/Avalara/SDK/models/A1099/V2/state_and_local_withholding.py +++ b/Avalara/SDK/models/A1099/V2/state_and_local_withholding.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/state_efile_status_detail.py b/Avalara/SDK/models/A1099/V2/state_efile_status_detail.py index 8e17354..93321e7 100644 --- a/Avalara/SDK/models/A1099/V2/state_efile_status_detail.py +++ b/Avalara/SDK/models/A1099/V2/state_efile_status_detail.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/substantial_us_owner_request.py b/Avalara/SDK/models/A1099/V2/substantial_us_owner_request.py index 18e0b3e..edf610a 100644 --- a/Avalara/SDK/models/A1099/V2/substantial_us_owner_request.py +++ b/Avalara/SDK/models/A1099/V2/substantial_us_owner_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/substantial_us_owner_response.py b/Avalara/SDK/models/A1099/V2/substantial_us_owner_response.py index 4150ed3..ead04d3 100644 --- a/Avalara/SDK/models/A1099/V2/substantial_us_owner_response.py +++ b/Avalara/SDK/models/A1099/V2/substantial_us_owner_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/tin_match_status_response.py b/Avalara/SDK/models/A1099/V2/tin_match_status_response.py index c2bd40f..6692690 100644 --- a/Avalara/SDK/models/A1099/V2/tin_match_status_response.py +++ b/Avalara/SDK/models/A1099/V2/tin_match_status_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/validation_error.py b/Avalara/SDK/models/A1099/V2/validation_error.py index 4c8862c..f9bbffd 100644 --- a/Avalara/SDK/models/A1099/V2/validation_error.py +++ b/Avalara/SDK/models/A1099/V2/validation_error.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/w4_form_data_model.py b/Avalara/SDK/models/A1099/V2/w4_form_data_model.py index e220d0f..c0370d0 100644 --- a/Avalara/SDK/models/A1099/V2/w4_form_data_model.py +++ b/Avalara/SDK/models/A1099/V2/w4_form_data_model.py @@ -36,7 +36,7 @@ from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel from typing import Optional, Set from typing_extensions import Self diff --git a/Avalara/SDK/models/A1099/V2/w4_form_minimal_request.py b/Avalara/SDK/models/A1099/V2/w4_form_minimal_request.py index 1025e5c..3743970 100644 --- a/Avalara/SDK/models/A1099/V2/w4_form_minimal_request.py +++ b/Avalara/SDK/models/A1099/V2/w4_form_minimal_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/w4_form_request.py b/Avalara/SDK/models/A1099/V2/w4_form_request.py index 3482815..501529a 100644 --- a/Avalara/SDK/models/A1099/V2/w4_form_request.py +++ b/Avalara/SDK/models/A1099/V2/w4_form_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -48,7 +48,7 @@ class W4FormRequest(BaseModel): employee_middle_name: Optional[StrictStr] = Field(default=None, description="The middle name of the employee.", alias="employeeMiddleName") employee_last_name: StrictStr = Field(description="The last name of the employee.", alias="employeeLastName") employee_name_suffix: Optional[StrictStr] = Field(default=None, description="The name suffix of the employee.", alias="employeeNameSuffix") - tin_type: StrictStr = Field(description="Tax Identification Number (TIN) type.", alias="tinType") + tin_type: StrictStr = Field(description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") tin: StrictStr = Field(description="The taxpayer identification number (TIN).") address: Optional[StrictStr] = Field(default=None, description="The address of the employee. Required unless exempt.") city: Optional[StrictStr] = Field(default=None, description="The city of residence of the employee. Required unless exempt.") @@ -63,12 +63,12 @@ class W4FormRequest(BaseModel): additional_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The additional amount withheld.", alias="additionalWithheld") exempt_from_withholding: Optional[StrictBool] = Field(default=None, description="Indicates whether the employee is exempt from withholding.", alias="exemptFromWithholding") office_code: Optional[StrictStr] = Field(default=None, description="The office code associated with the form.", alias="officeCode") - e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") - signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company. Required when creating a form.", alias="companyId") reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") - __properties: ClassVar[List[str]] = ["eDeliveryConsentedAt", "signature", "type", "companyId", "referenceId", "email"] + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] @field_validator('type') def type_validate_enum(cls, value): @@ -131,16 +131,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if e_delivery_consented_at (nullable) is None - # and model_fields_set contains the field - if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: - _dict['eDeliveryConsentedAt'] = None - - # set to None if signature (nullable) is None - # and model_fields_set contains the field - if self.signature is None and "signature" in self.model_fields_set: - _dict['signature'] = None - # set to None if reference_id (nullable) is None # and model_fields_set contains the field if self.reference_id is None and "reference_id" in self.model_fields_set: @@ -151,6 +141,16 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + return _dict @classmethod @@ -163,12 +163,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), - "signature": obj.get("signature"), "type": obj.get("type"), "companyId": obj.get("companyId"), "referenceId": obj.get("referenceId"), - "email": obj.get("email") + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/w4_form_response.py b/Avalara/SDK/models/A1099/V2/w4_form_response.py index 9ce6d21..7932b5c 100644 --- a/Avalara/SDK/models/A1099/V2/w4_form_response.py +++ b/Avalara/SDK/models/A1099/V2/w4_form_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -49,7 +49,7 @@ class W4FormResponse(BaseModel): employee_middle_name: Optional[StrictStr] = Field(default=None, description="The middle name of the employee.", alias="employeeMiddleName") employee_last_name: Optional[StrictStr] = Field(default=None, description="The last name of the employee.", alias="employeeLastName") employee_name_suffix: Optional[StrictStr] = Field(default=None, description="The name suffix of the employee.", alias="employeeNameSuffix") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type.", alias="tinType") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN).") address: Optional[StrictStr] = Field(default=None, description="The address of the employee.") city: Optional[StrictStr] = Field(default=None, description="The city of residence of the employee.") diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_e_form_minimal_request.py b/Avalara/SDK/models/A1099/V2/w8_ben_e_form_minimal_request.py index 30d6cd3..0f66e27 100644 --- a/Avalara/SDK/models/A1099/V2/w8_ben_e_form_minimal_request.py +++ b/Avalara/SDK/models/A1099/V2/w8_ben_e_form_minimal_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_e_form_request.py b/Avalara/SDK/models/A1099/V2/w8_ben_e_form_request.py index 74f96e3..8babf0b 100644 --- a/Avalara/SDK/models/A1099/V2/w8_ben_e_form_request.py +++ b/Avalara/SDK/models/A1099/V2/w8_ben_e_form_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -140,12 +140,12 @@ class W8BenEFormRequest(BaseModel): substantial_us_owners: Optional[List[SubstantialUsOwnerRequest]] = Field(default=None, description="The list of substantial U.S. owners of passive NFFE.", alias="substantialUsOwners") signer_name: Optional[StrictStr] = Field(default=None, description="The name of the signer.", alias="signerName") capacity_to_sign_certification: Optional[StrictBool] = Field(default=None, description="Certifies signer has the capacity to sign for the beneficial owner.", alias="capacityToSignCertification") - e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") - signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company. Required when creating a form.", alias="companyId") reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") - __properties: ClassVar[List[str]] = ["eDeliveryConsentedAt", "signature", "type", "companyId", "referenceId", "email"] + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] @field_validator('type') def type_validate_enum(cls, value): @@ -272,16 +272,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if e_delivery_consented_at (nullable) is None - # and model_fields_set contains the field - if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: - _dict['eDeliveryConsentedAt'] = None - - # set to None if signature (nullable) is None - # and model_fields_set contains the field - if self.signature is None and "signature" in self.model_fields_set: - _dict['signature'] = None - # set to None if reference_id (nullable) is None # and model_fields_set contains the field if self.reference_id is None and "reference_id" in self.model_fields_set: @@ -292,6 +282,16 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + return _dict @classmethod @@ -304,12 +304,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), - "signature": obj.get("signature"), "type": obj.get("type"), "companyId": obj.get("companyId"), "referenceId": obj.get("referenceId"), - "email": obj.get("email") + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_e_form_response.py b/Avalara/SDK/models/A1099/V2/w8_ben_e_form_response.py index 02fe2b7..cdbe0d1 100644 --- a/Avalara/SDK/models/A1099/V2/w8_ben_e_form_response.py +++ b/Avalara/SDK/models/A1099/V2/w8_ben_e_form_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -63,7 +63,7 @@ class W8BenEFormResponse(BaseModel): mailing_state: Optional[StrictStr] = Field(default=None, description="The state of the mailing address.", alias="mailingState") mailing_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the mailing address.", alias="mailingZip") mailing_country: Optional[StrictStr] = Field(default=None, description="The country of the mailing address.", alias="mailingCountry") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type.", alias="tinType") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN).") giin: Optional[StrictStr] = Field(default=None, description="The global intermediary identification number (GIIN).") foreign_tin_not_required: Optional[StrictBool] = Field(default=None, description="Indicates whether a foreign TIN is not required.", alias="foreignTinNotRequired") diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_form_data_model.py b/Avalara/SDK/models/A1099/V2/w8_ben_form_data_model.py index 91794d3..fc2d2f6 100644 --- a/Avalara/SDK/models/A1099/V2/w8_ben_form_data_model.py +++ b/Avalara/SDK/models/A1099/V2/w8_ben_form_data_model.py @@ -36,7 +36,7 @@ from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel from typing import Optional, Set from typing_extensions import Self diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_form_minimal_request.py b/Avalara/SDK/models/A1099/V2/w8_ben_form_minimal_request.py index eff776f..b6c682b 100644 --- a/Avalara/SDK/models/A1099/V2/w8_ben_form_minimal_request.py +++ b/Avalara/SDK/models/A1099/V2/w8_ben_form_minimal_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_form_request.py b/Avalara/SDK/models/A1099/V2/w8_ben_form_request.py index df7b2e1..eb64783 100644 --- a/Avalara/SDK/models/A1099/V2/w8_ben_form_request.py +++ b/Avalara/SDK/models/A1099/V2/w8_ben_form_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -68,12 +68,12 @@ class W8BenFormRequest(BaseModel): withholding_rate: Optional[StrictStr] = Field(default=None, description="The withholding rate applied as per the treaty. Must be a percentage with up to two decimals (e.g., 12.50, 0).. Allowed values: 0, 0.0, 0.00, 5, 5.5, 10, 12.50, 15, 20, 25 (and 1 more)", alias="withholdingRate") income_type: Optional[StrictStr] = Field(default=None, description="The type of income covered by the treaty.", alias="incomeType") signer_name: Optional[StrictStr] = Field(default=None, description="The name of the signer of the form.", alias="signerName") - e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") - signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company. Required when creating a form.", alias="companyId") reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") - __properties: ClassVar[List[str]] = ["eDeliveryConsentedAt", "signature", "type", "companyId", "referenceId", "email"] + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] @field_validator('type') def type_validate_enum(cls, value): @@ -190,16 +190,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if e_delivery_consented_at (nullable) is None - # and model_fields_set contains the field - if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: - _dict['eDeliveryConsentedAt'] = None - - # set to None if signature (nullable) is None - # and model_fields_set contains the field - if self.signature is None and "signature" in self.model_fields_set: - _dict['signature'] = None - # set to None if reference_id (nullable) is None # and model_fields_set contains the field if self.reference_id is None and "reference_id" in self.model_fields_set: @@ -210,6 +200,16 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + return _dict @classmethod @@ -222,12 +222,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), - "signature": obj.get("signature"), "type": obj.get("type"), "companyId": obj.get("companyId"), "referenceId": obj.get("referenceId"), - "email": obj.get("email") + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_form_response.py b/Avalara/SDK/models/A1099/V2/w8_ben_form_response.py index a34dede..c3e9097 100644 --- a/Avalara/SDK/models/A1099/V2/w8_ben_form_response.py +++ b/Avalara/SDK/models/A1099/V2/w8_ben_form_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -58,7 +58,7 @@ class W8BenFormResponse(BaseModel): mailing_state: Optional[StrictStr] = Field(default=None, description="The state of the mailing address.", alias="mailingState") mailing_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the mailing address.", alias="mailingZip") mailing_country: Optional[StrictStr] = Field(default=None, description="The country of the mailing address.", alias="mailingCountry") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type.", alias="tinType") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN).") foreign_tin_not_required: Optional[StrictBool] = Field(default=None, description="Indicates whether a foreign TIN is not required.", alias="foreignTinNotRequired") foreign_tin: Optional[StrictStr] = Field(default=None, description="The foreign taxpayer identification number (TIN).", alias="foreignTin") diff --git a/Avalara/SDK/models/A1099/V2/w8_bene_form_data_model.py b/Avalara/SDK/models/A1099/V2/w8_bene_form_data_model.py index ab69faa..818a876 100644 --- a/Avalara/SDK/models/A1099/V2/w8_bene_form_data_model.py +++ b/Avalara/SDK/models/A1099/V2/w8_bene_form_data_model.py @@ -36,7 +36,7 @@ from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel from typing import Optional, Set from typing_extensions import Self diff --git a/Avalara/SDK/models/A1099/V2/w8_imy_form_data_model.py b/Avalara/SDK/models/A1099/V2/w8_imy_form_data_model.py index 8749cc5..3e34deb 100644 --- a/Avalara/SDK/models/A1099/V2/w8_imy_form_data_model.py +++ b/Avalara/SDK/models/A1099/V2/w8_imy_form_data_model.py @@ -36,7 +36,7 @@ from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel from typing import Optional, Set from typing_extensions import Self diff --git a/Avalara/SDK/models/A1099/V2/w8_imy_form_minimal_request.py b/Avalara/SDK/models/A1099/V2/w8_imy_form_minimal_request.py index 064e4ee..573f2dc 100644 --- a/Avalara/SDK/models/A1099/V2/w8_imy_form_minimal_request.py +++ b/Avalara/SDK/models/A1099/V2/w8_imy_form_minimal_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/w8_imy_form_request.py b/Avalara/SDK/models/A1099/V2/w8_imy_form_request.py index c797b0c..c0212ee 100644 --- a/Avalara/SDK/models/A1099/V2/w8_imy_form_request.py +++ b/Avalara/SDK/models/A1099/V2/w8_imy_form_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -60,7 +60,7 @@ class W8ImyFormRequest(BaseModel): mailing_state: Optional[StrictStr] = Field(default=None, description="The state of the mailing address.", alias="mailingState") mailing_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the mailing address.", alias="mailingZip") mailing_country: Optional[StrictStr] = Field(default=None, description="The country of the mailing address.", alias="mailingCountry") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type. Available values: - QI-EIN: Qualified Intermediary EIN - WP-EIN: Withholding Partnership EIN - WT-EIN: Withholding Trust EIN - EIN: Employer Identification Number", alias="tinType") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number Available values: - QI-EIN: Qualified Intermediary EIN - WP-EIN: Withholding Partnership EIN - WT-EIN: Withholding Trust EIN - EIN: Employer Identification Number", alias="tinType") tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN).") giin: Optional[StrictStr] = Field(default=None, description="The global intermediary identification number (GIIN).") foreign_tin: Optional[StrictStr] = Field(default=None, description="The foreign taxpayer identification number (TIN).", alias="foreignTin") @@ -155,12 +155,12 @@ class W8ImyFormRequest(BaseModel): sponsored_direct_reporting_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a sponsored direct reporting NFFE.", alias="sponsoredDirectReportingNffeCertification") direct_reporting_nffe_sponsoring_entity: Optional[StrictStr] = Field(default=None, description="The name of the entity that sponsors the direct reporting NFFE.", alias="directReportingNffeSponsoringEntity") signer_name: Optional[StrictStr] = Field(default=None, description="The name of the signer.", alias="signerName") - e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") - signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company. Required when creating a form.", alias="companyId") reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") - __properties: ClassVar[List[str]] = ["eDeliveryConsentedAt", "signature", "type", "companyId", "referenceId", "email"] + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] @field_validator('type') def type_validate_enum(cls, value): @@ -250,16 +250,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if e_delivery_consented_at (nullable) is None - # and model_fields_set contains the field - if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: - _dict['eDeliveryConsentedAt'] = None - - # set to None if signature (nullable) is None - # and model_fields_set contains the field - if self.signature is None and "signature" in self.model_fields_set: - _dict['signature'] = None - # set to None if reference_id (nullable) is None # and model_fields_set contains the field if self.reference_id is None and "reference_id" in self.model_fields_set: @@ -270,6 +260,16 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + return _dict @classmethod @@ -282,12 +282,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), - "signature": obj.get("signature"), "type": obj.get("type"), "companyId": obj.get("companyId"), "referenceId": obj.get("referenceId"), - "email": obj.get("email") + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/w8_imy_form_response.py b/Avalara/SDK/models/A1099/V2/w8_imy_form_response.py index 1353a59..a90eaf9 100644 --- a/Avalara/SDK/models/A1099/V2/w8_imy_form_response.py +++ b/Avalara/SDK/models/A1099/V2/w8_imy_form_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -61,7 +61,7 @@ class W8ImyFormResponse(BaseModel): mailing_state: Optional[StrictStr] = Field(default=None, description="The state of the mailing address.", alias="mailingState") mailing_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the mailing address.", alias="mailingZip") mailing_country: Optional[StrictStr] = Field(default=None, description="The country of the mailing address.", alias="mailingCountry") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type.", alias="tinType") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN).") giin: Optional[StrictStr] = Field(default=None, description="The global intermediary identification number (GIIN).") foreign_tin: Optional[StrictStr] = Field(default=None, description="The foreign taxpayer identification number (TIN).", alias="foreignTin") diff --git a/Avalara/SDK/models/A1099/V2/w9_form_base_minimal_request.py b/Avalara/SDK/models/A1099/V2/w9_form_base_minimal_request.py index cb957a5..a570d76 100644 --- a/Avalara/SDK/models/A1099/V2/w9_form_base_minimal_request.py +++ b/Avalara/SDK/models/A1099/V2/w9_form_base_minimal_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/w9_form_base_request.py b/Avalara/SDK/models/A1099/V2/w9_form_base_request.py index d245c51..8081040 100644 --- a/Avalara/SDK/models/A1099/V2/w9_form_base_request.py +++ b/Avalara/SDK/models/A1099/V2/w9_form_base_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -43,13 +43,13 @@ class W9FormBaseRequest(BaseModel): """ W9FormBaseRequest """ # noqa: E501 - e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") - signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") type: Optional[StrictStr] = Field(default=None, description="The form type.") company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company. Required when creating a form.", alias="companyId") reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") - __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email"] + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] @field_validator('type') def type_validate_enum(cls, value): @@ -112,6 +112,16 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + return _dict @classmethod @@ -127,7 +137,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "companyId": obj.get("companyId"), "referenceId": obj.get("referenceId"), - "email": obj.get("email") + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/w9_form_base_response.py b/Avalara/SDK/models/A1099/V2/w9_form_base_response.py index 4d0e060..0c3475d 100644 --- a/Avalara/SDK/models/A1099/V2/w9_form_base_response.py +++ b/Avalara/SDK/models/A1099/V2/w9_form_base_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/w9_form_data_model.py b/Avalara/SDK/models/A1099/V2/w9_form_data_model.py index 859a1f8..2932947 100644 --- a/Avalara/SDK/models/A1099/V2/w9_form_data_model.py +++ b/Avalara/SDK/models/A1099/V2/w9_form_data_model.py @@ -36,7 +36,7 @@ from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union -from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel +from Avalara.SDK.models.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel from typing import Optional, Set from typing_extensions import Self diff --git a/Avalara/SDK/models/A1099/V2/w9_form_minimal_request.py b/Avalara/SDK/models/A1099/V2/w9_form_minimal_request.py index f3e8ee3..2432ee7 100644 --- a/Avalara/SDK/models/A1099/V2/w9_form_minimal_request.py +++ b/Avalara/SDK/models/A1099/V2/w9_form_minimal_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/A1099/V2/w9_form_request.py b/Avalara/SDK/models/A1099/V2/w9_form_request.py index 48ba578..093d8ef 100644 --- a/Avalara/SDK/models/A1099/V2/w9_form_request.py +++ b/Avalara/SDK/models/A1099/V2/w9_form_request.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -58,16 +58,16 @@ class W9FormRequest(BaseModel): state: Optional[StrictStr] = Field(description="The state of the address.") zip: Optional[StrictStr] = Field(description="The ZIP code of the address.") account_number: Optional[StrictStr] = Field(default=None, description="The account number associated with the form.", alias="accountNumber") - tin_type: StrictStr = Field(description="Tax Identification Number (TIN) type. SSN/ITIN (for individuals) and EIN (for businesses).", alias="tinType") + tin_type: StrictStr = Field(description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number SSN/ITIN (for individuals) and EIN (for businesses).", alias="tinType") tin: StrictStr = Field(description="The taxpayer identification number (TIN).") backup_withholding: Optional[StrictBool] = Field(default=None, description="Indicates whether backup withholding applies.", alias="backupWithholding") is1099able: Optional[StrictBool] = Field(default=None, description="Indicates whether the individual or entity should be issued a 1099 form.") - e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") - signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company. Required when creating a form.", alias="companyId") reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") - __properties: ClassVar[List[str]] = ["eDeliveryConsentedAt", "signature", "type", "companyId", "referenceId", "email"] + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] @field_validator('type') def type_validate_enum(cls, value): @@ -127,16 +127,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if e_delivery_consented_at (nullable) is None - # and model_fields_set contains the field - if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: - _dict['eDeliveryConsentedAt'] = None - - # set to None if signature (nullable) is None - # and model_fields_set contains the field - if self.signature is None and "signature" in self.model_fields_set: - _dict['signature'] = None - # set to None if reference_id (nullable) is None # and model_fields_set contains the field if self.reference_id is None and "reference_id" in self.model_fields_set: @@ -147,6 +137,16 @@ def to_dict(self) -> Dict[str, Any]: if self.email is None and "email" in self.model_fields_set: _dict['email'] = None + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + return _dict @classmethod @@ -159,12 +159,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), - "signature": obj.get("signature"), "type": obj.get("type"), "companyId": obj.get("companyId"), "referenceId": obj.get("referenceId"), - "email": obj.get("email") + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/w9_form_response.py b/Avalara/SDK/models/A1099/V2/w9_form_response.py index c796f0c..2ce5f97 100644 --- a/Avalara/SDK/models/A1099/V2/w9_form_response.py +++ b/Avalara/SDK/models/A1099/V2/w9_form_response.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -60,7 +60,7 @@ class W9FormResponse(BaseModel): state: Optional[StrictStr] = Field(default=None, description="The state of the address.") zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the address.") account_number: Optional[StrictStr] = Field(default=None, description="The account number associated with the form.", alias="accountNumber") - tin_type: Optional[StrictStr] = Field(default=None, description="Tax Identification Number (TIN) type.", alias="tinType") + tin_type: Optional[StrictStr] = Field(default=None, description="Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number", alias="tinType") tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN).") backup_withholding: Optional[StrictBool] = Field(default=None, description="Indicates whether backup withholding applies.", alias="backupWithholding") is1099able: Optional[StrictBool] = Field(default=None, description="Indicates whether the individual or entity should be issued a 1099 form.") diff --git a/Avalara/SDK/models/EInvoicing/V1/address.py b/Avalara/SDK/models/EInvoicing/V1/address.py index cd48276..0a9d95a 100644 --- a/Avalara/SDK/models/EInvoicing/V1/address.py +++ b/Avalara/SDK/models/EInvoicing/V1/address.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/bad_download_request.py b/Avalara/SDK/models/EInvoicing/V1/bad_download_request.py index c085348..32f94b8 100644 --- a/Avalara/SDK/models/EInvoicing/V1/bad_download_request.py +++ b/Avalara/SDK/models/EInvoicing/V1/bad_download_request.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/bad_request.py b/Avalara/SDK/models/EInvoicing/V1/bad_request.py index 72f1492..a38dab1 100644 --- a/Avalara/SDK/models/EInvoicing/V1/bad_request.py +++ b/Avalara/SDK/models/EInvoicing/V1/bad_request.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/batch_error_detail.py b/Avalara/SDK/models/EInvoicing/V1/batch_error_detail.py index c158b96..643c013 100644 --- a/Avalara/SDK/models/EInvoicing/V1/batch_error_detail.py +++ b/Avalara/SDK/models/EInvoicing/V1/batch_error_detail.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/batch_search.py b/Avalara/SDK/models/EInvoicing/V1/batch_search.py index 5541761..1fe8d44 100644 --- a/Avalara/SDK/models/EInvoicing/V1/batch_search.py +++ b/Avalara/SDK/models/EInvoicing/V1/batch_search.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/batch_search_list_response.py b/Avalara/SDK/models/EInvoicing/V1/batch_search_list_response.py index a3d9fda..24596ab 100644 --- a/Avalara/SDK/models/EInvoicing/V1/batch_search_list_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/batch_search_list_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/batch_search_participants202_response.py b/Avalara/SDK/models/EInvoicing/V1/batch_search_participants202_response.py index 54a63d6..5e76b39 100644 --- a/Avalara/SDK/models/EInvoicing/V1/batch_search_participants202_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/batch_search_participants202_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/code_list_list_response.py b/Avalara/SDK/models/EInvoicing/V1/code_list_list_response.py index a2fe612..7e4fce3 100644 --- a/Avalara/SDK/models/EInvoicing/V1/code_list_list_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/code_list_list_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/code_list_response.py b/Avalara/SDK/models/EInvoicing/V1/code_list_response.py index e595b1c..d11d75c 100644 --- a/Avalara/SDK/models/EInvoicing/V1/code_list_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/code_list_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/code_list_summary.py b/Avalara/SDK/models/EInvoicing/V1/code_list_summary.py index f7bc0a3..cf9238b 100644 --- a/Avalara/SDK/models/EInvoicing/V1/code_list_summary.py +++ b/Avalara/SDK/models/EInvoicing/V1/code_list_summary.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/code_list_value.py b/Avalara/SDK/models/EInvoicing/V1/code_list_value.py index 538eedf..bf6a02f 100644 --- a/Avalara/SDK/models/EInvoicing/V1/code_list_value.py +++ b/Avalara/SDK/models/EInvoicing/V1/code_list_value.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/code_list_version.py b/Avalara/SDK/models/EInvoicing/V1/code_list_version.py index abe2f6a..13af8c3 100644 --- a/Avalara/SDK/models/EInvoicing/V1/code_list_version.py +++ b/Avalara/SDK/models/EInvoicing/V1/code_list_version.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/conditional_for_field.py b/Avalara/SDK/models/EInvoicing/V1/conditional_for_field.py index db5f839..2d81ce6 100644 --- a/Avalara/SDK/models/EInvoicing/V1/conditional_for_field.py +++ b/Avalara/SDK/models/EInvoicing/V1/conditional_for_field.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/consents.py b/Avalara/SDK/models/EInvoicing/V1/consents.py index be74f12..e79ddd3 100644 --- a/Avalara/SDK/models/EInvoicing/V1/consents.py +++ b/Avalara/SDK/models/EInvoicing/V1/consents.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/create_trading_partner201_response.py b/Avalara/SDK/models/EInvoicing/V1/create_trading_partner201_response.py index c504dd9..6a60351 100644 --- a/Avalara/SDK/models/EInvoicing/V1/create_trading_partner201_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/create_trading_partner201_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response.py b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response.py index 89d12b6..90acdd7 100644 --- a/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response_value_inner.py b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response_value_inner.py index 6b413af..664006c 100644 --- a/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response_value_inner.py +++ b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response_value_inner.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch_request.py b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch_request.py index decf360..f0a7a26 100644 --- a/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch_request.py +++ b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch_request.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/data_input_field.py b/Avalara/SDK/models/EInvoicing/V1/data_input_field.py index ee6689e..024fb0f 100644 --- a/Avalara/SDK/models/EInvoicing/V1/data_input_field.py +++ b/Avalara/SDK/models/EInvoicing/V1/data_input_field.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/data_input_field_not_used_for.py b/Avalara/SDK/models/EInvoicing/V1/data_input_field_not_used_for.py index 91e14bf..4260555 100644 --- a/Avalara/SDK/models/EInvoicing/V1/data_input_field_not_used_for.py +++ b/Avalara/SDK/models/EInvoicing/V1/data_input_field_not_used_for.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/data_input_field_optional_for.py b/Avalara/SDK/models/EInvoicing/V1/data_input_field_optional_for.py index c0e2e08..0656c39 100644 --- a/Avalara/SDK/models/EInvoicing/V1/data_input_field_optional_for.py +++ b/Avalara/SDK/models/EInvoicing/V1/data_input_field_optional_for.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/data_input_field_required_for.py b/Avalara/SDK/models/EInvoicing/V1/data_input_field_required_for.py index b669b54..9c5ae11 100644 --- a/Avalara/SDK/models/EInvoicing/V1/data_input_field_required_for.py +++ b/Avalara/SDK/models/EInvoicing/V1/data_input_field_required_for.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/data_input_fields_response.py b/Avalara/SDK/models/EInvoicing/V1/data_input_fields_response.py index 37857f8..b6ea3ba 100644 --- a/Avalara/SDK/models/EInvoicing/V1/data_input_fields_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/data_input_fields_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/document_fetch.py b/Avalara/SDK/models/EInvoicing/V1/document_fetch.py index 6bb093b..4bb9b4d 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_fetch.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_fetch.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/document_list_response.py b/Avalara/SDK/models/EInvoicing/V1/document_list_response.py index cd48811..37ab17b 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_list_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_list_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/document_status_response.py b/Avalara/SDK/models/EInvoicing/V1/document_status_response.py index b2c1df3..d5890e5 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_status_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_status_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/document_submission_error.py b/Avalara/SDK/models/EInvoicing/V1/document_submission_error.py index b4414f2..d4b3d2d 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_submission_error.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_submission_error.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/document_submit_response.py b/Avalara/SDK/models/EInvoicing/V1/document_submit_response.py index 759a805..b8f30c6 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_submit_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_submit_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/document_summary.py b/Avalara/SDK/models/EInvoicing/V1/document_summary.py index c801356..5565c6d 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_summary.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_summary.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/error_response.py b/Avalara/SDK/models/EInvoicing/V1/error_response.py index 5eeb45e..db222db 100644 --- a/Avalara/SDK/models/EInvoicing/V1/error_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/error_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/event_id.py b/Avalara/SDK/models/EInvoicing/V1/event_id.py index fa52e71..e673a01 100644 --- a/Avalara/SDK/models/EInvoicing/V1/event_id.py +++ b/Avalara/SDK/models/EInvoicing/V1/event_id.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/event_message.py b/Avalara/SDK/models/EInvoicing/V1/event_message.py index 606b31d..43b21e3 100644 --- a/Avalara/SDK/models/EInvoicing/V1/event_message.py +++ b/Avalara/SDK/models/EInvoicing/V1/event_message.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/event_payload.py b/Avalara/SDK/models/EInvoicing/V1/event_payload.py index 3920931..553dd4e 100644 --- a/Avalara/SDK/models/EInvoicing/V1/event_payload.py +++ b/Avalara/SDK/models/EInvoicing/V1/event_payload.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/event_subscription.py b/Avalara/SDK/models/EInvoicing/V1/event_subscription.py index 3aff107..254d37e 100644 --- a/Avalara/SDK/models/EInvoicing/V1/event_subscription.py +++ b/Avalara/SDK/models/EInvoicing/V1/event_subscription.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/extension.py b/Avalara/SDK/models/EInvoicing/V1/extension.py index 67af49a..3bc7ec3 100644 --- a/Avalara/SDK/models/EInvoicing/V1/extension.py +++ b/Avalara/SDK/models/EInvoicing/V1/extension.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request.py b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request.py index 9765038..9136cd3 100644 --- a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request.py +++ b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_data_inner.py b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_data_inner.py index 66d8c9d..29836ec 100644 --- a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_data_inner.py +++ b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_data_inner.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_metadata.py b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_metadata.py index a897bf1..7d35f5e 100644 --- a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_metadata.py +++ b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_metadata.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/forbidden_error.py b/Avalara/SDK/models/EInvoicing/V1/forbidden_error.py index 913287d..358e884 100644 --- a/Avalara/SDK/models/EInvoicing/V1/forbidden_error.py +++ b/Avalara/SDK/models/EInvoicing/V1/forbidden_error.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/hmac_signature.py b/Avalara/SDK/models/EInvoicing/V1/hmac_signature.py index 0be67cb..9f05bdf 100644 --- a/Avalara/SDK/models/EInvoicing/V1/hmac_signature.py +++ b/Avalara/SDK/models/EInvoicing/V1/hmac_signature.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/hmac_signature_value.py b/Avalara/SDK/models/EInvoicing/V1/hmac_signature_value.py index 61b1e73..32eeced 100644 --- a/Avalara/SDK/models/EInvoicing/V1/hmac_signature_value.py +++ b/Avalara/SDK/models/EInvoicing/V1/hmac_signature_value.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/id.py b/Avalara/SDK/models/EInvoicing/V1/id.py index 2be86e7..da8f153 100644 --- a/Avalara/SDK/models/EInvoicing/V1/id.py +++ b/Avalara/SDK/models/EInvoicing/V1/id.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/identifier.py b/Avalara/SDK/models/EInvoicing/V1/identifier.py index 539f9d6..40af477 100644 --- a/Avalara/SDK/models/EInvoicing/V1/identifier.py +++ b/Avalara/SDK/models/EInvoicing/V1/identifier.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/input_data_formats.py b/Avalara/SDK/models/EInvoicing/V1/input_data_formats.py index fb9efa2..a763a6e 100644 --- a/Avalara/SDK/models/EInvoicing/V1/input_data_formats.py +++ b/Avalara/SDK/models/EInvoicing/V1/input_data_formats.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/internal_server_error.py b/Avalara/SDK/models/EInvoicing/V1/internal_server_error.py index bed8b97..cc0a33f 100644 --- a/Avalara/SDK/models/EInvoicing/V1/internal_server_error.py +++ b/Avalara/SDK/models/EInvoicing/V1/internal_server_error.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/mandate.py b/Avalara/SDK/models/EInvoicing/V1/mandate.py index fdb6b99..18c67be 100644 --- a/Avalara/SDK/models/EInvoicing/V1/mandate.py +++ b/Avalara/SDK/models/EInvoicing/V1/mandate.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field.py b/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field.py index a51de7c..573204c 100644 --- a/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field.py +++ b/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field_namespace.py b/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field_namespace.py index f42b688..ada1c05 100644 --- a/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field_namespace.py +++ b/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field_namespace.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/mandates_response.py b/Avalara/SDK/models/EInvoicing/V1/mandates_response.py index ea7e2ec..d018688 100644 --- a/Avalara/SDK/models/EInvoicing/V1/mandates_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/mandates_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/not_found_error.py b/Avalara/SDK/models/EInvoicing/V1/not_found_error.py index 3a7bbf7..471b50c 100644 --- a/Avalara/SDK/models/EInvoicing/V1/not_found_error.py +++ b/Avalara/SDK/models/EInvoicing/V1/not_found_error.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/not_used_for_field.py b/Avalara/SDK/models/EInvoicing/V1/not_used_for_field.py index 9c4506c..619c92a 100644 --- a/Avalara/SDK/models/EInvoicing/V1/not_used_for_field.py +++ b/Avalara/SDK/models/EInvoicing/V1/not_used_for_field.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/output_data_formats.py b/Avalara/SDK/models/EInvoicing/V1/output_data_formats.py index 3e9ddb1..6b2c930 100644 --- a/Avalara/SDK/models/EInvoicing/V1/output_data_formats.py +++ b/Avalara/SDK/models/EInvoicing/V1/output_data_formats.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/pagination.py b/Avalara/SDK/models/EInvoicing/V1/pagination.py index 5a97c99..3674cac 100644 --- a/Avalara/SDK/models/EInvoicing/V1/pagination.py +++ b/Avalara/SDK/models/EInvoicing/V1/pagination.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/report_download_response.py b/Avalara/SDK/models/EInvoicing/V1/report_download_response.py index 717cd07..d93e8b5 100644 --- a/Avalara/SDK/models/EInvoicing/V1/report_download_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/report_download_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/report_item.py b/Avalara/SDK/models/EInvoicing/V1/report_item.py index ce81598..f99e9ab 100644 --- a/Avalara/SDK/models/EInvoicing/V1/report_item.py +++ b/Avalara/SDK/models/EInvoicing/V1/report_item.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/report_list_response.py b/Avalara/SDK/models/EInvoicing/V1/report_list_response.py index 9190958..71d288a 100644 --- a/Avalara/SDK/models/EInvoicing/V1/report_list_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/report_list_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/required_when_field.py b/Avalara/SDK/models/EInvoicing/V1/required_when_field.py index ac1d14d..e177300 100644 --- a/Avalara/SDK/models/EInvoicing/V1/required_when_field.py +++ b/Avalara/SDK/models/EInvoicing/V1/required_when_field.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/search_participants200_response.py b/Avalara/SDK/models/EInvoicing/V1/search_participants200_response.py index f8bdcd1..310ebda 100644 --- a/Avalara/SDK/models/EInvoicing/V1/search_participants200_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/search_participants200_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/signature.py b/Avalara/SDK/models/EInvoicing/V1/signature.py index 6cc192f..7ef0a09 100644 --- a/Avalara/SDK/models/EInvoicing/V1/signature.py +++ b/Avalara/SDK/models/EInvoicing/V1/signature.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/signature_signature.py b/Avalara/SDK/models/EInvoicing/V1/signature_signature.py index 2a48bd1..593ed5a 100644 --- a/Avalara/SDK/models/EInvoicing/V1/signature_signature.py +++ b/Avalara/SDK/models/EInvoicing/V1/signature_signature.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/signature_value.py b/Avalara/SDK/models/EInvoicing/V1/signature_value.py index 5899b2a..6131d40 100644 --- a/Avalara/SDK/models/EInvoicing/V1/signature_value.py +++ b/Avalara/SDK/models/EInvoicing/V1/signature_value.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/signature_value_signature.py b/Avalara/SDK/models/EInvoicing/V1/signature_value_signature.py index ecfa7c9..a699b01 100644 --- a/Avalara/SDK/models/EInvoicing/V1/signature_value_signature.py +++ b/Avalara/SDK/models/EInvoicing/V1/signature_value_signature.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/status_event.py b/Avalara/SDK/models/EInvoicing/V1/status_event.py index 1120b29..71b6e5f 100644 --- a/Avalara/SDK/models/EInvoicing/V1/status_event.py +++ b/Avalara/SDK/models/EInvoicing/V1/status_event.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/submit_document_metadata.py b/Avalara/SDK/models/EInvoicing/V1/submit_document_metadata.py index d6bb6de..d0b08f1 100644 --- a/Avalara/SDK/models/EInvoicing/V1/submit_document_metadata.py +++ b/Avalara/SDK/models/EInvoicing/V1/submit_document_metadata.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/submit_interop_document202_response.py b/Avalara/SDK/models/EInvoicing/V1/submit_interop_document202_response.py index 163d4ec..ccb3217 100644 --- a/Avalara/SDK/models/EInvoicing/V1/submit_interop_document202_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/submit_interop_document202_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/subscription_common.py b/Avalara/SDK/models/EInvoicing/V1/subscription_common.py index 579e1e4..2f5daa4 100644 --- a/Avalara/SDK/models/EInvoicing/V1/subscription_common.py +++ b/Avalara/SDK/models/EInvoicing/V1/subscription_common.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/subscription_detail.py b/Avalara/SDK/models/EInvoicing/V1/subscription_detail.py index 500a185..4902a0c 100644 --- a/Avalara/SDK/models/EInvoicing/V1/subscription_detail.py +++ b/Avalara/SDK/models/EInvoicing/V1/subscription_detail.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/subscription_list_response.py b/Avalara/SDK/models/EInvoicing/V1/subscription_list_response.py index 03bb58a..1f419ae 100644 --- a/Avalara/SDK/models/EInvoicing/V1/subscription_list_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/subscription_list_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/subscription_registration.py b/Avalara/SDK/models/EInvoicing/V1/subscription_registration.py index b52f6bc..75b6988 100644 --- a/Avalara/SDK/models/EInvoicing/V1/subscription_registration.py +++ b/Avalara/SDK/models/EInvoicing/V1/subscription_registration.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/success_response.py b/Avalara/SDK/models/EInvoicing/V1/success_response.py index e9432d4..f2f3949 100644 --- a/Avalara/SDK/models/EInvoicing/V1/success_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/success_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/supported_document_statuses.py b/Avalara/SDK/models/EInvoicing/V1/supported_document_statuses.py index abff34f..90edb62 100644 --- a/Avalara/SDK/models/EInvoicing/V1/supported_document_statuses.py +++ b/Avalara/SDK/models/EInvoicing/V1/supported_document_statuses.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/supported_document_types.py b/Avalara/SDK/models/EInvoicing/V1/supported_document_types.py index 4a41e9d..73b193e 100644 --- a/Avalara/SDK/models/EInvoicing/V1/supported_document_types.py +++ b/Avalara/SDK/models/EInvoicing/V1/supported_document_types.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_request.py b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_request.py index 54bcc6a..5a1a74d 100644 --- a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_request.py +++ b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_request.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response.py b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response.py index 8810117..6f8fa72 100644 --- a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response_value.py b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response_value.py index 770e5d4..f5fc72e 100644 --- a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response_value.py +++ b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response_value.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_schema_by_country200_response.py b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_schema_by_country200_response.py index e073afb..ee1d134 100644 --- a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_schema_by_country200_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_schema_by_country200_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/trading_partner.py b/Avalara/SDK/models/EInvoicing/V1/trading_partner.py index bfd85b5..df33b0a 100644 --- a/Avalara/SDK/models/EInvoicing/V1/trading_partner.py +++ b/Avalara/SDK/models/EInvoicing/V1/trading_partner.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/update_trading_partner200_response.py b/Avalara/SDK/models/EInvoicing/V1/update_trading_partner200_response.py index 6ec453a..cf00a0a 100644 --- a/Avalara/SDK/models/EInvoicing/V1/update_trading_partner200_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/update_trading_partner200_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/validation_error.py b/Avalara/SDK/models/EInvoicing/V1/validation_error.py index 2c32d50..60bbb49 100644 --- a/Avalara/SDK/models/EInvoicing/V1/validation_error.py +++ b/Avalara/SDK/models/EInvoicing/V1/validation_error.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/webhook_invocation.py b/Avalara/SDK/models/EInvoicing/V1/webhook_invocation.py index b4ddc19..0b19c23 100644 --- a/Avalara/SDK/models/EInvoicing/V1/webhook_invocation.py +++ b/Avalara/SDK/models/EInvoicing/V1/webhook_invocation.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/webhooks_error_info.py b/Avalara/SDK/models/EInvoicing/V1/webhooks_error_info.py index 331e63c..e4b45f6 100644 --- a/Avalara/SDK/models/EInvoicing/V1/webhooks_error_info.py +++ b/Avalara/SDK/models/EInvoicing/V1/webhooks_error_info.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/webhooks_error_response.py b/Avalara/SDK/models/EInvoicing/V1/webhooks_error_response.py index 68d24b9..9096c67 100644 --- a/Avalara/SDK/models/EInvoicing/V1/webhooks_error_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/webhooks_error_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/Avalara/SDK/models/EInvoicing/V1/workflow_ids.py b/Avalara/SDK/models/EInvoicing/V1/workflow_ids.py index 3367af5..295aa64 100644 --- a/Avalara/SDK/models/EInvoicing/V1/workflow_ids.py +++ b/Avalara/SDK/models/EInvoicing/V1/workflow_ids.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @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 """ diff --git a/README.md b/README.md index d8b5be3..c97bfb1 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,7 @@ Class | Method | HTTP request | Description *Issuers1099Api* | [**get_issuers**](docs/A1099/V2/Issuers1099Api.md#get_issuers) | **GET** /1099/issuers | List issuers *Issuers1099Api* | [**update_issuer**](docs/A1099/V2/Issuers1099Api.md#update_issuer) | **PUT** /1099/issuers/{id} | Update an issuer *JobsApi* | [**get_job**](docs/A1099/V2/JobsApi.md#get_job) | **GET** /jobs/{id} | Retrieves information about the job +*TINMatchesApi* | [**perform_real_time_tin_match**](docs/A1099/V2/TINMatchesApi.md#perform_real_time_tin_match) | **POST** /tin-matches/$real-time | Perform real time TIN Match ## Documentation for Models @@ -303,7 +304,6 @@ Class | Method | HTTP request | Description ### A1099 V2 Model Documentation - - [Avalara.SDK.models.A1099.V2.CompanyBase](docs/A1099/V2/CompanyBase.md) - [Avalara.SDK.models.A1099.V2.CompanyRequest](docs/A1099/V2/CompanyRequest.md) - [Avalara.SDK.models.A1099.V2.CompanyResponse](docs/A1099/V2/CompanyResponse.md) - [Avalara.SDK.models.A1099.V2.CoveredIndividual](docs/A1099/V2/CoveredIndividual.md) @@ -328,10 +328,11 @@ Class | Method | HTTP request | Description - [Avalara.SDK.models.A1099.V2.Form1099W2](docs/A1099/V2/Form1099W2.md) - [Avalara.SDK.models.A1099.V2.Get1099Form200Response](docs/A1099/V2/Get1099Form200Response.md) - [Avalara.SDK.models.A1099.V2.IntermediaryOrFlowThrough](docs/A1099/V2/IntermediaryOrFlowThrough.md) + - [Avalara.SDK.models.A1099.V2.IrisFormBase](docs/A1099/V2/IrisFormBase.md) - [Avalara.SDK.models.A1099.V2.IrsResponse](docs/A1099/V2/IrsResponse.md) - - [Avalara.SDK.models.A1099.V2.IssuerBase](docs/A1099/V2/IssuerBase.md) - [Avalara.SDK.models.A1099.V2.IssuerRequest](docs/A1099/V2/IssuerRequest.md) - [Avalara.SDK.models.A1099.V2.IssuerResponse](docs/A1099/V2/IssuerResponse.md) + - [Avalara.SDK.models.A1099.V2.IssuerWriteResponse](docs/A1099/V2/IssuerWriteResponse.md) - [Avalara.SDK.models.A1099.V2.JobResponse](docs/A1099/V2/JobResponse.md) - [Avalara.SDK.models.A1099.V2.OfferAndCoverage](docs/A1099/V2/OfferAndCoverage.md) - [Avalara.SDK.models.A1099.V2.PaginatedQueryResultModelCompanyResponse](docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md) @@ -339,6 +340,9 @@ Class | Method | HTTP request | Description - [Avalara.SDK.models.A1099.V2.PaginatedQueryResultModelIssuerResponse](docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md) - [Avalara.SDK.models.A1099.V2.PaginatedQueryResultModelW9FormBaseResponse](docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md) - [Avalara.SDK.models.A1099.V2.PrimaryWithholdingAgent](docs/A1099/V2/PrimaryWithholdingAgent.md) + - [Avalara.SDK.models.A1099.V2.RealTimeTinMatchIrsResponse](docs/A1099/V2/RealTimeTinMatchIrsResponse.md) + - [Avalara.SDK.models.A1099.V2.RealTimeTinMatchRequest](docs/A1099/V2/RealTimeTinMatchRequest.md) + - [Avalara.SDK.models.A1099.V2.RealTimeTinMatchResponse](docs/A1099/V2/RealTimeTinMatchResponse.md) - [Avalara.SDK.models.A1099.V2.StateAndLocalWithholding](docs/A1099/V2/StateAndLocalWithholding.md) - [Avalara.SDK.models.A1099.V2.StateEfileStatusDetail](docs/A1099/V2/StateEfileStatusDetail.md) - [Avalara.SDK.models.A1099.V2.SubstantialUsOwnerRequest](docs/A1099/V2/SubstantialUsOwnerRequest.md) diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index 258f2ac..77f0377 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -1,6 +1,6 @@ # Avalara.SDK.CompaniesW9Api -All URIs are relative to *https://api.sbx.avalara.com/avalara1099* +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -45,7 +45,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = companies_w9_api.CompaniesW9Api(api_client) avalara_version = '2.0.0' # str | API version - x_correlation_id = 'd8a91153-a928-4bb1-9bdf-3108ec7a303d' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '445307e1-57a7-46d0-93bd-99c9cc698790' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) company_request = {"name":"Acme Corporation","dbaName":"","email":"contact@acmecorp.com","address":"123 Business Ave","city":"Phoenix","state":"AZ","zip":"85001","telephone":"602-555-0123","tin":"12-3456789","referenceId":"","doTinMatch":null,"groupName":"","foreignProvince":"","countryCode":"US","resendRequests":null,"resendIntervalDays":null,"maxReminderAttempts":null} # CompanyRequest | The company to create (optional) # example passing only required values which don't have defaults set @@ -132,7 +132,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = companies_w9_api.CompaniesW9Api(api_client) id = 'id_example' # str | The company to delete avalara_version = '2.0.0' # str | API version - x_correlation_id = '0f8143df-fd6a-47a4-9612-f0b1def1d6b0' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '983bdd19-d944-400f-a332-6dbed9977702' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -224,7 +224,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: order_by = 'order_by_example' # str | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) count = True # bool | If true, return the global count of elements in the collection. (optional) count_only = True # bool | If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) - x_correlation_id = '0f6ead76-1245-4eb9-9f7c-925733e9d4a7' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'c02a5d8b-6916-4d0c-9d97-e31bfc2020e1' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -318,7 +318,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = companies_w9_api.CompaniesW9Api(api_client) id = 'id_example' # str | Id of the company avalara_version = '2.0.0' # str | API version - x_correlation_id = '5d11a039-7f81-4ec9-b32f-b665ffe488e5' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'ccf63d6b-d313-44b9-bc14-86486a6c1b19' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -408,7 +408,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = companies_w9_api.CompaniesW9Api(api_client) id = 'id_example' # str | The ID of the company to update avalara_version = '2.0.0' # str | API version - x_correlation_id = '8e190a86-7ec8-4984-9126-c2d48e2ccdfc' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '57991ce4-31f7-41c8-8517-e363058bc302' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) company_request = {"name":"Acme Corporation","dbaName":"","email":"contact@acmecorp.com","address":"123 Business Ave","city":"Phoenix","state":"AZ","zip":"85001","telephone":"602-555-0123","tin":"12-3456789","referenceId":"","doTinMatch":null,"groupName":"","foreignProvince":"","countryCode":"US","resendRequests":null,"resendIntervalDays":null,"maxReminderAttempts":null} # CompanyRequest | The updated company data (optional) # example passing only required values which don't have defaults set diff --git a/docs/A1099/V2/CompanyResponse.md b/docs/A1099/V2/CompanyResponse.md index df12381..ea9f26e 100644 --- a/docs/A1099/V2/CompanyResponse.md +++ b/docs/A1099/V2/CompanyResponse.md @@ -5,9 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier set when the record is created. | [optional] -**created_at** | **datetime** | Date time when the record was created. | [optional] -**updated_at** | **datetime** | Date time when the record was last updated. | [optional] **name** | **str** | Legal name. Not the DBA name. | **dba_name** | **str** | Doing Business As (DBA) name or continuation of a long legal name. | [optional] **email** | **str** | Contact email address. For inquiries by vendors/employees. | @@ -25,6 +22,9 @@ Name | Type | Description | Notes **resend_requests** | **bool** | Boolean to enable automatic reminder emails (default: false). | [optional] **resend_interval_days** | **int** | Days between reminder emails (7-365, required if resendRequests is true). | [optional] **max_reminder_attempts** | **int** | Maximum number of reminder attempts (1-52, required if resendRequests is true). | [optional] +**id** | **str** | Unique identifier set when the record is created. | [optional] +**created_at** | **datetime** | Date time when the record was created. | [optional] +**updated_at** | **datetime** | Date time when the record was last updated. | [optional] ## Example diff --git a/docs/A1099/V2/CreateW9Form201Response.md b/docs/A1099/V2/CreateW9Form201Response.md index e130819..ae91142 100644 --- a/docs/A1099/V2/CreateW9Form201Response.md +++ b/docs/A1099/V2/CreateW9Form201Response.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **employee_middle_name** | **str** | The middle name of the employee. | [optional] **employee_last_name** | **str** | The last name of the employee. | [optional] **employee_name_suffix** | **str** | The name suffix of the employee. | [optional] -**tin_type** | **str** | Tax Identification Number (TIN) type. | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] **tin** | **str** | The taxpayer identification number (TIN). | [optional] **address** | **str** | The address of the individual or entity. | [optional] **city** | **str** | The city of the address. | [optional] diff --git a/docs/A1099/V2/CreateW9FormRequest.md b/docs/A1099/V2/CreateW9FormRequest.md index a63236c..db12b21 100644 --- a/docs/A1099/V2/CreateW9FormRequest.md +++ b/docs/A1099/V2/CreateW9FormRequest.md @@ -20,15 +20,15 @@ Name | Type | Description | Notes **state** | **str** | The state of residence of the employee. Required unless exempt. | **zip** | **str** | The ZIP code of residence of the employee. Required unless exempt. | **account_number** | **str** | The account number associated with the form. | [optional] -**tin_type** | **str** | Tax Identification Number (TIN) type. | +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | **tin** | **str** | The taxpayer identification number (TIN). | **backup_withholding** | **bool** | Indicates whether backup withholding applies. | [optional] **is1099able** | **bool** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] -**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] -**signature** | **str** | The signature of the form. | [optional] **company_id** | **str** | The ID of the associated company. Required when creating a form. | [optional] **reference_id** | **str** | A reference identifier for the form. | [optional] **email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] **citizenship_country** | **str** | The country of citizenship.. Allowed values: US, AF, AX, AL, AG, AQ, AN, AO, AV, AY (and 248 more) | **disregarded_entity** | **str** | The name of the disregarded entity receiving the payment (if applicable). | [optional] **entity_type** | **str** | Represents the entity type for tax forms. Each value corresponds to a specific entity classification. - 1: Corporation - 2: Disregarded entity - 3: Partnership - 4: Simple trust - 5: Grantor trust - 6: Complex trust - 7: Estate - 8: Foreign Government - Controlled Entity - 9: Central Bank of Issue - 10: Tax-exempt organization - 11: Private foundation - 12: International organization - 13: Foreign Government - Controlled Integral Part | diff --git a/docs/A1099/V2/Form1042S.md b/docs/A1099/V2/Form1042S.md index b296bc6..6faa829 100644 --- a/docs/A1099/V2/Form1042S.md +++ b/docs/A1099/V2/Form1042S.md @@ -6,7 +6,6 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] [readonly] **unique_form_id** | **str** | Unique form identifier | **recipient_date_of_birth** | **date** | Recipient's date of birth | [optional] **recipient_giin** | **str** | Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'. | [optional] @@ -39,16 +38,13 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -56,10 +52,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] @@ -69,6 +63,18 @@ Name | Type | Description | Notes **validation_errors** | [**List[ValidationError]**](ValidationError.md) | Validation errors | [optional] [readonly] **created_at** | **datetime** | Date time when the record was created. | [optional] [readonly] **updated_at** | **datetime** | Date time when the record was last updated. | [optional] [readonly] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] +**business_name2** | **str** | Business name line 2. Should only be used for businesses. | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix_name** | **str** | Suffix name. Should only be used for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] ## Example diff --git a/docs/A1099/V2/Form1095B.md b/docs/A1099/V2/Form1095B.md index 58a9f1d..38fcd38 100644 --- a/docs/A1099/V2/Form1095B.md +++ b/docs/A1099/V2/Form1095B.md @@ -21,17 +21,14 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -39,10 +36,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] diff --git a/docs/A1099/V2/Form1095C.md b/docs/A1099/V2/Form1095C.md index 5ea77fd..436b68f 100644 --- a/docs/A1099/V2/Form1095C.md +++ b/docs/A1099/V2/Form1095C.md @@ -23,17 +23,14 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -41,10 +38,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] diff --git a/docs/A1099/V2/Form1099Base.md b/docs/A1099/V2/Form1099Base.md index e1c4b3e..dd563e4 100644 --- a/docs/A1099/V2/Form1099Base.md +++ b/docs/A1099/V2/Form1099Base.md @@ -13,17 +13,14 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -31,10 +28,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] diff --git a/docs/A1099/V2/Form1099Div.md b/docs/A1099/V2/Form1099Div.md index a2a0a2b..c1ece5a 100644 --- a/docs/A1099/V2/Form1099Div.md +++ b/docs/A1099/V2/Form1099Div.md @@ -33,17 +33,13 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -51,10 +47,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] @@ -64,6 +58,18 @@ Name | Type | Description | Notes **validation_errors** | [**List[ValidationError]**](ValidationError.md) | Validation errors | [optional] [readonly] **created_at** | **datetime** | Date time when the record was created. | [optional] [readonly] **updated_at** | **datetime** | Date time when the record was last updated. | [optional] [readonly] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] +**business_name2** | **str** | Business name line 2. Should only be used for businesses. | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix_name** | **str** | Suffix name. Should only be used for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] ## Example diff --git a/docs/A1099/V2/Form1099Int.md b/docs/A1099/V2/Form1099Int.md index 6acd6fc..b596ed7 100644 --- a/docs/A1099/V2/Form1099Int.md +++ b/docs/A1099/V2/Form1099Int.md @@ -29,17 +29,13 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -47,10 +43,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] @@ -60,6 +54,18 @@ Name | Type | Description | Notes **validation_errors** | [**List[ValidationError]**](ValidationError.md) | Validation errors | [optional] [readonly] **created_at** | **datetime** | Date time when the record was created. | [optional] [readonly] **updated_at** | **datetime** | Date time when the record was last updated. | [optional] [readonly] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] +**business_name2** | **str** | Business name line 2. Should only be used for businesses. | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix_name** | **str** | Suffix name. Should only be used for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] ## Example diff --git a/docs/A1099/V2/Form1099K.md b/docs/A1099/V2/Form1099K.md index 653f99f..a84a0ff 100644 --- a/docs/A1099/V2/Form1099K.md +++ b/docs/A1099/V2/Form1099K.md @@ -34,17 +34,13 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -52,10 +48,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] @@ -65,6 +59,18 @@ Name | Type | Description | Notes **validation_errors** | [**List[ValidationError]**](ValidationError.md) | Validation errors | [optional] [readonly] **created_at** | **datetime** | Date time when the record was created. | [optional] [readonly] **updated_at** | **datetime** | Date time when the record was last updated. | [optional] [readonly] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] +**business_name2** | **str** | Business name line 2. Should only be used for businesses. | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix_name** | **str** | Suffix name. Should only be used for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] ## Example diff --git a/docs/A1099/V2/Form1099Misc.md b/docs/A1099/V2/Form1099Misc.md index bd3b6f9..4665e5b 100644 --- a/docs/A1099/V2/Form1099Misc.md +++ b/docs/A1099/V2/Form1099Misc.md @@ -29,17 +29,13 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -47,10 +43,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] @@ -60,6 +54,18 @@ Name | Type | Description | Notes **validation_errors** | [**List[ValidationError]**](ValidationError.md) | Validation errors | [optional] [readonly] **created_at** | **datetime** | Date time when the record was created. | [optional] [readonly] **updated_at** | **datetime** | Date time when the record was last updated. | [optional] [readonly] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] +**business_name2** | **str** | Business name line 2. Should only be used for businesses. | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix_name** | **str** | Suffix name. Should only be used for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] ## Example diff --git a/docs/A1099/V2/Form1099Nec.md b/docs/A1099/V2/Form1099Nec.md index 33117c2..2340b4c 100644 --- a/docs/A1099/V2/Form1099Nec.md +++ b/docs/A1099/V2/Form1099Nec.md @@ -18,17 +18,13 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -36,10 +32,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] @@ -49,6 +43,18 @@ Name | Type | Description | Notes **validation_errors** | [**List[ValidationError]**](ValidationError.md) | Validation errors | [optional] [readonly] **created_at** | **datetime** | Date time when the record was created. | [optional] [readonly] **updated_at** | **datetime** | Date time when the record was last updated. | [optional] [readonly] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] +**business_name2** | **str** | Business name line 2. Should only be used for businesses. | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix_name** | **str** | Suffix name. Should only be used for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] ## Example diff --git a/docs/A1099/V2/Form1099R.md b/docs/A1099/V2/Form1099R.md index 27ad068..269fddd 100644 --- a/docs/A1099/V2/Form1099R.md +++ b/docs/A1099/V2/Form1099R.md @@ -34,17 +34,13 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -52,10 +48,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] @@ -65,6 +59,18 @@ Name | Type | Description | Notes **validation_errors** | [**List[ValidationError]**](ValidationError.md) | Validation errors | [optional] [readonly] **created_at** | **datetime** | Date time when the record was created. | [optional] [readonly] **updated_at** | **datetime** | Date time when the record was last updated. | [optional] [readonly] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] +**business_name2** | **str** | Business name line 2. Should only be used for businesses. | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix_name** | **str** | Suffix name. Should only be used for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] ## Example diff --git a/docs/A1099/V2/Form1099W2.md b/docs/A1099/V2/Form1099W2.md index f7ef78a..b42e829 100644 --- a/docs/A1099/V2/Form1099W2.md +++ b/docs/A1099/V2/Form1099W2.md @@ -45,17 +45,13 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -63,10 +59,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] @@ -76,6 +70,18 @@ Name | Type | Description | Notes **validation_errors** | [**List[ValidationError]**](ValidationError.md) | Validation errors | [optional] [readonly] **created_at** | **datetime** | Date time when the record was created. | [optional] [readonly] **updated_at** | **datetime** | Date time when the record was last updated. | [optional] [readonly] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] +**business_name2** | **str** | Business name line 2. Should only be used for businesses. | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix_name** | **str** | Suffix name. Should only be used for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] ## Example diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index eedf82b..326fe80 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -1,6 +1,6 @@ # Avalara.SDK.Forms1099Api -All URIs are relative to *https://api.sbx.avalara.com/avalara1099* +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -48,9 +48,9 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = forms1099_api.Forms1099Api(api_client) avalara_version = '2.0.0' # str | API version dry_run = False # bool | defaults to false. If true, it will NOT change the DB. It will just return a report of what would've have been changed in the DB (optional) if omitted the server will use the default value of False - x_correlation_id = 'fd02f159-f2af-48e4-92b1-8185bcf20f90' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '7285c0b2-0432-4f2f-8d4e-2027526d39c5' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - form1099_list_request = {"type":"1042-S","forms":[{"type":"1042-S","issuerId":"12345","issuerReferenceId":"issuer-001","issuerTin":"94-2765431","taxYear":2025,"referenceId":"1042S-REF-001","tin":"112233445","recipientName":"Michael Jackson","recipientSecondName":"SuperStart","address":"1234 Corporate Blvd","address2":"Suite 500","city":"Anytown","state":"MA","zip":"12345","email":"email@example.com","accountNumber":"ACC01","nonUsProvince":null,"countryCode":"US","federalEfileDate":"2025-03-15","postalMail":true,"stateEfileDate":null,"recipientEdeliveryDate":"2025-03-25","tinMatch":false,"noTin":false,"addressVerification":true,"stateAndLocalWithholding":{"stateTaxWithheld":50,"state":"CA","stateId":"CA98765432"},"secondTinNotice":true,"uniqueFormId":"1234567890","recipientDateOfBirth":"1990-01-01","recipientGiin":"748291.59302.US.001","recipientForeignTin":"920456.38475.GM.002","lobCode":"06","incomeCode":"16","grossIncome":10000.5,"withholdingIndicator":"3","taxCountryCode":"GM","exemptionCodeChap3":"00","exemptionCodeChap4":"13","taxRateChap3":"30.00","withholdingAllowance":15,"federalTaxWithheld":1500.25,"taxNotDepositedIndicator":true,"academicIndicator":true,"withholdingRatePoolIndicator":null,"taxWithheldOtherAgents":100,"amountRepaid":200,"taxPaidAgent":50.5,"chap3StatusCode":"06","chap4StatusCode":"02","primaryWithholdingAgent":{"name":"Primary Agent Name","ein":"98-3456789"},"intermediaryOrFlowThrough":{"ein":"98-7654321","chap3StatusCode":"03","chap4StatusCode":"04","name":"Intermediary Name","giin":"748291.59302.US.002","countryCode":"US","foreignTin":"123-45-6789","address":"123 Main St.","city":"Cityville","state":"CA","zip":"98765"}}]} # Form1099ListRequest | (optional) + form1099_list_request = {"type":"1042-S","forms":[{"type":"1042-S","issuerId":"12345","issuerReferenceId":"issuer-001","issuerTin":"94-2765431","taxYear":2025,"referenceId":"1042S-REF-001","tin":"112233445","recipientName":null,"address":"1234 Corporate Blvd","address2":"Suite 500","city":"Anytown","state":"MA","zip":"12345","email":"email@example.com","nonUsProvince":null,"countryCode":"US","federalEfileDate":"2025-03-15","postalMail":true,"stateEfileDate":null,"recipientEdeliveryDate":"2025-03-25","tinMatch":false,"addressVerification":true,"stateAndLocalWithholding":{"stateTaxWithheld":50,"state":"CA","stateId":"CA98765432"},"tinType":"INDIVIDUAL","businessName":null,"businessName2":null,"firstName":"Michael","middleName":"Joseph","lastName":"Jackson","suffixName":"Jr","recipientSecondName":null,"accountNumber":"ACC01","noTin":false,"secondTinNotice":true,"uniqueFormId":"1234567890","recipientDateOfBirth":"1990-01-01","recipientGiin":"748291.59302.US.001","recipientForeignTin":"920456.38475.GM.002","lobCode":"06","incomeCode":"16","grossIncome":10000.5,"withholdingIndicator":"3","taxCountryCode":"GM","exemptionCodeChap3":"00","exemptionCodeChap4":"13","taxRateChap3":"30.00","withholdingAllowance":15,"federalTaxWithheld":1500.25,"taxNotDepositedIndicator":true,"academicIndicator":true,"withholdingRatePoolIndicator":null,"taxWithheldOtherAgents":100,"amountRepaid":200,"taxPaidAgent":50.5,"chap3StatusCode":"06","chap4StatusCode":"02","primaryWithholdingAgent":{"name":"Primary Agent Name","ein":"98-3456789"},"intermediaryOrFlowThrough":{"ein":"98-7654321","chap3StatusCode":"03","chap4StatusCode":"04","name":"Intermediary Name","giin":"748291.59302.US.002","countryCode":"US","foreignTin":"123-45-6789","address":"123 Main St.","city":"Cityville","state":"CA","zip":"98765"}}]} # Form1099ListRequest | (optional) # example passing only required values which don't have defaults set try: # Create or update multiple 1099/1095/W2/1042S forms @@ -138,9 +138,9 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms1099_api.Forms1099Api(api_client) avalara_version = '2.0.0' # str | API version - x_correlation_id = 'b5153c6c-b731-4d1d-a3fb-d618e239d65c' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '23791bc3-1ee7-4dc9-a782-7ebe65332730' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - get1099_form200_response = {"type":"1042-S","issuerId":"12345","referenceId":"1042S-REF-001","tin":"112233445","recipientName":"Michael Jackson","recipientSecondName":"SuperStart","address":"1234 Corporate Blvd","address2":"Suite 500","city":"Anytown","state":"MA","zip":"12345","email":"email@example.com","accountNumber":"ACC01","nonUsProvince":null,"countryCode":"US","federalEfileDate":"2025-03-15","postalMail":true,"stateEfileDate":null,"recipientEdeliveryDate":"2025-03-25","tinMatch":false,"noTin":false,"addressVerification":true,"stateAndLocalWithholding":{"stateTaxWithheld":50,"state":"CA","stateId":"CA98765432"},"secondTinNotice":true,"uniqueFormId":"1234567890","recipientDateOfBirth":"1990-01-01","recipientGiin":"748291.59302.US.001","recipientForeignTin":"920456.38475.GM.002","lobCode":"06","incomeCode":"16","grossIncome":10000.5,"withholdingIndicator":"3","taxCountryCode":"GM","exemptionCodeChap3":"00","exemptionCodeChap4":"13","taxRateChap3":"30.00","withholdingAllowance":15,"federalTaxWithheld":1500.25,"taxNotDepositedIndicator":true,"academicIndicator":true,"withholdingRatePoolIndicator":null,"taxWithheldOtherAgents":100,"amountRepaid":200,"taxPaidAgent":50.5,"chap3StatusCode":"06","chap4StatusCode":"02","primaryWithholdingAgent":{"name":"Primary Agent Name","ein":"98-3456789"},"intermediaryOrFlowThrough":{"ein":"98-7654321","chap3StatusCode":"03","chap4StatusCode":"04","name":"Intermediary Name","giin":"748291.59302.US.002","countryCode":"US","foreignTin":"123-45-6789","address":"123 Main St.","city":"Cityville","state":"CA","zip":"98765"}} # Get1099Form200Response | (optional) + get1099_form200_response = {"type":"1042-S","issuerId":"12345","referenceId":"1042S-REF-001","tin":"112233445","recipientName":null,"address":"1234 Corporate Blvd","address2":"Suite 500","city":"Anytown","state":"MA","zip":"12345","email":"email@example.com","nonUsProvince":null,"countryCode":"US","federalEfileDate":"2025-03-15","postalMail":true,"stateEfileDate":null,"recipientEdeliveryDate":"2025-03-25","tinMatch":false,"addressVerification":true,"stateAndLocalWithholding":{"stateTaxWithheld":50,"state":"CA","stateId":"CA98765432"},"tinType":"INDIVIDUAL","businessName":null,"businessName2":null,"firstName":"Michael","middleName":"Joseph","lastName":"Jackson","suffixName":"Jr","recipientSecondName":null,"accountNumber":"ACC01","noTin":false,"secondTinNotice":true,"uniqueFormId":"1234567890","recipientDateOfBirth":"1990-01-01","recipientGiin":"748291.59302.US.001","recipientForeignTin":"920456.38475.GM.002","lobCode":"06","incomeCode":"16","grossIncome":10000.5,"withholdingIndicator":"3","taxCountryCode":"GM","exemptionCodeChap3":"00","exemptionCodeChap4":"13","taxRateChap3":"30.00","withholdingAllowance":15,"federalTaxWithheld":1500.25,"taxNotDepositedIndicator":true,"academicIndicator":true,"withholdingRatePoolIndicator":null,"taxWithheldOtherAgents":100,"amountRepaid":200,"taxPaidAgent":50.5,"chap3StatusCode":"06","chap4StatusCode":"02","primaryWithholdingAgent":{"name":"Primary Agent Name","ein":"98-3456789"},"intermediaryOrFlowThrough":{"ein":"98-7654321","chap3StatusCode":"03","chap4StatusCode":"04","name":"Intermediary Name","giin":"748291.59302.US.002","countryCode":"US","foreignTin":"123-45-6789","address":"123 Main St.","city":"Cityville","state":"CA","zip":"98765"}} # Get1099Form200Response | (optional) # example passing only required values which don't have defaults set try: # Create a 1099/1095/W2/1042S form @@ -226,7 +226,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = forms1099_api.Forms1099Api(api_client) id = 'id_example' # str | The unique identifier of the desired form to delete. avalara_version = '2.0.0' # str | API version - x_correlation_id = 'e9de0484-cb5a-4d77-aeb0-06ed67420a2d' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'd970b833-acc0-4278-8e3f-a950755e5260' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -314,7 +314,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = forms1099_api.Forms1099Api(api_client) id = 'id_example' # str | avalara_version = '2.0.0' # str | API version - x_correlation_id = 'f9e45fdc-29d9-456e-b5b6-ce3218225878' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '28cce977-9cdb-4520-bf8c-89b9d8195133' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -403,7 +403,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: id = 'id_example' # str | The ID of the form avalara_version = '2.0.0' # str | API version mark_edelivered = True # bool | Optional boolean that if set indicates that the form should be marked as having been successfully edelivered (optional) - x_correlation_id = '8c295caf-1568-4d0d-8e0c-7152a9204c11' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '2d57149a-71b6-4123-9ba3-49c09d4df472' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -498,7 +498,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: order_by = 'order_by_example' # str | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) count = True # bool | If true, return the global count of elements in the collection. (optional) count_only = True # bool | If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) - x_correlation_id = '857d60b8-f4d6-4f00-bc39-3bcf1d8d72f6' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'e3fd9737-b458-4a1d-9874-d3990ecff109' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -592,9 +592,9 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = forms1099_api.Forms1099Api(api_client) id = 'id_example' # str | avalara_version = '2.0.0' # str | API version - x_correlation_id = '0d0b68af-3130-4571-a05e-a21427cbf280' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '07227337-490f-48f8-97d6-b0aaac48d3e6' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - get1099_form200_response = {"type":"1042-S","issuerId":"12345","referenceId":"1042S-REF-001","tin":"112233445","recipientName":"Michael Jackson","recipientSecondName":"SuperStart","address":"1234 Corporate Blvd","address2":"Suite 500","city":"Anytown","state":"MA","zip":"12345","email":"email@example.com","accountNumber":"ACC01","nonUsProvince":null,"countryCode":"US","federalEfileDate":"2025-03-15","postalMail":true,"stateEfileDate":null,"recipientEdeliveryDate":"2025-03-25","tinMatch":false,"noTin":false,"addressVerification":true,"stateAndLocalWithholding":{"stateTaxWithheld":50,"state":"CA","stateId":"CA98765432"},"secondTinNotice":true,"uniqueFormId":"1234567890","recipientDateOfBirth":"1990-01-01","recipientGiin":"748291.59302.US.001","recipientForeignTin":"920456.38475.GM.002","lobCode":"06","incomeCode":"16","grossIncome":10000.5,"withholdingIndicator":"3","taxCountryCode":"GM","exemptionCodeChap3":"00","exemptionCodeChap4":"13","taxRateChap3":"30.00","withholdingAllowance":15,"federalTaxWithheld":1500.25,"taxNotDepositedIndicator":true,"academicIndicator":true,"withholdingRatePoolIndicator":null,"taxWithheldOtherAgents":100,"amountRepaid":200,"taxPaidAgent":50.5,"chap3StatusCode":"06","chap4StatusCode":"02","primaryWithholdingAgent":{"name":"Primary Agent Name","ein":"98-3456789"},"intermediaryOrFlowThrough":{"ein":"98-7654321","chap3StatusCode":"03","chap4StatusCode":"04","name":"Intermediary Name","giin":"748291.59302.US.002","countryCode":"US","foreignTin":"123-45-6789","address":"123 Main St.","city":"Cityville","state":"CA","zip":"98765"}} # Get1099Form200Response | (optional) + get1099_form200_response = {"type":"1042-S","issuerId":"12345","referenceId":"1042S-REF-001","tin":"112233445","recipientName":null,"address":"1234 Corporate Blvd","address2":"Suite 500","city":"Anytown","state":"MA","zip":"12345","email":"email@example.com","nonUsProvince":null,"countryCode":"US","federalEfileDate":"2025-03-15","postalMail":true,"stateEfileDate":null,"recipientEdeliveryDate":"2025-03-25","tinMatch":false,"addressVerification":true,"stateAndLocalWithholding":{"stateTaxWithheld":50,"state":"CA","stateId":"CA98765432"},"tinType":"INDIVIDUAL","businessName":null,"businessName2":null,"firstName":"Michael","middleName":"Joseph","lastName":"Jackson","suffixName":"Jr","recipientSecondName":null,"accountNumber":"ACC01","noTin":false,"secondTinNotice":true,"uniqueFormId":"1234567890","recipientDateOfBirth":"1990-01-01","recipientGiin":"748291.59302.US.001","recipientForeignTin":"920456.38475.GM.002","lobCode":"06","incomeCode":"16","grossIncome":10000.5,"withholdingIndicator":"3","taxCountryCode":"GM","exemptionCodeChap3":"00","exemptionCodeChap4":"13","taxRateChap3":"30.00","withholdingAllowance":15,"federalTaxWithheld":1500.25,"taxNotDepositedIndicator":true,"academicIndicator":true,"withholdingRatePoolIndicator":null,"taxWithheldOtherAgents":100,"amountRepaid":200,"taxPaidAgent":50.5,"chap3StatusCode":"06","chap4StatusCode":"02","primaryWithholdingAgent":{"name":"Primary Agent Name","ein":"98-3456789"},"intermediaryOrFlowThrough":{"ein":"98-7654321","chap3StatusCode":"03","chap4StatusCode":"04","name":"Intermediary Name","giin":"748291.59302.US.002","countryCode":"US","foreignTin":"123-45-6789","address":"123 Main St.","city":"Cityville","state":"CA","zip":"98765"}} # Get1099Form200Response | (optional) # example passing only required values which don't have defaults set try: # Update a 1099/1095/W2/1042S form diff --git a/docs/A1099/V2/FormsW9Api.md b/docs/A1099/V2/FormsW9Api.md index 11e4ed0..65fa008 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -1,6 +1,6 @@ # Avalara.SDK.FormsW9Api -All URIs are relative to *https://api.sbx.avalara.com/avalara1099* +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -49,7 +49,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms_w9_api.FormsW9Api(api_client) avalara_version = '2.0.0' # str | API version - x_correlation_id = '0b0e88b5-6443-4c90-a5c9-28bde5a4d4a0' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'c842afc6-dce2-410c-a95e-c71b5236892f' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) create_and_send_w9_form_email_request = {"type":"W9","email":"john.doe@example.com","name":"John Doe","accountNumber":"ACC01","companyId":"12345","referenceId":"REF-12345"} # CreateAndSendW9FormEmailRequest | Form to be created (optional) # example passing only required values which don't have defaults set @@ -137,7 +137,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms_w9_api.FormsW9Api(api_client) avalara_version = '2.0.0' # str | API version - x_correlation_id = '3439cc97-e4ae-482a-8d89-ed3bee63a053' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '3f573288-3491-46f3-8c49-896d5778a376' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) create_w9_form_request = {"type":"W9","name":"John Doe","businessName":"Acme Inc.","businessClassification":"Individual","businessOther":null,"foreignPartnerOwnerOrBeneficiary":false,"exemptPayeeCode":"5","exemptFatcaCode":"A","foreignCountryIndicator":false,"address":"123 Main St.","foreignAddress":null,"city":"Anytown","state":"CA","zip":"12345","accountNumber":"ACC123456","tinType":"SSN","tin":"543456789","backupWithholding":false,"is1099able":true,"eDeliveryConsentedAt":"2024-05-01T10:30:10.000000","signature":null,"companyId":"32553266","referenceId":"REF12345","email":"johndoe@example.com"} # CreateW9FormRequest | Form to be created (optional) # example passing only required values which don't have defaults set @@ -224,7 +224,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = forms_w9_api.FormsW9Api(api_client) id = 'id_example' # str | ID of the form to delete avalara_version = '2.0.0' # str | API version - x_correlation_id = 'f712b02e-1b2f-482f-89ac-c809e42238f4' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '48db4467-ed91-463f-899d-9f505667d9de' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -309,7 +309,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = forms_w9_api.FormsW9Api(api_client) id = 'id_example' # str | ID of the form avalara_version = '2.0.0' # str | API version - x_correlation_id = '636fe950-3af0-42df-95ed-0868ba340628' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'b3f1951f-f9f7-484a-9a90-b805a5641766' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -395,7 +395,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = forms_w9_api.FormsW9Api(api_client) id = 'id_example' # str | Id of the form avalara_version = '2.0.0' # str | API version - x_correlation_id = '378b0ba7-8d33-499d-a7d4-8bdc3a3648f8' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '1286516d-cd84-4daf-9381-4f20acea9619' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -488,7 +488,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: order_by = 'order_by_example' # str | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) count = True # bool | If true, return the global count of elements in the collection. (optional) count_only = True # bool | If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) - x_correlation_id = '6a525897-0868-4606-bad3-04892c61a573' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'e482d129-5ce4-4b4a-a4fd-c360b92c6a77' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -580,7 +580,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = forms_w9_api.FormsW9Api(api_client) id = 'id_example' # str | The ID of the W9/W4/W8 form. avalara_version = '2.0.0' # str | API version - x_correlation_id = '1f36d8fe-d804-4194-b4be-31a5b02ae9f9' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '234cbc16-88cc-4fbb-85a6-07bc770529d3' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -670,7 +670,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = forms_w9_api.FormsW9Api(api_client) id = 'id_example' # str | ID of the form to update avalara_version = '2.0.0' # str | API version - x_correlation_id = 'ffdf8c9a-cf07-4fe0-b737-38d1c044a0dc' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'cdef88f5-1b1d-42fd-a2c3-01d14e9d7cb9' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) create_w9_form_request = {"type":"W9","name":"John Doe","businessName":"Acme Inc.","businessClassification":"Individual","businessOther":null,"foreignPartnerOwnerOrBeneficiary":false,"exemptPayeeCode":"5","exemptFatcaCode":"A","foreignCountryIndicator":false,"address":"123 Main St.","foreignAddress":null,"city":"Anytown","state":"CA","zip":"12345","accountNumber":"ACC123456","tinType":"SSN","tin":"543456789","backupWithholding":false,"is1099able":true,"eDeliveryConsentedAt":"2024-05-01T10:30:10.000000","signature":null,"referenceId":"REF12345","email":"johndoe@example.com"} # CreateW9FormRequest | Form to be updated (optional) # example passing only required values which don't have defaults set @@ -759,7 +759,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = forms_w9_api.FormsW9Api(api_client) id = 'id_example' # str | Id of the form avalara_version = '2.0.0' # str | API version - x_correlation_id = 'd669f88f-c57a-4a17-9f05-cabe7ebe0b5b' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'dccfb6c1-f301-4c9a-89ae-baa7065ab8f2' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) file = None # bytearray | (optional) # example passing only required values which don't have defaults set diff --git a/docs/A1099/V2/Get1099Form200Response.md b/docs/A1099/V2/Get1099Form200Response.md index 762198b..b0ddb8a 100644 --- a/docs/A1099/V2/Get1099Form200Response.md +++ b/docs/A1099/V2/Get1099Form200Response.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] **unique_form_id** | **str** | Unique form identifier | **recipient_date_of_birth** | **date** | Recipient's date of birth | [optional] **recipient_giin** | **str** | Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'. | [optional] @@ -38,16 +37,13 @@ Name | Type | Description | Notes **tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] **tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] -**recipient_name** | **str** | Recipient name | -**recipient_second_name** | **str** | Recipient second name | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] **address** | **str** | Address. | **address2** | **str** | Address line 2. | [optional] **city** | **str** | City. | **state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] **zip** | **str** | ZIP/postal code. | [optional] **email** | **str** | Recipient's Contact email address. | [optional] -**account_number** | **str** | Account number | [optional] -**office_code** | **str** | Office code | [optional] **non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] **country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | **federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] @@ -55,10 +51,8 @@ Name | Type | Description | Notes **state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] **tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] -**no_tin** | **bool** | No TIN indicator | [optional] **address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] -**second_tin_notice** | **bool** | Second TIN notice | [optional] **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] **state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] @@ -68,6 +62,18 @@ Name | Type | Description | Notes **validation_errors** | [**List[ValidationError]**](ValidationError.md) | Validation errors | [optional] [readonly] **created_at** | **datetime** | Date time when the record was created. | [optional] [readonly] **updated_at** | **datetime** | Date time when the record was last updated. | [optional] [readonly] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] +**business_name2** | **str** | Business name line 2. Should only be used for businesses. | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix_name** | **str** | Suffix name. Should only be used for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] **employee_first_name** | **str** | Employee first name (max 15 chars). | **employee_middle_name** | **str** | Employee middle name (max 15 chars, optional). | [optional] **employee_last_name** | **str** | Employee last name (max 20 chars). | diff --git a/docs/A1099/V2/GetIssuer200Response.md b/docs/A1099/V2/GetIssuer200Response.md new file mode 100644 index 0000000..582d24c --- /dev/null +++ b/docs/A1099/V2/GetIssuer200Response.md @@ -0,0 +1,54 @@ +# GetIssuer200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier set when the record is created. | [optional] +**created_at** | **datetime** | Date time when the record was created. | [optional] +**updated_at** | **datetime** | Date time when the record was last updated. | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | +**business_name2** | **str** | Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. | [optional] +**name** | **str** | Legal name. Not the DBA name. Deprecated alias for 'businessName'. | [optional] +**dba_name** | **str** | Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix** | **str** | Suffix name. Should only be used for individuals. | [optional] +**tin** | **str** | Federal Tax Identification Number (TIN). | [optional] +**reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] +**telephone** | **str** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | +**tax_year** | **int** | Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. It's only required on creation, and cannot be modified on update. | +**country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. | +**email** | **str** | Contact email address. For recipient inquiries. Phone will be used on communications if you don't specify an email | [optional] +**address** | **str** | Address. | +**city** | **str** | City. | +**state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | +**zip** | **str** | ZIP/postal code. | +**foreign_province** | **str** | Province or region for non-US/CA addresses. | [optional] +**transfer_agent_name** | **str** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] +**last_filing** | **bool** | Indicates if this is the issuer's final year filing. | +**validation_errors** | [**List[ValidationError]**](ValidationError.md) | Field-level validation errors. Populated when a POST or PUT request violated business rules but the issuer was still persisted. Each entry identifies the affected field and the issue. Empty array when the payload was fully valid. | [optional] [readonly] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.get_issuer200_response import GetIssuer200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetIssuer200Response from a JSON string +get_issuer200_response_instance = GetIssuer200Response.from_json(json) +# print the JSON string representation of the object +print(GetIssuer200Response.to_json()) + +# convert the object into a dict +get_issuer200_response_dict = get_issuer200_response_instance.to_dict() +# create an instance of GetIssuer200Response from a dict +get_issuer200_response_from_dict = GetIssuer200Response.from_dict(get_issuer200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/IrisFormBase.md b/docs/A1099/V2/IrisFormBase.md new file mode 100644 index 0000000..631c38d --- /dev/null +++ b/docs/A1099/V2/IrisFormBase.md @@ -0,0 +1,73 @@ +# IrisFormBase + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Form type. | +**id** | **str** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **str** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **str** | Issuer Reference ID - only required when creating forms via $bulk-upsert | [optional] +**issuer_tin** | **str** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms via $bulk-upsert | [optional] +**reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **str** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **str** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] +**address** | **str** | Address. | +**address2** | **str** | Address line 2. | [optional] +**city** | **str** | City. | +**state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **str** | ZIP/postal code. | [optional] +**email** | **str** | Recipient's Contact email address. | [optional] +**non_us_province** | **str** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **date** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **date** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] +**recipient_edelivery_date** | **date** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] +**state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] +**postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] +**tin_match_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued | [optional] [readonly] +**address_verification_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted | [optional] [readonly] +**e_delivery_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend) | [optional] [readonly] +**validation_errors** | [**List[ValidationError]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **datetime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **datetime** | Date time when the record was last updated. | [optional] [readonly] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] +**business_name2** | **str** | Business name line 2. Should only be used for businesses. | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix_name** | **str** | Suffix name. Should only be used for individuals. | [optional] +**recipient_second_name** | **str** | DEPRECATED: Use `businessName2` instead. | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.iris_form_base import IrisFormBase + +# TODO update the JSON string below +json = "{}" +# create an instance of IrisFormBase from a JSON string +iris_form_base_instance = IrisFormBase.from_json(json) +# print the JSON string representation of the object +print(IrisFormBase.to_json()) + +# convert the object into a dict +iris_form_base_dict = iris_form_base_instance.to_dict() +# create an instance of IrisFormBase from a dict +iris_form_base_from_dict = IrisFormBase.from_dict(iris_form_base_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/IssuerBase.md b/docs/A1099/V2/IssuerBase.md index 49097a3..71b45ec 100644 --- a/docs/A1099/V2/IssuerBase.md +++ b/docs/A1099/V2/IssuerBase.md @@ -5,8 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Legal name. Not the DBA name. | -**dba_name** | **str** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | +**business_name2** | **str** | Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. | [optional] +**name** | **str** | Legal name. Not the DBA name. Deprecated alias for 'businessName'. | [optional] +**dba_name** | **str** | Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix** | **str** | Suffix name. Should only be used for individuals. | [optional] **tin** | **str** | Federal Tax Identification Number (TIN). | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] **telephone** | **str** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | diff --git a/docs/A1099/V2/IssuerRequest.md b/docs/A1099/V2/IssuerRequest.md index e3c3fa1..f0f4cf3 100644 --- a/docs/A1099/V2/IssuerRequest.md +++ b/docs/A1099/V2/IssuerRequest.md @@ -5,8 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Legal name. Not the DBA name. | -**dba_name** | **str** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | +**business_name2** | **str** | Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. | [optional] +**name** | **str** | Legal name. Not the DBA name. Deprecated alias for 'businessName'. | [optional] +**dba_name** | **str** | Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix** | **str** | Suffix name. Should only be used for individuals. | [optional] **tin** | **str** | Federal Tax Identification Number (TIN). | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] **telephone** | **str** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | diff --git a/docs/A1099/V2/IssuerResponse.md b/docs/A1099/V2/IssuerResponse.md index 6bc42b4..f41bf97 100644 --- a/docs/A1099/V2/IssuerResponse.md +++ b/docs/A1099/V2/IssuerResponse.md @@ -5,11 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier set when the record is created. | [optional] -**created_at** | **datetime** | Date time when the record was created. | [optional] -**updated_at** | **datetime** | Date time when the record was last updated. | [optional] -**name** | **str** | Legal name. Not the DBA name. | -**dba_name** | **str** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | +**business_name2** | **str** | Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. | [optional] +**name** | **str** | Legal name. Not the DBA name. Deprecated alias for 'businessName'. | [optional] +**dba_name** | **str** | Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix** | **str** | Suffix name. Should only be used for individuals. | [optional] **tin** | **str** | Federal Tax Identification Number (TIN). | [optional] **reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] **telephone** | **str** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | @@ -23,6 +27,9 @@ Name | Type | Description | Notes **foreign_province** | **str** | Province or region for non-US/CA addresses. | [optional] **transfer_agent_name** | **str** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] **last_filing** | **bool** | Indicates if this is the issuer's final year filing. | +**id** | **str** | Unique identifier set when the record is created. | [optional] +**created_at** | **datetime** | Date time when the record was created. | [optional] +**updated_at** | **datetime** | Date time when the record was last updated. | [optional] ## Example diff --git a/docs/A1099/V2/IssuerWriteResponse.md b/docs/A1099/V2/IssuerWriteResponse.md new file mode 100644 index 0000000..d24e38b --- /dev/null +++ b/docs/A1099/V2/IssuerWriteResponse.md @@ -0,0 +1,54 @@ +# IssuerWriteResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**business_name** | **str** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | +**business_name2** | **str** | Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. | [optional] +**name** | **str** | Legal name. Not the DBA name. Deprecated alias for 'businessName'. | [optional] +**dba_name** | **str** | Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] +**first_name** | **str** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**middle_name** | **str** | Middle name. Should only be used for individuals. | [optional] +**last_name** | **str** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] +**suffix** | **str** | Suffix name. Should only be used for individuals. | [optional] +**tin** | **str** | Federal Tax Identification Number (TIN). | [optional] +**reference_id** | **str** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] +**telephone** | **str** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | +**tax_year** | **int** | Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. It's only required on creation, and cannot be modified on update. | +**country_code** | **str** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. | +**email** | **str** | Contact email address. For recipient inquiries. Phone will be used on communications if you don't specify an email | [optional] +**address** | **str** | Address. | +**city** | **str** | City. | +**state** | **str** | Two-letter US state or Canadian province code (required for US/CA addresses). | +**zip** | **str** | ZIP/postal code. | +**foreign_province** | **str** | Province or region for non-US/CA addresses. | [optional] +**transfer_agent_name** | **str** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] +**last_filing** | **bool** | Indicates if this is the issuer's final year filing. | +**id** | **str** | Unique identifier set when the record is created. | [optional] +**created_at** | **datetime** | Date time when the record was created. | [optional] +**updated_at** | **datetime** | Date time when the record was last updated. | [optional] +**validation_errors** | [**List[ValidationError]**](ValidationError.md) | Field-level validation errors. Populated when a POST or PUT request violated business rules but the issuer was still persisted. Each entry identifies the affected field and the issue. Empty array when the payload was fully valid. | [optional] [readonly] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.issuer_write_response import IssuerWriteResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of IssuerWriteResponse from a JSON string +issuer_write_response_instance = IssuerWriteResponse.from_json(json) +# print the JSON string representation of the object +print(IssuerWriteResponse.to_json()) + +# convert the object into a dict +issuer_write_response_dict = issuer_write_response_instance.to_dict() +# create an instance of IssuerWriteResponse from a dict +issuer_write_response_from_dict = IssuerWriteResponse.from_dict(issuer_write_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index a26fdd9..0a1916f 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -1,6 +1,6 @@ # Avalara.SDK.Issuers1099Api -All URIs are relative to *https://api.sbx.avalara.com/avalara1099* +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -12,7 +12,7 @@ Method | HTTP request | Description # **create_issuer** -> IssuerResponse create_issuer(avalara_version) +> IssuerWriteResponse create_issuer(avalara_version) Create an issuer @@ -27,7 +27,7 @@ import time import Avalara.SDK from Avalara.SDK.api.A1099.V2 import issuers1099_api IssuerRequest -IssuerResponse +IssuerWriteResponse ErrorResponse from pprint import pprint @@ -45,9 +45,9 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = issuers1099_api.Issuers1099Api(api_client) avalara_version = '2.0.0' # str | API version - x_correlation_id = 'deb4448e-a364-4e99-b30c-9e876743be1f' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '14e92c5a-0e21-4dcd-8e3f-59111c335ba3' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - issuer_request = {"name":"Acme Corporation","dbaName":"Acme Widgets","tin":"94-2765431","referenceId":"issuer-001","telephone":"+1-555-123-4567","taxYear":2025,"countryCode":"US","email":"support@acmecorp.com","address":"123 Main Street","city":"San Francisco","state":"CA","zip":"94105","foreignProvince":"","transferAgentName":"","lastFiling":false} # IssuerRequest | The issuer to create (optional) + issuer_request = {"businessName":"Acme Corporation","businessName2":"Acme Widgets","name":"Acme Corporation","dbaName":"Acme Widgets","tinType":"BUSINESS","firstName":null,"middleName":null,"lastName":null,"suffix":null,"tin":"94-2765431","referenceId":"issuer-001","telephone":"+1-555-123-4567","taxYear":2025,"countryCode":"US","email":"support@acmecorp.com","address":"123 Main Street","city":"San Francisco","state":"CA","zip":"94105","foreignProvince":"","transferAgentName":"","lastFiling":false} # IssuerRequest | The issuer to create (optional) # example passing only required values which don't have defaults set try: # Create an issuer @@ -77,7 +77,7 @@ Name | Type | Description | Notes ### Return type -[**IssuerResponse**](IssuerResponse.md) +[**IssuerWriteResponse**](IssuerWriteResponse.md) ### Authorization @@ -132,7 +132,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = issuers1099_api.Issuers1099Api(api_client) id = 'id_example' # str | Id of the issuer to delete avalara_version = '2.0.0' # str | API version - x_correlation_id = 'fbe6b0c6-506b-4d42-951d-dfbd382b2223' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'cc721fe4-7f1e-4228-87d2-9351c780d9e9' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -217,7 +217,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = issuers1099_api.Issuers1099Api(api_client) id = 'id_example' # str | Id of the issuer to retrieve avalara_version = '2.0.0' # str | API version - x_correlation_id = '9b9f0e80-4a47-4390-ae04-cedb799f6f0c' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '1c49f829-d029-4e67-8d87-c87a83033413' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -275,7 +275,7 @@ Name | Type | Description | Notes List issuers -List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. +List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, and lastName. ### Example @@ -309,7 +309,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: order_by = 'order_by_example' # str | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) count = True # bool | If true, return the global count of elements in the collection. (optional) count_only = True # bool | If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) - x_correlation_id = '81488870-629b-4a05-8d4c-673e5db15454' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '7845d8ad-09ab-4ba4-a644-bc06bcb806b0' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -370,11 +370,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) # **update_issuer** -> update_issuer(id, avalara_version) +> IssuerWriteResponse update_issuer(id, avalara_version) Update an issuer -Update an issuer (also known as a Payer). +Update an issuer (also known as a Payer). When the payload violates field-level business rules, the issuer is still persisted and the response body includes a `validationErrors[]` array describing each violation. ### Example @@ -385,6 +385,7 @@ import time import Avalara.SDK from Avalara.SDK.api.A1099.V2 import issuers1099_api IssuerRequest +IssuerWriteResponse ErrorResponse from pprint import pprint @@ -403,13 +404,14 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = issuers1099_api.Issuers1099Api(api_client) id = 'id_example' # str | Id of the issuer to update avalara_version = '2.0.0' # str | API version - x_correlation_id = '0c9b920f-cb85-4332-a9f6-bc06014dab8e' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '484d0024-b885-4e06-aac7-bf3ab4daba3b' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - issuer_request = {"name":"Acme Corporation","dbaName":"Acme Widgets","tin":"94-2765431","referenceId":"issuer-001","telephone":"+1-555-123-4567","taxYear":2025,"countryCode":"US","email":"support@acmecorp.com","address":"123 Main Street","city":"San Francisco","state":"CA","zip":"94105","foreignProvince":"","transferAgentName":"","lastFiling":false} # IssuerRequest | The issuer to update (optional) + issuer_request = {"businessName":"Acme Corporation","businessName2":"Acme Widgets","name":"Acme Corporation","dbaName":"Acme Widgets","tinType":"BUSINESS","firstName":null,"middleName":null,"lastName":null,"suffix":null,"tin":"94-2765431","referenceId":"issuer-001","telephone":"+1-555-123-4567","taxYear":2025,"countryCode":"US","email":"support@acmecorp.com","address":"123 Main Street","city":"San Francisco","state":"CA","zip":"94105","foreignProvince":"","transferAgentName":"","lastFiling":false} # IssuerRequest | The issuer to update (optional) # example passing only required values which don't have defaults set try: # Update an issuer - api_instance.update_issuer(id, avalara_version) + api_response = api_instance.update_issuer(id, avalara_version) + pprint(api_response) except Avalara.SDK.ApiException as e: print("Exception when calling Issuers1099Api->update_issuer: %s\n" % e) @@ -417,7 +419,8 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # and optional values try: # Update an issuer - api_instance.update_issuer(id, avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client, issuer_request=issuer_request) + api_response = api_instance.update_issuer(id, avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client, issuer_request=issuer_request) + pprint(api_response) except Avalara.SDK.ApiException as e: print("Exception when calling Issuers1099Api->update_issuer: %s\n" % e) ``` @@ -434,7 +437,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**IssuerWriteResponse**](IssuerWriteResponse.md) ### Authorization @@ -450,10 +453,11 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Issuer updated | - | -**400** | Bad request (e.g., invalid sort key) | - | +**200** | Issuer updated. Body may contain `validationErrors[]` when business rules failed. | - | +**400** | Invalid id format, malformed JSON, or identity change rejected for an issuer with scheduled Forms 1099 (TIN, TIN type, or name are immutable in that case). | - | **401** | Unauthorized | - | -**404** | Resource Not Found | - | +**403** | Caller does not have access to this issuer. | - | +**404** | Issuer not found. | - | [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/docs/A1099/V2/JobsApi.md b/docs/A1099/V2/JobsApi.md index d2fe6ac..72cf6f2 100644 --- a/docs/A1099/V2/JobsApi.md +++ b/docs/A1099/V2/JobsApi.md @@ -1,6 +1,6 @@ # Avalara.SDK.JobsApi -All URIs are relative to *https://api.sbx.avalara.com/avalara1099* +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -41,7 +41,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = jobs_api.JobsApi(api_client) id = 'id_example' # str | Job id obtained from other API responses, like `/1099/bulk-upsert`. avalara_version = '2.0.0' # str | API version - x_correlation_id = '2703d90c-9006-449d-b10d-2cf416cd6a4c' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '010a01be-bbf4-407e-afff-6151b0580377' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: diff --git a/docs/A1099/V2/RealTimeTinMatchIrsResponse.md b/docs/A1099/V2/RealTimeTinMatchIrsResponse.md new file mode 100644 index 0000000..50e9377 --- /dev/null +++ b/docs/A1099/V2/RealTimeTinMatchIrsResponse.md @@ -0,0 +1,30 @@ +# RealTimeTinMatchIrsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | The IRS response code. | [optional] +**description** | **str** | The description for the IRS response. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.real_time_tin_match_irs_response import RealTimeTinMatchIrsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RealTimeTinMatchIrsResponse from a JSON string +real_time_tin_match_irs_response_instance = RealTimeTinMatchIrsResponse.from_json(json) +# print the JSON string representation of the object +print(RealTimeTinMatchIrsResponse.to_json()) + +# convert the object into a dict +real_time_tin_match_irs_response_dict = real_time_tin_match_irs_response_instance.to_dict() +# create an instance of RealTimeTinMatchIrsResponse from a dict +real_time_tin_match_irs_response_from_dict = RealTimeTinMatchIrsResponse.from_dict(real_time_tin_match_irs_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/RealTimeTinMatchRequest.md b/docs/A1099/V2/RealTimeTinMatchRequest.md new file mode 100644 index 0000000..f3a5470 --- /dev/null +++ b/docs/A1099/V2/RealTimeTinMatchRequest.md @@ -0,0 +1,31 @@ +# RealTimeTinMatchRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tin_type** | **str** | The TIN type. | [optional] +**tin** | **str** | The TIN to be submitted to TIN match. | [optional] +**name** | **str** | The entity name to be submitted to TIN match. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.real_time_tin_match_request import RealTimeTinMatchRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RealTimeTinMatchRequest from a JSON string +real_time_tin_match_request_instance = RealTimeTinMatchRequest.from_json(json) +# print the JSON string representation of the object +print(RealTimeTinMatchRequest.to_json()) + +# convert the object into a dict +real_time_tin_match_request_dict = real_time_tin_match_request_instance.to_dict() +# create an instance of RealTimeTinMatchRequest from a dict +real_time_tin_match_request_from_dict = RealTimeTinMatchRequest.from_dict(real_time_tin_match_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/RealTimeTinMatchResponse.md b/docs/A1099/V2/RealTimeTinMatchResponse.md new file mode 100644 index 0000000..8cadfc4 --- /dev/null +++ b/docs/A1099/V2/RealTimeTinMatchResponse.md @@ -0,0 +1,30 @@ +# RealTimeTinMatchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | The status of the TIN match (matched or rejected). | [optional] +**irs_response** | [**RealTimeTinMatchIrsResponse**](RealTimeTinMatchIrsResponse.md) | The IRS response details. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.real_time_tin_match_response import RealTimeTinMatchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RealTimeTinMatchResponse from a JSON string +real_time_tin_match_response_instance = RealTimeTinMatchResponse.from_json(json) +# print the JSON string representation of the object +print(RealTimeTinMatchResponse.to_json()) + +# convert the object into a dict +real_time_tin_match_response_dict = real_time_tin_match_response_instance.to_dict() +# create an instance of RealTimeTinMatchResponse from a dict +real_time_tin_match_response_from_dict = RealTimeTinMatchResponse.from_dict(real_time_tin_match_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/TINMatchesApi.md b/docs/A1099/V2/TINMatchesApi.md new file mode 100644 index 0000000..9bbb3cc --- /dev/null +++ b/docs/A1099/V2/TINMatchesApi.md @@ -0,0 +1,100 @@ +# Avalara.SDK.TINMatchesApi + +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**perform_real_time_tin_match**](TINMatchesApi.md#perform_real_time_tin_match) | **POST** /tin-matches/$real-time | Perform real time TIN Match + + +# **perform_real_time_tin_match** +> RealTimeTinMatchResponse perform_real_time_tin_match(avalara_version) + +Perform real time TIN Match + +Perform real time TIN Match. + +### Example + +* Bearer Authentication (bearer): + +```python +import time +import Avalara.SDK +from Avalara.SDK.api.A1099.V2 import tin_matches_api +RealTimeTinMatchRequest +RealTimeTinMatchResponse +ErrorResponse +from pprint import pprint + +# Define configuration object with parameters specified to your application. +configuration = Avalara.SDK.Configuration( + app_name='test app' + app_version='1.0' + machine_name='some machine' + client_id='' + client_secret='' + environment='sandbox' +) +# Enter a context with an instance of the API client +with Avalara.SDK.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tin_matches_api.TINMatchesApi(api_client) + avalara_version = '2.0.0' # str | API version + x_correlation_id = '86993e01-0897-4667-b8f3-bac8c0081c4c' # str | Unique correlation Id in a GUID format (optional) + x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + real_time_tin_match_request = {"tinType":"BUSINESS","tin":"94-2765439","name":"Acme Corporation"} # RealTimeTinMatchRequest | Required data to perform TIN match (optional) + # example passing only required values which don't have defaults set + try: + # Perform real time TIN Match + api_response = api_instance.perform_real_time_tin_match(avalara_version) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TINMatchesApi->perform_real_time_tin_match: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Perform real time TIN Match + api_response = api_instance.perform_real_time_tin_match(avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client, real_time_tin_match_request=real_time_tin_match_request) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TINMatchesApi->perform_real_time_tin_match: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **str**| API version | + **x_correlation_id** | **str**| Unique correlation Id in a GUID format | [optional] + **x_avalara_client** | **str**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] + **real_time_tin_match_request** | [**RealTimeTinMatchRequest**](RealTimeTinMatchRequest.md)| Required data to perform TIN match | [optional] + +### Return type + +[**RealTimeTinMatchResponse**](RealTimeTinMatchResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | TIN match result (matched or rejected) | - | +**400** | Bad request (e.g. invalid field values) | - | +**401** | Authentication failed | - | +**429** | Usage limit exceeded (10,000 successful calls per 24 hours) | - | +**403** | Authorization failed (lack of permissions or product not purchased) | - | +**503** | IRS Service is not available. Client should retry later. | - | + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/A1099/V2/W4FormRequest.md b/docs/A1099/V2/W4FormRequest.md index 3f684b3..78c2d82 100644 --- a/docs/A1099/V2/W4FormRequest.md +++ b/docs/A1099/V2/W4FormRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **employee_middle_name** | **str** | The middle name of the employee. | [optional] **employee_last_name** | **str** | The last name of the employee. | **employee_name_suffix** | **str** | The name suffix of the employee. | [optional] -**tin_type** | **str** | Tax Identification Number (TIN) type. | +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | **tin** | **str** | The taxpayer identification number (TIN). | **address** | **str** | The address of the employee. Required unless exempt. | [optional] **city** | **str** | The city of residence of the employee. Required unless exempt. | [optional] @@ -25,11 +25,11 @@ Name | Type | Description | Notes **additional_withheld** | **float** | The additional amount withheld. | [optional] **exempt_from_withholding** | **bool** | Indicates whether the employee is exempt from withholding. | [optional] **office_code** | **str** | The office code associated with the form. | [optional] -**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] -**signature** | **str** | The signature of the form. | [optional] **company_id** | **str** | The ID of the associated company. Required when creating a form. | [optional] **reference_id** | **str** | A reference identifier for the form. | [optional] **email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] ## Example diff --git a/docs/A1099/V2/W4FormResponse.md b/docs/A1099/V2/W4FormResponse.md index 4369ccb..d2eb62f 100644 --- a/docs/A1099/V2/W4FormResponse.md +++ b/docs/A1099/V2/W4FormResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **employee_middle_name** | **str** | The middle name of the employee. | [optional] **employee_last_name** | **str** | The last name of the employee. | [optional] **employee_name_suffix** | **str** | The name suffix of the employee. | [optional] -**tin_type** | **str** | Tax Identification Number (TIN) type. | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] **tin** | **str** | The taxpayer identification number (TIN). | [optional] **address** | **str** | The address of the employee. | [optional] **city** | **str** | The city of residence of the employee. | [optional] diff --git a/docs/A1099/V2/W8BenEFormRequest.md b/docs/A1099/V2/W8BenEFormRequest.md index a0bcba7..e077f03 100644 --- a/docs/A1099/V2/W8BenEFormRequest.md +++ b/docs/A1099/V2/W8BenEFormRequest.md @@ -101,11 +101,11 @@ Name | Type | Description | Notes **substantial_us_owners** | [**List[SubstantialUsOwnerRequest]**](SubstantialUsOwnerRequest.md) | The list of substantial U.S. owners of passive NFFE. | [optional] **signer_name** | **str** | The name of the signer. | [optional] **capacity_to_sign_certification** | **bool** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] -**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] -**signature** | **str** | The signature of the form. | [optional] **company_id** | **str** | The ID of the associated company. Required when creating a form. | [optional] **reference_id** | **str** | A reference identifier for the form. | [optional] **email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] ## Example diff --git a/docs/A1099/V2/W8BenEFormResponse.md b/docs/A1099/V2/W8BenEFormResponse.md index a0325ab..4f18ab4 100644 --- a/docs/A1099/V2/W8BenEFormResponse.md +++ b/docs/A1099/V2/W8BenEFormResponse.md @@ -23,7 +23,7 @@ Name | Type | Description | Notes **mailing_state** | **str** | The state of the mailing address. | [optional] **mailing_zip** | **str** | The ZIP code of the mailing address. | [optional] **mailing_country** | **str** | The country of the mailing address. | [optional] -**tin_type** | **str** | Tax Identification Number (TIN) type. | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] **tin** | **str** | The taxpayer identification number (TIN). | [optional] **giin** | **str** | The global intermediary identification number (GIIN). | [optional] **foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] diff --git a/docs/A1099/V2/W8BenFormRequest.md b/docs/A1099/V2/W8BenFormRequest.md index 6ad02ac..643c7cf 100644 --- a/docs/A1099/V2/W8BenFormRequest.md +++ b/docs/A1099/V2/W8BenFormRequest.md @@ -30,11 +30,11 @@ Name | Type | Description | Notes **withholding_rate** | **str** | The withholding rate applied as per the treaty. Must be a percentage with up to two decimals (e.g., 12.50, 0).. Allowed values: 0, 0.0, 0.00, 5, 5.5, 10, 12.50, 15, 20, 25 (and 1 more) | [optional] **income_type** | **str** | The type of income covered by the treaty. | [optional] **signer_name** | **str** | The name of the signer of the form. | [optional] -**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] -**signature** | **str** | The signature of the form. | [optional] **company_id** | **str** | The ID of the associated company. Required when creating a form. | [optional] **reference_id** | **str** | A reference identifier for the form. | [optional] **email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] ## Example diff --git a/docs/A1099/V2/W8BenFormResponse.md b/docs/A1099/V2/W8BenFormResponse.md index b2ad952..d86ea62 100644 --- a/docs/A1099/V2/W8BenFormResponse.md +++ b/docs/A1099/V2/W8BenFormResponse.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **mailing_state** | **str** | The state of the mailing address. | [optional] **mailing_zip** | **str** | The ZIP code of the mailing address. | [optional] **mailing_country** | **str** | The country of the mailing address. | [optional] -**tin_type** | **str** | Tax Identification Number (TIN) type. | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] **tin** | **str** | The taxpayer identification number (TIN). | [optional] **foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] **foreign_tin** | **str** | The foreign taxpayer identification number (TIN). | [optional] diff --git a/docs/A1099/V2/W8ImyFormRequest.md b/docs/A1099/V2/W8ImyFormRequest.md index 7a9195b..8c38b63 100644 --- a/docs/A1099/V2/W8ImyFormRequest.md +++ b/docs/A1099/V2/W8ImyFormRequest.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **mailing_state** | **str** | The state of the mailing address. | [optional] **mailing_zip** | **str** | The ZIP code of the mailing address. | [optional] **mailing_country** | **str** | The country of the mailing address. | [optional] -**tin_type** | **str** | Tax Identification Number (TIN) type. Available values: - QI-EIN: Qualified Intermediary EIN - WP-EIN: Withholding Partnership EIN - WT-EIN: Withholding Trust EIN - EIN: Employer Identification Number | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number Available values: - QI-EIN: Qualified Intermediary EIN - WP-EIN: Withholding Partnership EIN - WT-EIN: Withholding Trust EIN - EIN: Employer Identification Number | [optional] **tin** | **str** | The taxpayer identification number (TIN). | [optional] **giin** | **str** | The global intermediary identification number (GIIN). | [optional] **foreign_tin** | **str** | The foreign taxpayer identification number (TIN). | [optional] @@ -117,11 +117,11 @@ Name | Type | Description | Notes **sponsored_direct_reporting_nffe_certification** | **bool** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] **direct_reporting_nffe_sponsoring_entity** | **str** | The name of the entity that sponsors the direct reporting NFFE. | [optional] **signer_name** | **str** | The name of the signer. | [optional] -**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] -**signature** | **str** | The signature of the form. | [optional] **company_id** | **str** | The ID of the associated company. Required when creating a form. | [optional] **reference_id** | **str** | A reference identifier for the form. | [optional] **email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] ## Example diff --git a/docs/A1099/V2/W8ImyFormResponse.md b/docs/A1099/V2/W8ImyFormResponse.md index 3260441..3440fa0 100644 --- a/docs/A1099/V2/W8ImyFormResponse.md +++ b/docs/A1099/V2/W8ImyFormResponse.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **mailing_state** | **str** | The state of the mailing address. | [optional] **mailing_zip** | **str** | The ZIP code of the mailing address. | [optional] **mailing_country** | **str** | The country of the mailing address. | [optional] -**tin_type** | **str** | Tax Identification Number (TIN) type. | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] **tin** | **str** | The taxpayer identification number (TIN). | [optional] **giin** | **str** | The global intermediary identification number (GIIN). | [optional] **foreign_tin** | **str** | The foreign taxpayer identification number (TIN). | [optional] diff --git a/docs/A1099/V2/W9FormBaseRequest.md b/docs/A1099/V2/W9FormBaseRequest.md index c034f10..63f3f6d 100644 --- a/docs/A1099/V2/W9FormBaseRequest.md +++ b/docs/A1099/V2/W9FormBaseRequest.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] -**signature** | **str** | The signature of the form. | [optional] **type** | **str** | The form type. | [optional] [readonly] **company_id** | **str** | The ID of the associated company. Required when creating a form. | [optional] **reference_id** | **str** | A reference identifier for the form. | [optional] **email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] ## Example diff --git a/docs/A1099/V2/W9FormRequest.md b/docs/A1099/V2/W9FormRequest.md index aa2244b..d8755c2 100644 --- a/docs/A1099/V2/W9FormRequest.md +++ b/docs/A1099/V2/W9FormRequest.md @@ -20,15 +20,15 @@ Name | Type | Description | Notes **state** | **str** | The state of the address. | **zip** | **str** | The ZIP code of the address. | **account_number** | **str** | The account number associated with the form. | [optional] -**tin_type** | **str** | Tax Identification Number (TIN) type. SSN/ITIN (for individuals) and EIN (for businesses). | +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number SSN/ITIN (for individuals) and EIN (for businesses). | **tin** | **str** | The taxpayer identification number (TIN). | **backup_withholding** | **bool** | Indicates whether backup withholding applies. | [optional] **is1099able** | **bool** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] -**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] -**signature** | **str** | The signature of the form. | [optional] **company_id** | **str** | The ID of the associated company. Required when creating a form. | [optional] **reference_id** | **str** | A reference identifier for the form. | [optional] **email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] ## Example diff --git a/docs/A1099/V2/W9FormResponse.md b/docs/A1099/V2/W9FormResponse.md index 409264a..8dc5081 100644 --- a/docs/A1099/V2/W9FormResponse.md +++ b/docs/A1099/V2/W9FormResponse.md @@ -20,7 +20,7 @@ Name | Type | Description | Notes **state** | **str** | The state of the address. | [optional] **zip** | **str** | The ZIP code of the address. | [optional] **account_number** | **str** | The account number associated with the form. | [optional] -**tin_type** | **str** | Tax Identification Number (TIN) type. | [optional] +**tin_type** | **str** | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] **tin** | **str** | The taxpayer identification number (TIN). | [optional] **backup_withholding** | **bool** | Indicates whether backup withholding applies. | [optional] **is1099able** | **bool** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] diff --git a/setup.py b/setup.py index 0f4c761..d6d972d 100644 --- a/setup.py +++ b/setup.py @@ -18,13 +18,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= 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 ``` --- 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 @author Jonathan Wenger @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 """ @@ -40,7 +40,7 @@ from setuptools import setup, find_namespace_packages NAME = "Avalara.SDK" -VERSION = "26.5.1" +VERSION = "26.7.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 2.5.0",