# Update a travel service application by ID

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

**PATCH** `/api/app/travel-services/{id}`

Apply a partial update to the travel service application identified by `id` and return the updated record.

## Authorization

- oidc (openIdConnect)

## Header parameters

- `X-Tenant` (string)
  Tenant ID

## Path parameters

- `id` (integer, required)

## Body

Content type: `application/json`

- `notes` (string)
- `state` ("Draft" | "ReadyForPayment" | "ReadyForReview" | "InReview" | "ReadyForApplication" | "ReviewFailed" | "Appointment" | "Applied" | "ApplicationRejected" | "ApplicationConfirmed" | "Cancelled" | "Aborted" | "InitialApprove")
- `stateChangeReason` (string)
- `items` (object)
- `forceStatusChange` (boolean)
- `exemptionIds` (integer<int64>[])
- `exemptionDocumentExpiryDates` (object)

Example:

```json
{
  "notes": "string",
  "state": "Draft",
  "stateChangeReason": "string",
  "items": {},
  "forceStatusChange": true,
  "exemptionIds": [
    0
  ],
  "exemptionDocumentExpiryDates": {}
}
```

## Responses

### 200

OK

- `id` (integer<int64>)
- `personId` (integer<int64>)
- `billingTripId` (integer<int64>)
- `billingTripFrom` (string<date>)
- `billingTripTo` (string<date>)
- `serviceType` ("Visa" | "Insurance" | "AirportLounge" | "FastTrack" | "Esim" | "FlightItineraryLetter" | "HotelItineraryLetter")
- `providerName` (string)
- `serviceIntentKey` (string)
- `notes` (string)
- `description` (string)
- `destinationCode` (string)
- `originationCode` (string)
- `state` ("Draft" | "ReadyForPayment" | "ReadyForReview" | "InReview" | "ReadyForApplication" | "ReviewFailed" | "Appointment" | "Applied" | "ApplicationRejected" | "ApplicationConfirmed" | "Cancelled" | "Aborted" | "InitialApprove")
- `document` (object)
  - `id` (integer<int64>)
  - `documentsSchemeVersionId` (integer<int64>)
  - `items` (object)
- `pricingRecords` (object[])
  - `id` (integer<int64>)
  - `serviceApplicationId` (integer<int64>)
  - `feeScope` ("Global" | "PerService")
  - `paymentModel` ("OneTime" | "Subscription" | "Thirdparty")
  - `serviceType` ("Visa" | "Insurance" | "AirportLounge" | "FastTrack" | "Esim" | "FlightItineraryLetter" | "HotelItineraryLetter")
  - `title` (string)
  - `fee` (integer<int32>)
  - `code` (string)
- `isPaid` (boolean)
- `travelerFirstName` (string)
- `travelerLastName` (string)
- `creationTime` (string<date-time>)
- `lastModificationTime` (string<date-time>)
- `applyingTime` (string<date-time>)
- `dueDate` (string<date>)
- `expectedCompletionDate` (string<date>)
- `issuanceTime` (string<date-time>)
- `appointments` (object[])
  - `id` (integer<int64>)
  - `status` ("Pending" | "Scheduled" | "Accomplished" | "Canceled")
  - `visitDate` (string<date>)
  - `visitTime` (string<time>)
  - `address` (string)
  - `notes` (string)
  - `tenantId` (string<uuid>)

Example:

```json
{
  "id": 0,
  "personId": 0,
  "billingTripId": 0,
  "billingTripFrom": "2024-01-01",
  "billingTripTo": "2024-01-01",
  "serviceType": "Visa",
  "providerName": "string",
  "serviceIntentKey": "string",
  "notes": "string",
  "description": "string",
  "destinationCode": "string",
  "originationCode": "string",
  "state": "Draft",
  "document": {
    "id": 0,
    "documentsSchemeVersionId": 0,
    "items": {}
  },
  "pricingRecords": [
    {
      "id": 0,
      "serviceApplicationId": 0,
      "feeScope": "Global",
      "paymentModel": "OneTime",
      "serviceType": "Visa",
      "title": "string",
      "fee": 0,
      "code": "string"
    }
  ],
  "isPaid": true,
  "travelerFirstName": "string",
  "travelerLastName": "string",
  "creationTime": "1970-01-01T00:00:00.000Z",
  "lastModificationTime": "1970-01-01T00:00:00.000Z",
  "applyingTime": "1970-01-01T00:00:00.000Z",
  "dueDate": "2024-01-01",
  "expectedCompletionDate": "2024-01-01",
  "issuanceTime": "1970-01-01T00:00:00.000Z",
  "appointments": [
    {
      "id": 0,
      "status": "Pending",
      "visitDate": "2024-01-01",
      "visitTime": "string",
      "address": "string",
      "notes": "string",
      "tenantId": "00000000-0000-0000-0000-000000000000"
    }
  ]
}
```

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