# UpdateVatNumber

Update a single VAT Number

`PUT /api/v2/companies/{companyId}/vatnumbers/{id}`

**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/avatax/api/methods/Companies/UpdateVatNumber/

## Description

Replace the existing VAT number record with the data in the object you PUT.
            
Only `vatNumber`, `businessName`, and `country` fields can be updated. The
validation-related fields (`vatNumberStatus`, `registeredBusinessName`,
`businessNameStatus`, `validationDate`, `validationSource`) are managed by the
system and are refreshed automatically: every successful PUT re-triggers a
synchronous VAT validation against the ELR / Directory Search service (which
proxies VIES). This makes "Fix" flows work as expected — correcting an
invalid VAT number immediately updates its status.

### 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 this VAT number |
| `id` | integer | path | Yes | The unique ID of the VAT number record to update |
| `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 |
|---|---|---|
| 200 | Success | `CustomerVatNumberModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `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 |

## Example Request

```bash
curl -X PUT "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/vatnumbers/{id}" \
  -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"
}'
```