# CreateCountryCoefficients

Create new Country Coefficients. If already exist update them.

`PUT /api/v2/countryCoefficients`

**API:** AvaTax API
**Tag:** TaxRules
**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/TaxRules/CreateCountryCoefficients/

## Description

Create one or more Country Coefficients for particular country.
            
We would like to use country coefficients during Cross-Border calculations to slightly increase or decrease
a calculation for a line based on the tax-subtype and Country of destination for a transaction.
            
This will allow AvaTax to minimize the variance caused between actual transaction taken place on ground Vs Tax
Calculated by AvaTax.
            
Make sure to use the same API to update the country coefficients that is already present in the database.
This will make existing entry for specific country as ineffective for that date. And new entry created will get applicable
to the newer transactions.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `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:** `CountryCoefficientsRequestEntity`

Represents the Country coefficients request input model, using which tax rules rates can be modified dynamically for CB transaciotns while applying tax rules
in order to reduce the variance for all the transactions at country level.

| Property | Type | Required | Description |
|---|---|---|---|
| `accountId` | integer | **Yes** | AccountId |
| `coefficientDetails` | CountryCoefficientsRequestModel[] | **Yes** | CountryCoefficientsRequestModel list |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

## Example Request

```bash
curl -X PUT "https://sandbox-rest.avatax.com/api/v2/countryCoefficients" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "accountId": 0,
  "coefficientDetails": [
    {
      "companyCode": "",
      "country": "",
      "coefficient": 0,
      "taxSubTypeId": "",
      "currencyCode": "USD",
      "unitOfBasisId": 0,
      "isApplicable": false,
      "startDate": "2026-07-02",
      "endDate": "9999-12-31"
    }
  ]
}'
```