# Create a new visa record

> For the complete documentation index, see [llms.txt](https://developer.fluxir.com/llms.txt).

**POST** `/api/app/visas`

Create and persist a new visa record, optionally uploading the visa document.

## Authorization

- oidc (openIdConnect)

## Header parameters

- `X-Tenant` (string)
  Tenant ID

## Body

Content type: `multipart/form-data`

- `PersonId` (integer<int64>)
- `ServiceApplicationId` (integer<int64>)
- `VisaTypeName` (string)
- `CountryCode` (string)
- `ValidFrom` (string<date>)
- `ValidTo` (string<date>)
- `SerialNumber` (string)
- `RelatedVisaTypeId` (integer<int64>)
- `document` (string<binary>)

Example:

```json
{
  "PersonId": 0,
  "ServiceApplicationId": 0,
  "VisaTypeName": "string",
  "CountryCode": "string",
  "ValidFrom": "2024-01-01",
  "ValidTo": "2024-01-01",
  "SerialNumber": "string",
  "RelatedVisaTypeId": 0,
  "document": "string"
}
```

## Responses

### 200

OK

- `id` (integer<int64>)
- `personId` (integer<int64>)
- `visaApplicationId` (integer<int64>)
- `visaTypeName` (string)
- `countryCode` (string)
- `isReadonly` (boolean)
- `validFrom` (string<date>)
- `validTo` (string<date>)
- `hasDownloadableContent` (boolean)
- `visaNo` (string)
- `serialNumber` (string)
- `numOfEntries` ("Single" | "Multi" | "Double")
- `relatedVisaTypeId` (integer<int64>)

Example:

```json
{
  "id": 0,
  "personId": 0,
  "visaApplicationId": 0,
  "visaTypeName": "string",
  "countryCode": "string",
  "isReadonly": true,
  "validFrom": "2024-01-01",
  "validTo": "2024-01-01",
  "hasDownloadableContent": true,
  "visaNo": "string",
  "serialNumber": "string",
  "numOfEntries": "Single",
  "relatedVisaTypeId": 0
}
```

### 400

Bad Request

- `error` (object)
  - `code` (string)
  - `message` (string)
  - `details` (string)
  - `data` (object)
  - `validationErrors` (object[])
    - `message` (string)
    - `members` (string[])

Example:

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": "string",
    "data": {},
    "validationErrors": [
      {
        "message": "string",
        "members": [
          "string"
        ]
      }
    ]
  }
}
```

### 401

Unauthorized

- `error` (object)
  - `code` (string)
  - `message` (string)
  - `details` (string)
  - `data` (object)
  - `validationErrors` (object[])
    - `message` (string)
    - `members` (string[])

Example:

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": "string",
    "data": {},
    "validationErrors": [
      {
        "message": "string",
        "members": [
          "string"
        ]
      }
    ]
  }
}
```

### 403

Forbidden

- `error` (object)
  - `code` (string)
  - `message` (string)
  - `details` (string)
  - `data` (object)
  - `validationErrors` (object[])
    - `message` (string)
    - `members` (string[])

Example:

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": "string",
    "data": {},
    "validationErrors": [
      {
        "message": "string",
        "members": [
          "string"
        ]
      }
    ]
  }
}
```

### 404

Not Found

- `error` (object)
  - `code` (string)
  - `message` (string)
  - `details` (string)
  - `data` (object)
  - `validationErrors` (object[])
    - `message` (string)
    - `members` (string[])

Example:

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": "string",
    "data": {},
    "validationErrors": [
      {
        "message": "string",
        "members": [
          "string"
        ]
      }
    ]
  }
}
```

### 500

Internal Server Error

- `error` (object)
  - `code` (string)
  - `message` (string)
  - `details` (string)
  - `data` (object)
  - `validationErrors` (object[])
    - `message` (string)
    - `members` (string[])

Example:

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": "string",
    "data": {},
    "validationErrors": [
      {
        "message": "string",
        "members": [
          "string"
        ]
      }
    ]
  }
}
```

### 501

Not Implemented

- `error` (object)
  - `code` (string)
  - `message` (string)
  - `details` (string)
  - `data` (object)
  - `validationErrors` (object[])
    - `message` (string)
    - `members` (string[])

Example:

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": "string",
    "data": {},
    "validationErrors": [
      {
        "message": "string",
        "members": [
          "string"
        ]
      }
    ]
  }
}
```