# CreateVatNumbers

Create VAT Numbers for a company

`POST /api/v2/companies/{companyId}/vatnumbers`

**API:** AvaTax API
**Tag:** Companies
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Content-Type:** `application/json`
**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/Companies/CreateVatNumbers/

## Description

Create one or more VAT number records for a company.
Each record is validated synchronously against the ELR / Directory Search service
(which proxies VIES). The response includes validation results:
`vatNumberStatus`, `registeredBusinessName`, `businessNameStatus`, `validationDate`,
and `validationSource`.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The ID of the company that owns these VAT numbers |
| `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/) . |

## Request Body

**Schema:** `CustomerVatNumberModel[]`

Represents a VAT Number record for a company.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | No | Unique identifier for the VAT number record Example: `0`. |
| `companyId` | integer | No | Company ID associated with this VAT number Example: `0`. |
| `vatNumber` | string | **Yes** | VAT identification number Example: `DE123456789`. |
| `businessName` | string | No | User input business/company name Example: `Example GmbH`. |
| `country` | string | **Yes** | ISO 2-character country code Example: `DE`. |
| `vatNumberStatus` | integer | No | VAT number validation status: 0=NotValidated, 1=Valid, 2=Invalid, 3=Error |
| `registeredBusinessName` | string | No | Business name returned from VIES |
| `businessNameStatus` | integer | No | Business name comparison status: 0=NotValidated, 1=Valid, 2=Invalid, 3=Error |
| `validationDate` | string | No | Last validation timestamp |
| `validationSource` | string | No | Validation source: 'VIES' or 'ELR' |
| `createdDate` | string | No | Date/time when this record was created |
| `modifiedDate` | string | No | Date/time when this record was last modified |

## Responses

| Status | Description | Schema |
|---|---|---|
| 201 | Created |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/vatnumbers" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '[
  {
    "id": 0,
    "companyId": 0,
    "vatNumber": "DE123456789",
    "businessName": "Example GmbH",
    "country": "DE"
  }
]'
```