# Get travel services dashboard data

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

Returns dashboard summary data for the current tenant, including recent applications, daily issued-application counts, top destinations, and aggregate totals.

**GET** `/api/app/travel-services/dashboard`

Retrieve dashboard summary data for the current tenant: recent applications, a daily count breakdown of
issued applications, top destinations, and aggregate totals.

## Authorization

- oidc (openIdConnect)

## Header parameters

- `X-Tenant` (string)
  Tenant ID

## Query parameters

- `RecentCount` (integer)
  Number of most recent applications to return.
- `DaysCount` (integer)
  Number of trailing days to include in the daily application-count breakdown.

## Responses

### 200

OK

- `recentApplications` (object[])
  Most recently created applications, newest first.
  - `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>)
- `dailyApplicationCounts` (object[])
  Number of applications with a status other than Visapasses.TravelerAide.TravelServices.ServiceApplicationState.Draft or
  Visapasses.TravelerAide.TravelServices.ServiceApplicationState.ReadyForPayment, grouped by creation day, ordered oldest to newest.
  - `date` (string<date>)
  - `count` (integer<int32>)
- `topDestinations` (object[])
  Up to 10 destination countries by number of applications.
  - `countryCode` (string)
  - `count` (integer<int32>)
- `topOriginations` (object[])
  Up to 10 origination countries by number of applications.
  - `countryCode` (string)
  - `count` (integer<int32>)
- `totalApplications` (integer<int32>)
  Total number of applications, including those in Visapasses.TravelerAide.TravelServices.ServiceApplicationState.Draft or
  Visapasses.TravelerAide.TravelServices.ServiceApplicationState.ReadyForPayment.
- `totalAppliedApplications` (integer<int32>)
  Total number of applications that have a non-null `ApplyingTime`.
- `totalConfirmedApplications` (integer<int32>)
  Total number of applications with status Visapasses.TravelerAide.TravelServices.ServiceApplicationState.ApplicationConfirmed.
- `totalReviewFailedApplications` (integer<int32>)
  Total number of applications with status Visapasses.TravelerAide.TravelServices.ServiceApplicationState.ReviewFailed.

Example:

```json
{
  "recentApplications": [
    {
      "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": 0,
          "status": "Pending",
          "visitDate": "2024-01-01",
          "visitTime": "string",
          "address": "string",
          "notes": "string",
          "tenantId": "00000000-0000-0000-0000-000000000000"
        }
      ]
    }
  ],
  "dailyApplicationCounts": [
    {
      "date": "2024-01-01",
      "count": 0
    }
  ],
  "topDestinations": [
    {
      "countryCode": "string",
      "count": 0
    }
  ],
  "topOriginations": [
    {
      "countryCode": "string",
      "count": 0
    }
  ],
  "totalApplications": 0,
  "totalAppliedApplications": 0,
  "totalConfirmedApplications": 0,
  "totalReviewFailedApplications": 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"
        ]
      }
    ]
  }
}
```