# Lodging_Create

Create a single UserDefinedFieldDatasetModel record.

`POST /v1/atcse/company/{company}/UdfDs`

**API:** Avalara Tax Content - Configuration Service
**Tag:** Lodging
**API Version:** v1
**Base URL:** https://rest.avatax.com/api/v2/content/configuration
**Authentication:** Basic (username + license key) or API Key (`Authorization` in header)

Source: https://developer.avalara.com/products/avalara-tax-content/api/cfg/methods/Lodging/Lodging_Create/

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `company` | integer | path | Yes | company id. |

## Request Body

**Content-Type:** `application/json`
**Schema:** `Avalara.POS.API.CFG.Model.LodgingModels.UserDefinedFieldDatasetModel`

| Property | Type | Required | Description |
|---|---|---|---|
| `companyId` | integer | **Yes** | AvaTax Company ID. |
| `accountId` | integer | No | AvaTax Account ID. |
| `createdBy` | integer | No | Created user ID. |
| `createdDate` | string | No | Created date. Example: `2021-04-21T20:09:19.2207167Z.`. |
| `modifiedBy` | integer | No | Last modifying user ID. |
| `modifiedDate` | string | No | Last modified date. Example: `2021-04-21T20:09:19.2207167Z.`. |
| `customerSourceField` | string | No |  |
| `taxJurisdictionName` | string | **Yes** |  |
| `taxJurisdictionLevel` | string | **Yes** |  |
| `taxName` | string | **Yes** |  |
| `state` | string | **Yes** |  |
| `approved` | boolean | No |  |
| `udfKey` | string | No |  |
| `udfValue` | string | **Yes** |  |
| `udfDatasetId` | string | No |  |
| `isCurrent` | boolean | No | Indicates whether this is the current active record.
This property is read-only and any attempts to set its value will be ignored.
The value is calculated internally based on the record's state. |

**Content-Type:** `text/json`
**Schema:** `Avalara.POS.API.CFG.Model.LodgingModels.UserDefinedFieldDatasetModel`

| Property | Type | Required | Description |
|---|---|---|---|
| `companyId` | integer | **Yes** | AvaTax Company ID. |
| `accountId` | integer | No | AvaTax Account ID. |
| `createdBy` | integer | No | Created user ID. |
| `createdDate` | string | No | Created date. Example: `2021-04-21T20:09:19.2207167Z.`. |
| `modifiedBy` | integer | No | Last modifying user ID. |
| `modifiedDate` | string | No | Last modified date. Example: `2021-04-21T20:09:19.2207167Z.`. |
| `customerSourceField` | string | No |  |
| `taxJurisdictionName` | string | **Yes** |  |
| `taxJurisdictionLevel` | string | **Yes** |  |
| `taxName` | string | **Yes** |  |
| `state` | string | **Yes** |  |
| `approved` | boolean | No |  |
| `udfKey` | string | No |  |
| `udfValue` | string | **Yes** |  |
| `udfDatasetId` | string | No |  |
| `isCurrent` | boolean | No | Indicates whether this is the current active record.
This property is read-only and any attempts to set its value will be ignored.
The value is calculated internally based on the record's state. |

**Content-Type:** `application/*+json`
**Schema:** `Avalara.POS.API.CFG.Model.LodgingModels.UserDefinedFieldDatasetModel`

| Property | Type | Required | Description |
|---|---|---|---|
| `companyId` | integer | **Yes** | AvaTax Company ID. |
| `accountId` | integer | No | AvaTax Account ID. |
| `createdBy` | integer | No | Created user ID. |
| `createdDate` | string | No | Created date. Example: `2021-04-21T20:09:19.2207167Z.`. |
| `modifiedBy` | integer | No | Last modifying user ID. |
| `modifiedDate` | string | No | Last modified date. Example: `2021-04-21T20:09:19.2207167Z.`. |
| `customerSourceField` | string | No |  |
| `taxJurisdictionName` | string | **Yes** |  |
| `taxJurisdictionLevel` | string | **Yes** |  |
| `taxName` | string | **Yes** |  |
| `state` | string | **Yes** |  |
| `approved` | boolean | No |  |
| `udfKey` | string | No |  |
| `udfValue` | string | **Yes** |  |
| `udfDatasetId` | string | No |  |
| `isCurrent` | boolean | No | Indicates whether this is the current active record.
This property is read-only and any attempts to set its value will be ignored.
The value is calculated internally based on the record's state. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | OK | `Avalara.POS.API.CFG.Model.LodgingModels.UserDefinedFieldDatasetModel` |
| 400 | Bad Request | `Microsoft.AspNetCore.Mvc.ProblemDetails` |
| 401 | Unauthorized | `Microsoft.AspNetCore.Mvc.ProblemDetails` |
| 404 | Not Found | `Microsoft.AspNetCore.Mvc.ProblemDetails` |
| 409 | Conflict | `Microsoft.AspNetCore.Mvc.ProblemDetails` |

### 200 Response: `Avalara.POS.API.CFG.Model.LodgingModels.UserDefinedFieldDatasetModel`

| Property | Type | Required | Description |
|---|---|---|---|
| `companyId` | integer | **Yes** | AvaTax Company ID. |
| `accountId` | integer | No | AvaTax Account ID. |
| `createdBy` | integer | No | Created user ID. |
| `createdDate` | string | No | Created date. Example: `2021-04-21T20:09:19.2207167Z.`. |
| `modifiedBy` | integer | No | Last modifying user ID. |
| `modifiedDate` | string | No | Last modified date. Example: `2021-04-21T20:09:19.2207167Z.`. |
| `customerSourceField` | string | No |  |
| `taxJurisdictionName` | string | **Yes** |  |
| `taxJurisdictionLevel` | string | **Yes** |  |
| `taxName` | string | **Yes** |  |
| `state` | string | **Yes** |  |
| `approved` | boolean | No |  |
| `udfKey` | string | No |  |
| `udfValue` | string | **Yes** |  |
| `udfDatasetId` | string | No |  |
| `isCurrent` | boolean | No | Indicates whether this is the current active record.
This property is read-only and any attempts to set its value will be ignored.
The value is calculated internally based on the record's state. |

## Example Request

```bash
curl -X POST "https://rest.avatax.com/api/v2/content/configuration/v1/atcse/company/{company}/UdfDs" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json" \
  -d '{
  "companyId": "",
  "accountId": "",
  "createdBy": "",
  "createdDate": "2021-04-21T20:09:19.2207167Z.",
  "modifiedBy": "",
  "modifiedDate": "2021-04-21T20:09:19.2207167Z.",
  "customerSourceField": "",
  "taxJurisdictionName": "",
  "taxJurisdictionLevel": "",
  "taxName": "",
  "state": "",
  "approved": "",
  "udfKey": "",
  "udfValue": "",
  "udfDatasetId": "",
  "isCurrent": ""
}'
```