# GetDataSourceById

Get data source by data source id

`GET /api/v2/companies/{companyId}/datasources/{id}`

**API:** AvaTax API
**Tag:** DataSources
**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/DataSources/GetDataSourceById/

## Description

Retrieve the data source by its unique ID number.

### 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:*Required* (all):  AvaTaxPro, BasicReturns.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes |  |
| `id` | integer | path | Yes | data source id |
| `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 | `DataSourceModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `DataSourceModel`

Data source object

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | No | The id of the datasource. Example: `1`. |
| `companyId` | integer | **Yes** | The id of the company to which the datasource belongs to. Example: `12345`. |
| `source` | string | **Yes** | The extractor/connector id. Example: `Amazon v2 Extractor`. |
| `instance` | string | No | The unique ID number of this connection. Example: `82f62704-7eaa-48ba-8422-410746a4bf3f`. |
| `isEnabled` | boolean | No | The connection using the connection_id is enabled. The customer is responsible to enable or disable. Example: `false`. |
| `isSynced` | boolean | No | If all the information has been transferred from the extractor to the database. Example: `false`. |
| `isAuthorized` | boolean | No | True if this data source is authorized. Example: `false`. |
| `lastSyncedDate` | string | No | The date when the information was last synched. |
| `createdUserId` | integer | No | The User ID of the user who created this record. Example: `123`. |
| `createdDate` | string | No | The date when this record was created. Example: `2026-07-02T00:00:00+00:00`. |
| `modifiedUserId` | integer | No | The user ID of the user who last modified this record. Example: `12`. |
| `modifiedDate` | string | No | The date/time when this record was last modified. Example: `2026-07-02T00:00:00+00:00`. |
| `deletedDate` | string | No | The date when this record was deleted. |
| `recalculate` | boolean | No | Specifies whether transactions created by this data source needs to re-calculate tax or not |
| `name` | string | No | Specifies the name of the extractor Example: `TestName`. |
| `externalState` | string | No | Specifies any implementation-specific information along with the DataSource.This field has no internal meaning in AvaTax and is purely for the convenience of the DataSource API user Example: `Test Path`. |

## Example Request

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