# List attachments by owner type and ID

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

**GET** `/api/app/attachments`

When ownerType is Visapasses.TravelerAide.Attachments.OwnerType.ServiceApplication, attachments for related visas are also included.

## Authorization

- oidc (openIdConnect)

## Header parameters

- `X-Tenant` (string)
  Tenant ID

## Query parameters

- `ownerType` (string)
  The owner entity type.
- `ownerTypeId` (integer)
  The owner entity identifier.

## Responses

### 200

OK

- `items` (object[])
  - `id` (integer<int64>)
  - `documentFileId` (integer<int64>)
  - `fileName` (string)
  - `ownerId` (integer<int64>)
  - `attachmentTypeNameId` (string)
  - `ownerType` ("ServiceApplication" | "Person" | "Visa" | "InsurancePolicy" | "IdentityDocument" | "DocumentItem")
  - `visa` (object)
    - `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>)
  - `visaId` (integer<int64>)

Example:

```json
{
  "items": [
    {
      "id": 0,
      "documentFileId": 0,
      "fileName": "string",
      "ownerId": 0,
      "attachmentTypeNameId": "string",
      "ownerType": "ServiceApplication",
      "visa": {
        "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
      },
      "visaId": 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"
        ]
      }
    ]
  }
}
```