# ActivateFundingRequest

Request the javascript for a funding setup widget

`GET /api/v2/fundingrequests/{id}/widget`

**API:** AvaTax API
**Tag:** FundingRequests
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/crossborder/api/methods/FundingRequests/ActivateFundingRequest/

## Description

This API is available by invitation only.
Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
required to setup their funding configuration before Avalara can begin filing tax returns on their
behalf.
Funding configuration for each company is set up by submitting a funding setup request, which can
be sent either via email or via an embedded HTML widget.
When the funding configuration is submitted to Avalara, it will be reviewed by treasury team members
before approval.
This API returns back the actual javascript code to insert into your application to render the
JavaScript funding setup widget inline.
Use the 'methodReturn.javaScript' return value to insert this widget into your HTML page.
This API requires a subscription to Avalara Managed Returns or SST Certified Service Provider.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
* This API depends on the following active services:*Returns* (at least one of):  Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm):  ARA, ARAManaged.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `id` | integer | path | Yes | The unique ID number of this funding request |
| `businessUnit` | string | query | No | The company's business unit |
| `subscriptionType` | string | query | No | The company's subscription type |
| `currency` | string | query | No | Currency |
| `agreementType` | string | query | No | Agreement Type |
| `X-Avalara-Client` | string | header | No | 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/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `FundingStatusModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `FundingStatusModel`

Status of an Avalara Managed Returns funding configuration for a company

| Property | Type | Required | Description |
|---|---|---|---|
| `requestId` | integer | No | The unique ID number of this funding request |
| `subledgerProfileID` | integer | No | SubledgerProfileID |
| `companyID` | string | No | CompanyID |
| `domain` | string | No | Domain |
| `recipient` | string | No | Recipient |
| `sender` | string | No | Sender |
| `documentKey` | string | No | DocumentKey |
| `documentType` | string | No | DocumentType |
| `documentName` | string | No | DocumentName |
| `methodReturn` | FundingESignMethodReturn | No | MethodReturn |
| `status` | string | No | Status |
| `errorMessage` | string | No | ErrorMessage |
| `lastPolled` | string | No | LastPolled |
| `lastSigned` | string | No | LastSigned |
| `lastActivated` | string | No | LastActivated |
| `templateRequestId` | integer | No | TemplateRequestId |
| `currency` | string | No | Currency |
| `agreementType` | string | No | AgreementType |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/fundingrequests/{id}/widget" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```