# ImportBusinessEntitiesController_ImportBusinessEntities_Post

Import business entities and associated business accounts.

`POST /api/v1/ImportBusinessEntities/ImportBusinessEntities`

**API:** Excise Platform API
**Tag:** ImportBusinessEntitiesController
**API Version:** v1
**Base URL:** https://excise.avalara.com
**Content-Type:** `application/json`
**Accepts:** `application/json`
**Authentication:** Basic (username + license key)

Source: https://developer.avalara.com/products/excise/api/methods/ImportBusinessEntitiesController/ImportBusinessEntitiesController_ImportBusinessEntities_Post/

## Description

Imports business entity records and their associated business accounts into the Excise Platform.
The import engine processes the provided entities and returns a summary of the results including
inserted, updated, and failed records.
            
The request supports options for matching existing business entities and controlling whether
new records are terminated and whether all account types are created.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `x-company-id` | integer | header | Yes | Company ID that owns the data. |
| `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. |

## Request Body

**Schema:** `Avalara.Excise.Common.Contracts.Services.BusinessEntityImportRequest`

Represents a request object for importing business entities through the REST service.
This class contains all the necessary information to perform a business entity import operation,
including the entities to import, import configuration options, and matching behavior settings.

| Property | Type | Required | Description |
|---|---|---|---|
| `BusinessEntities` | Avalara.Excise.Common.Contracts.Services.RestBusinessEntity[] | No | Gets or sets an array of business entities to be imported.
Each business entity contains the data that will be processed and imported into the system. |
| `ImportName` | string | No | Gets or sets the name identifier for this import operation.
This name is used to identify and track the import operation in logs and reports. Example: `string`. |
| `UpdateMatchesMode` | string | No | Gets or sets the update matching mode that determines how existing records are handled during import.
This setting controls whether and how the system should match and update existing business entities
when duplicates are found during the import process. Values: `NONE`, `INSERT`, `UPDATE`, `COPY`. Example: `NONE`. |
| `TerminateNewRecords` | boolean | No | Gets or sets a boolean value indicating whether new records should be terminated after import.
When true, newly imported records will be marked as terminated, typically used for historical data imports. Example: `false`. |
| `CreateAllAccountTypes` | boolean | No | Gets or sets a boolean value indicating whether all account types should be created for imported entities.
When true, the system will automatically create all supported account types for each imported business entity. Example: `false`. |
| `LoadId` | string | No | Gets or sets the unique identifier for this import load operation.
This GUID is used to correlate related import operations and track the overall import process. Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Returns a summary of the business entity import results. | `Avalara.Excise.Common.Contracts.Services.RestBusinessEntityImportResultSummary` |

### 200 Response: `Avalara.Excise.Common.Contracts.Services.RestBusinessEntityImportResultSummary`

Summarizes the results of a business entity import operation, including counts and per-record results.

| Property | Type | Required | Description |
|---|---|---|---|
| `BusinessEntityResults` | Avalara.Excise.Common.Contracts.Services.RestBusinessEntityResult[] | No | Per-entity import results from the operation. |
| `Status` | string | No | The processing status of the import operation (e.g., Inserted, Updated, Failed). Example: `Inserted`. |
| `NumberEntitiesProcessed` | integer | No | The total number of business entities processed during the import. Example: `10`. |
| `NumberEntitiesInserted` | integer | No | The total number of business entities inserted during the import. Example: `8`. |
| `NumberEntitiesUpdated` | integer | No | The total number of business entities updated during the import. Example: `1`. |
| `NumberEntitiesFailed` | integer | No | The total number of business entities that failed during the import. Example: `1`. |
| `NumberIdCodesProcessed` | integer | No | The total number of identification codes processed during the import. Example: `10`. |
| `NumberIdCodesInserted` | integer | No | The total number of identification codes inserted during the import. Example: `8`. |
| `NumberIdCodesUpdated` | integer | No | The total number of identification codes updated during the import. Example: `1`. |
| `NumberIdCodesFailed` | integer | No | The total number of identification codes that failed during the import. Example: `1`. |
| `NumberAccountsProcessed` | integer | No | The total number of business accounts processed during the import. Example: `10`. |
| `NumberAccountsInserted` | integer | No | The total number of business accounts inserted during the import. Example: `8`. |
| `NumberAccountsUpdated` | integer | No | The total number of business accounts updated during the import. Example: `1`. |
| `NumberAccountsFailed` | integer | No | The total number of business accounts that failed during the import. Example: `1`. |

## Example Request

```bash
curl -X POST "https://excise.avalara.com/api/v1/ImportBusinessEntities/ImportBusinessEntities" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "BusinessEntities": [
    {
      "CustomId": "CUST-001",
      "EffectiveDate": "2024-01-01T00:00:00",
      "ObsoleteDate": "2028-12-31T23:59:59",
      "TradeName": "Acme Fuels",
      "LegalName": "Acme Fuel Corporation",
      "NameControl": "ACME",
      "Address1": "123 Main Street",
      "Address2": "Suite 200",
      "City": "Montgomery",
      "Jurisdiction": "AL",
      "PostalCode": "36104",
      "CountryCode": "USA",
      "County": "Montgomery",
      "CountyCode": "051",
      "AlternateJurisdiction": "MS",
      "BusinessAccounts": [
        {
          "CountryCode": "USA",
          "Jurisdiction": "AL",
          "BusinessType": "Seller",
          "BusinessSubType": "Wholesale",
          "CustomId": "CUST-001",
          "EffectiveDate": "2024-01-01T00:00:00",
          "ObsoleteDate": "2028-12-31T23:59:59",
          "LicenseNumber": "LIC-AL-2024-001",
          "LicensePercentage": 100.5,
          "BusinessAccountMappingId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "LicenseExpirationDate": "2026-06-30T00:00:00",
          "LicenseDescription": "Motor fuel distributor license"
        }
      ],
      "BusinessEntityIdCodes": [
        {
          "CountryCode": "USA",
          "IdType": "FEIN",
          "IdCode": "12-3456789"
        }
      ],
      "CustomIdPriority": 1,
      "IdCodeAndIdTypePriority": 2,
      "LegalNamePriority": 3,
      "BusinessEntityMappingId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
  ],
  "ImportName": "string",
  "UpdateMatchesMode": "NONE",
  "TerminateNewRecords": false,
  "CreateAllAccountTypes": false,
  "LoadId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'
```