# Get service intents based on input data

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

Search for service intents by service type and trip context. The endpoint is anonymous; send `Content-Type: application/json`.

`serviceType` is required unless `serviceIntentKeysFilter` contains one or more keys. When keys are supplied, the endpoint resolves only those keys; do not combine them with `continuationToken`. If `serviceType` is also supplied, every key must belong to that type.

`tripContext.items` is a dictionary of provider-specific values. Country codes in these examples use ISO 3166-1 alpha-3 codes, and dates use `YYYY-MM-DD`.

## Visa

Visa search uses the route, travel dates, and (optionally) the traveler's document type and qualifying exemptions. If `system.tripDocumentTypeKey` is omitted, the endpoint defaults it to `passport`.

```json
{
	"serviceType": "Visa",
	"tripContext": {
		"items": {
			"system.tripOrigination": "JOR",
			"system.tripDestination": "USA",
			"system.tripFrom": "2027-02-01",
			"system.tripTo": "2027-02-14",
			"system.tripDocumentTypeKey": "passport",
			"system.exemptions": [101],
			"system.exemptionDocumentExpiryDates": {
				"101": "2027-12-31"
			}
		},
		"travelerContexts": []
	}
}
```

Use exemption IDs returned by the exemptions API for the same traveler and origination. Include an expiration date when an exemption has a minimum document-validity requirement. The expiry-date object maps exemption IDs to dates. `system.tripFrom` is used to check that validity; the trip dates are also used when checking whether a visa's stay duration and processing time fit the trip. A visa search can return a `continuationToken` when another page is available. Send that opaque token with the same search context to retrieve the next page.

## Insurance

Tamkeen uses the trip's origination, destination, and dates. It returns results only when origination is `PSE` or `JOR`; destination selects the plan when supplied. The trip must be no longer than 90 days. If destination is omitted, the provider may return both plans.

```json
{
	"serviceType": "Insurance",
	"tripContext": {
		"items": {
			"system.tripOrigination": "JOR",
			"system.tripDestination": "USA",
			"system.tripFrom": "2026-11-01",
			"system.tripTo": "2026-11-10"
		},
		"travelerContexts": []
	}
}
```

## Airport Lounge

Search by city by passing `city` in `tripContext.items`:

```json
{
	"serviceType": "AirportLounge",
	"tripContext": {
		"items": {
			"city": "Dubai"
		},
		"travelerContexts": []
	},
	"inputRestrictionMode": "FailOnMissing"
}
```

The city value can be a partial name, but it must contain at least three characters after trimming whitespace.

If `city` is missing, the default `ByPassOnMissing` mode returns no lounge intents; `FailOnMissing` instead returns a validation error. To resolve known lounge intents, pass their exact keys in `serviceIntentKeysFilter` rather than searching by city.

## Fast Track

Fast Track uses the same `city` context key, but searches fast-track services:

```json
{
	"serviceType": "FastTrack",
	"tripContext": {
		"items": {
			"city": "Abu Dhabi"
		},
		"travelerContexts": []
	},
	"inputRestrictionMode": "FailOnMissing"
}
```

> **Partial city names**
>
> The city value can be a partial name, but it must contain at least three characters after trimming whitespace.

With no `city`, `ByPassOnMissing` returns no fast-track intents and `FailOnMissing` returns a validation error. To resolve known fast-track intents, provide their exact keys in `serviceIntentKeysFilter`.

**POST** `/api/app/travel-services/service-intents`

Rule precedence:
<list type="number"><item><description>If Visapasses.TravelerAide.TravelServices.ServiceIntentsRequestDto.ServiceIntentKeysFilter is provided, only those keys are resolved.</description></item><item><description>Otherwise, providers are selected by Visapasses.TravelerAide.TravelServices.ServiceIntentsRequestDto.ServiceType.</description></item><item><description>Selected providers evaluate Visapasses.TravelerAide.TravelServices.ServiceIntentsRequestDto.TripContext and Visapasses.TravelerAide.TravelServices.ServiceIntentsRequestDto.InputRestrictionMode.</description></item></list>
            
Result ordering behavior:
<list type="bullet"><item><description>If destination exists in trip context, results are ordered by fee.</description></item><item><description>If destination is missing, results are shuffled.</description></item></list>

## Authorization

- oidc (openIdConnect)

## Header parameters

- `X-Tenant` (string)
  Tenant ID

## Body

Content type: `application/json`

- `serviceType` ("Visa" | "Insurance" | "AirportLounge" | "FastTrack" | "Esim" | "FlightItineraryLetter" | "HotelItineraryLetter")
- `tripContext` (object)
  - `items` (object)
    Global context key/value items shared across providers.
  - `travelerContexts` (object[])
    Optional per-traveler context items used by provider-specific logic.
    - `personId` (integer<int64>)
    - `items` (object)
- `inputRestrictionMode` ("ByPassOnMissing" | "FailOnMissing")
  Determines how providers handle missing required values in Visapasses.TravelerAide.TravelServices.TripContextDto.
- `serviceIntentKeysFilter` (string[])
  Optional list of explicit service intent keys to fetch.
- `continuationToken` (string<uuid>)
  Continuation token returned by a previous service-intents search page.

Example:

```json
{
  "serviceType": "Visa",
  "tripContext": {
    "items": {},
    "travelerContexts": [
      {
        "personId": 0,
        "items": {}
      }
    ]
  },
  "inputRestrictionMode": "ByPassOnMissing",
  "serviceIntentKeysFilter": [
    "string"
  ],
  "continuationToken": "00000000-0000-0000-0000-000000000000"
}
```

## Responses

### 200

OK

- `items` (object[])
  - `serviceType` ("Visa" | "Insurance" | "AirportLounge" | "FastTrack" | "Esim" | "FlightItineraryLetter" | "HotelItineraryLetter")
  - `provider` (string)
  - `destinationCountryCode` (string)
  - `serviceIntentKey` (string)
  - `title` (string)
  - `description` (string)
  - `info` (string)
  - `tags` (string[])
  - `documentSchemeVersionId` (integer<int64>)
  - `pricingRecords` (object[])
    - `serviceType` ("Visa" | "Insurance" | "AirportLounge" | "FastTrack" | "Esim" | "FlightItineraryLetter" | "HotelItineraryLetter")
    - `referenceId` (integer<int64>)
    - `feeScope` ("Global" | "PerService")
    - `paymentModel` ("OneTime" | "Subscription" | "Thirdparty")
    - `title` (string)
    - `fee` (integer<int32>)
    - `commission` (integer<int32>)
    - `code` (string)
  - `serviceTypeId` (integer<int64>)
  - `fee` (integer<int32>)
  - `isSelectable` (boolean)
  - `callToActions` (object[])
    - `type` ("ServiceApplication" | "Internal" | "External" | "API")
    - `title` (string)
    - `uri` (string)
    - `payload` (object)
    - `payloads` (object)
  - `extraProperties` (object)
  - `isDisabled` (boolean)
  - `disableReasons` (string[])
  - `images` (object[])
    - `order` (integer<int32>)
    - `url` (string)
  - `amenities` (object[])
    - `name` (string)
    - `description` (string)
    - `terms` (string)
    - `iconUrl` (string)
- `continuationToken` (string<uuid>)
- `hasMore` (boolean)

Example:

```json
{
  "items": [
    {
      "serviceType": "Visa",
      "provider": "string",
      "destinationCountryCode": "string",
      "serviceIntentKey": "string",
      "title": "string",
      "description": "string",
      "info": "string",
      "tags": [
        "string"
      ],
      "documentSchemeVersionId": 0,
      "pricingRecords": [
        {
          "serviceType": "Visa",
          "referenceId": 0,
          "feeScope": "Global",
          "paymentModel": "OneTime",
          "title": "string",
          "fee": 0,
          "commission": 0,
          "code": "string"
        }
      ],
      "serviceTypeId": 0,
      "fee": 0,
      "isSelectable": true,
      "callToActions": [
        {
          "type": "ServiceApplication",
          "title": "string",
          "uri": "string",
          "payload": {},
          "payloads": {}
        }
      ],
      "extraProperties": {},
      "isDisabled": true,
      "disableReasons": [
        "string"
      ],
      "images": [
        {
          "order": 0,
          "url": "string"
        }
      ],
      "amenities": [
        {
          "name": "string",
          "description": "string",
          "terms": "string",
          "iconUrl": "string"
        }
      ]
    }
  ],
  "continuationToken": "00000000-0000-0000-0000-000000000000",
  "hasMore": true
}
```

### 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"
        ]
      }
    ]
  }
}
```