# Runs_DeltaRun

Create a new Transaction Tax Extract pipeline run that compares deltas between two past runs.

`POST /v1/companies/{companyId}/Runs/delta`

**API:** Avalara Tax Content - Job and Data Management Service
**Tag:** Runs
**API Version:** v1
**Base URL:** https://rest.avatax.com/api/v2/content/jobs
**Authentication:** Basic (username + license key) or Bearer token

Source: https://developer.avalara.com/products/avalara-tax-content/api/jms/methods/Runs/Runs_DeltaRun/

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | Company ID for this run. |

## Request Body

**Content-Type:** `application/json`
**Schema:** `Avalara.POS.API.JMS.Models.DeltaRunConfigModel`

| Property | Type | Required | Description |
|---|---|---|---|
| `name` | string | **Yes** | Specify a name for this pipeline run. Example: `SampleJob`. |
| `base_run_id` | string | **Yes** | The run ID to compare against the `latest_run_id`. Example: `00000000-0000-0000-0000-000000000000`. |
| `latest_run_id` | string | **Yes** | The latest run ID to compare against the `base_run_id`. Example: `00000000-0000-0000-0000-000000000000`. |
| `companyId` | integer | **Yes** | Company ID. Example: `12345`. |
| `accountId` | integer | **Yes** | Account ID. Example: `98765`. |
| `jobType` | string | **Yes** | Specify the job type.

Values: `Production`, `Test` Example: `Production`. |
| `configurationName` | string | **Yes** | The configuration name for this pipeline run. Example: `SampleConfigName`. |
| `jobId` | string | **Yes** | Specify an ID for this job. This ID can be used to retrieve a run for a specific job. Example: `00000000-0000-0000-0000-000000000000`. |
| `execution_details` | Avalara.POS.API.JMS.Models.JobExecutionDetails | No |  |
| `output_type` | string | **Yes** | Specify the output type.

Values: 
- `Full`: Returns full runs for both the base and latest runs.
- `Differences only`: Returns the deltas between the base and latest runs. Example: `Full`. |
| `tteId` | string | **Yes** | Specify an ID for this TTE Job Configuration. Example: `00000000-0000-0000-0000-000000000000`. |
| `communicationId` | string | **Yes** | Enter a communication ID for this run. Example: `00000000-0000-0000-0000-000000000000`. |
| `dttId` | string | No | Specify an ID for the Data Transport Toolkit (DTT) for this job. Example: `00000000-0000-0000-0000-000000000000`. |
| `productType` | string | No | productType used to differenciate between ATC products default(retail), lodging, managers. Example: `default`. |
| `deliveryConfigurations` | Avalara.POS.API.JMS.Models.DeliveryConfigurationDetails | No |  |

**Content-Type:** `text/json`
**Schema:** `Avalara.POS.API.JMS.Models.DeltaRunConfigModel`

| Property | Type | Required | Description |
|---|---|---|---|
| `name` | string | **Yes** | Specify a name for this pipeline run. Example: `SampleJob`. |
| `base_run_id` | string | **Yes** | The run ID to compare against the `latest_run_id`. Example: `00000000-0000-0000-0000-000000000000`. |
| `latest_run_id` | string | **Yes** | The latest run ID to compare against the `base_run_id`. Example: `00000000-0000-0000-0000-000000000000`. |
| `companyId` | integer | **Yes** | Company ID. Example: `12345`. |
| `accountId` | integer | **Yes** | Account ID. Example: `98765`. |
| `jobType` | string | **Yes** | Specify the job type.

Values: `Production`, `Test` Example: `Production`. |
| `configurationName` | string | **Yes** | The configuration name for this pipeline run. Example: `SampleConfigName`. |
| `jobId` | string | **Yes** | Specify an ID for this job. This ID can be used to retrieve a run for a specific job. Example: `00000000-0000-0000-0000-000000000000`. |
| `execution_details` | Avalara.POS.API.JMS.Models.JobExecutionDetails | No |  |
| `output_type` | string | **Yes** | Specify the output type.

Values: 
- `Full`: Returns full runs for both the base and latest runs.
- `Differences only`: Returns the deltas between the base and latest runs. Example: `Full`. |
| `tteId` | string | **Yes** | Specify an ID for this TTE Job Configuration. Example: `00000000-0000-0000-0000-000000000000`. |
| `communicationId` | string | **Yes** | Enter a communication ID for this run. Example: `00000000-0000-0000-0000-000000000000`. |
| `dttId` | string | No | Specify an ID for the Data Transport Toolkit (DTT) for this job. Example: `00000000-0000-0000-0000-000000000000`. |
| `productType` | string | No | productType used to differenciate between ATC products default(retail), lodging, managers. Example: `default`. |
| `deliveryConfigurations` | Avalara.POS.API.JMS.Models.DeliveryConfigurationDetails | No |  |

**Content-Type:** `application/*+json`
**Schema:** `Avalara.POS.API.JMS.Models.DeltaRunConfigModel`

| Property | Type | Required | Description |
|---|---|---|---|
| `name` | string | **Yes** | Specify a name for this pipeline run. Example: `SampleJob`. |
| `base_run_id` | string | **Yes** | The run ID to compare against the `latest_run_id`. Example: `00000000-0000-0000-0000-000000000000`. |
| `latest_run_id` | string | **Yes** | The latest run ID to compare against the `base_run_id`. Example: `00000000-0000-0000-0000-000000000000`. |
| `companyId` | integer | **Yes** | Company ID. Example: `12345`. |
| `accountId` | integer | **Yes** | Account ID. Example: `98765`. |
| `jobType` | string | **Yes** | Specify the job type.

Values: `Production`, `Test` Example: `Production`. |
| `configurationName` | string | **Yes** | The configuration name for this pipeline run. Example: `SampleConfigName`. |
| `jobId` | string | **Yes** | Specify an ID for this job. This ID can be used to retrieve a run for a specific job. Example: `00000000-0000-0000-0000-000000000000`. |
| `execution_details` | Avalara.POS.API.JMS.Models.JobExecutionDetails | No |  |
| `output_type` | string | **Yes** | Specify the output type.

Values: 
- `Full`: Returns full runs for both the base and latest runs.
- `Differences only`: Returns the deltas between the base and latest runs. Example: `Full`. |
| `tteId` | string | **Yes** | Specify an ID for this TTE Job Configuration. Example: `00000000-0000-0000-0000-000000000000`. |
| `communicationId` | string | **Yes** | Enter a communication ID for this run. Example: `00000000-0000-0000-0000-000000000000`. |
| `dttId` | string | No | Specify an ID for the Data Transport Toolkit (DTT) for this job. Example: `00000000-0000-0000-0000-000000000000`. |
| `productType` | string | No | productType used to differenciate between ATC products default(retail), lodging, managers. Example: `default`. |
| `deliveryConfigurations` | Avalara.POS.API.JMS.Models.DeliveryConfigurationDetails | No |  |

## Responses

| Status | Description | Schema |
|---|---|---|
| 201 | Created | `Avalara.POS.API.JMS.Models.RunStatusModel` |
| 400 | Bad Request | `Microsoft.AspNetCore.Mvc.ProblemDetails` |
| 401 | Unauthorized | `Microsoft.AspNetCore.Mvc.ProblemDetails` |

### 201 Response: `Avalara.POS.API.JMS.Models.RunStatusModel`

Metadata for a new Content Extract Pipeline run.

| Property | Type | Required | Description |
|---|---|---|---|
| `name` | string | No | Title of the pipeline run. Example: `SampleName`. |
| `jobId` | string | No | ID for the combined TTE configuration, delivery method, and communication method. Example: `00000000-0000-0000-0000-000000000000`. |
| `runId` | string | No | ID for the pipeline run. Example: `00000000-0000-0000-0000-000000000000`. |
| `dttId` | string | No | ID for the DTT configuration Example: `00000000-0000-0000-0000-000000000000`. |
| `status` | string | No | Status of the pipeline run.
            
Values are: `QUEUED`, `RUNNING`, `FAILURE`, `SUCCESS`. Example: `SUCCESS`. |
| `configurationName` | string | No | Configuration Name for the pipeline run. Example: `SampleConfigName`. |
| `jobType` | string | No | Job type. Example: `Production`. |
| `platform` | string | No | Platform for the pipeline run. Example: `APTOS`. |
| `started` | string | No | When the pipeline run began. |
| `completed` | string | No | When the pipeline run finished. |
| `execution_details` | Avalara.POS.API.JMS.Models.JobExecutionDetails | No |  |
| `outputtype` | string | No | Output type for the pipeline run. Example: `Full`. |
| `tteType` | string | No | TTE type for the pipeline run, 'lodging' for lodging runs. Example: `lodging`. |
| `baseRunId` | string | No | Base run ID. Example: `00000000-0000-0000-0000-000000000000`. |
| `latestRunId` | string | No | Latest run ID. Example: `00000000-0000-0000-0000-000000000000`. |
| `dttPreviewStatus` | string | No | DTT Preview status.
            
Values are: `enabled`, `disabled`, `warmup`. |
| `productType` | string | No | Product type for the pipeline run, 'lodging' for lodging runs. Example: `lodging`. |
| `countryCodes` | string[] | No | Country codes from the TTE configuration. |
| `detailLevel` | string | No | Detail level from the TTE configuration. |
| `downloadInformation` | Avalara.POS.API.Common.Models.Downloads | No |  |

## Example Request

```bash
curl -X POST "https://rest.avatax.com/api/v2/content/jobs/v1/companies/{companyId}/Runs/delta" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json" \
  -d '{
  "name": "SampleJob",
  "base_run_id": "00000000-0000-0000-0000-000000000000",
  "latest_run_id": "00000000-0000-0000-0000-000000000000",
  "companyId": 12345,
  "accountId": 98765,
  "jobType": "Production",
  "configurationName": "SampleConfigName",
  "jobId": "00000000-0000-0000-0000-000000000000",
  "execution_details": {
    "executionsource": "manual",
    "notes": "",
    "autoJobRunType": "",
    "VersionName": "",
    "ReleaseDate": ""
  },
  "output_type": "Full",
  "tteId": "00000000-0000-0000-0000-000000000000",
  "communicationId": "00000000-0000-0000-0000-000000000000",
  "dttId": "00000000-0000-0000-0000-000000000000",
  "productType": "default",
  "deliveryConfigurations": {
    "platform": "TTE",
    "destination": "exavault",
    "networkDetails": {
      "emailAddress": "abc@xyz.com"
    },
    "notifyApiDelivery": ""
  }
}'
```