# List persons with filters and pagination

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

**GET** `/api/app/persons`

Retrieve a paged list of persons with support for filtering, sorting, and pagination.

## Authorization

- oidc (openIdConnect)

## Header parameters

- `X-Tenant` (string)
  Tenant ID

## Query parameters

- `Filter` (string)
- `IncludingVisas` (boolean)
- `Descending` (boolean)
- `Sorting` (string)
- `SkipCount` (integer)
- `MaxResultCount` (integer)

## Responses

### 200

OK

- `items` (object[])
  - `id` (integer<int64>)
  - `firstName` (string)
  - `lastName` (string)
  - `email` (string)
  - `residenceCountry` (string)
  - `birthDate` (string<date>)
  - `hasVisas` (boolean)
  - `identityDocuments` (object[])
    - `id` (integer<int64>)
    - `documentType` ("IdDocument" | "Passport" | "DrivingLicense")
    - `countryCode` (string)
    - `fields` (object)
    - `isVerified` (boolean)
  - `socialAccounts` (object)
    - `id` (integer<int64>)
    - `facebook` (string)
    - `twitter` (string)
    - `linkedin` (string)
    - `instagram` (string)
  - `employmentInfo` (object[])
    - `id` (integer<int64>)
    - `isCurrent` (boolean)
    - `from` (string<date>)
    - `to` (string<date>)
    - `employerName` (string)
    - `description` (string)
  - `visas` (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>)
  - `serviceApplications` (object[])
    - `id` (integer<int64>)
    - `personName` (string)
    - `personId` (integer<int64>)
    - `serviceType` ("Visa" | "Insurance" | "AirportLounge" | "FastTrack" | "Esim" | "FlightItineraryLetter" | "HotelItineraryLetter")
    - `providerName` (string)
    - `serviceIntentKey` (string)
    - `destinationCode` (string)
    - `originationCode` (string)
    - `description` (string)
    - `price` (integer<int32>)
    - `creationTime` (string<date-time>)
    - `state` ("Draft" | "ReadyForPayment" | "ReadyForReview" | "InReview" | "ReadyForApplication" | "ReviewFailed" | "Appointment" | "Applied" | "ApplicationRejected" | "ApplicationConfirmed" | "Cancelled" | "Aborted" | "InitialApprove")
    - `checkoutStatus` ("Unknown" | "Open" | "Completed" | "Expired")
    - `hasDownloadableContent` (boolean)
    - `serviceTypeId` (integer<int64>)
    - `documentsSchemeVersionId` (integer<int64>)
    - `applyingTime` (string<date-time>)
    - `dueDate` (string<date>)
    - `expectedCompletionDate` (string<date>)
    - `issuanceTime` (string<date-time>)
    - `tenantId` (string<uuid>)
    - `tripId` (integer<int64>)
    - `appointments` (object[])
      - `id` (integer<int64>)
      - `status` ("Pending" | "Scheduled" | "Accomplished" | "Canceled")
      - `visitDate` (string<date>)
      - `visitTime` (string<time>)
      - `address` (string)
      - `notes` (string)
      - `tenantId` (string<uuid>)
  - `document` (object)
    - `id` (integer<int64>)
    - `documentsSchemeVersionId` (integer<int64>)
    - `items` (object)
- `totalCount` (integer<int64>)

Example:

```json
{
  "items": [
    {
      "id": 0,
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "residenceCountry": "string",
      "birthDate": "2024-01-01",
      "hasVisas": true,
      "identityDocuments": [
        {
          "id": 0,
          "documentType": "IdDocument",
          "countryCode": "string",
          "fields": {},
          "isVerified": true
        }
      ],
      "socialAccounts": {
        "id": 0,
        "facebook": "string",
        "twitter": "string",
        "linkedin": "string",
        "instagram": "string"
      },
      "employmentInfo": [
        {
          "id": 0,
          "isCurrent": true,
          "from": "2024-01-01",
          "to": "2024-01-01",
          "employerName": "string",
          "description": "string"
        }
      ],
      "visas": [
        {
          "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
        }
      ],
      "serviceApplications": [
        {
          "id": 0,
          "personName": "string",
          "personId": 0,
          "serviceType": "Visa",
          "providerName": "string",
          "serviceIntentKey": "string",
          "destinationCode": "string",
          "originationCode": "string",
          "description": "string",
          "price": 0,
          "creationTime": "1970-01-01T00:00:00.000Z",
          "state": "Draft",
          "checkoutStatus": "Unknown",
          "hasDownloadableContent": true,
          "serviceTypeId": 0,
          "documentsSchemeVersionId": 0,
          "applyingTime": "1970-01-01T00:00:00.000Z",
          "dueDate": "2024-01-01",
          "expectedCompletionDate": "2024-01-01",
          "issuanceTime": "1970-01-01T00:00:00.000Z",
          "tenantId": "00000000-0000-0000-0000-000000000000",
          "tripId": 0,
          "appointments": [
            {
              "id": null,
              "status": "Pending",
              "visitDate": null,
              "visitTime": null,
              "address": null,
              "notes": null,
              "tenantId": null
            }
          ]
        }
      ],
      "document": {
        "id": 0,
        "documentsSchemeVersionId": 0,
        "items": {}
      }
    }
  ],
  "totalCount": 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"
        ]
      }
    ]
  }
}
```