# Export approved hotel text with image URLs

Content Enrichment API / Approval Links

`POST https://api.ygo.ai/v2/project/content/exportApprovedHotelText`

Download one hotel's approved catalog text, followed by the image URLs its approval page serves, as a `.txt` file. The response body is the file itself (`text/plain; charset=utf-8`), not a JSON envelope, and the `Content-Disposition` header carries one ASCII name: hotel slug, locale, approval date. The file contains the generated texts the hotel's approval page served in the project's default locale, verbatim and in page order, under a framed metadata block that no layout would mistake for copy, then the served image URLs in the approval page's order in a block of their own. A hotel that has not approved is refused with 409 `NOT_APPROVED`, and so is a hotel whose text was regenerated after its approval: what leaves is byte for byte the approved text, never the live text. When the project's `Content.ApprovalTextKeys` setting lists template keys, only texts with a listed key are exported, rule texts included. The call writes nothing to the approval tables and, like the approval page, neither reads nor writes the shared enriched-hotel cache. 

The file is REFUSED with 500 `INTERNAL_ERROR` when any read it certifies fails, rather than served with the missing part silently absent. A 500 also answers one INVARIANT violation: an approval row marked approved that carries no approval time ("Approval record has no approval time"). The file's `Approved:` line and its download name are both built from that timestamp, so the export refuses rather than invent a date. It is corrupt data rather than a client state, which is why it is a 500 and not a 409, and no request can cause or clear it. The reads are: the hotel's generated texts (message "Failed to load hotel texts"); and, all under "Failed to load the hotel's images and identifiers", the pinned image, the project master code, the project's ordered approval image list for the hotel (with the rows and fingerprints of the images on it), the provider registry, the per-image ownership check, the hotel's room list, a room's image rows, the hotel's own image rows, the image fingerprints those rows point at, and the crop groups that collapse near-duplicate images. Each of these would otherwise change the file silently — a missing master code simply omits the `ProductID` line, a missing fingerprint read leaves every image without the category the gallery rule sorts on — so one approval could yield two different files on either side of a transient error. The hotel's own approval page keeps rendering through the image and identifier reads, because it displays rather than certifies. The generated-texts read is the exception: the approval page and the hotel's own approve refuse with the same 500 rather than show, or record consent to, a half-rendered page. Nothing is wrong with the hotel's text or its approval in that case: download again once the failing read recovers.

Exact spec (OpenAPI 3.0, JSON): https://docs.ygo.ai/reference/exportApprovedHotelText.json

## Example request

```bash
curl -X POST 'https://api.ygo.ai/v2/project/content/exportApprovedHotelText' \
  -H "Authorization: Bearer $YGO_API_KEY" \
  -H "X-Project-ID: $YGO_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "HotelID": "019f412f-c41c-746e-b569-e6454677366c"
}'
```

## Authorization

`Authorization: Bearer <key>`

Project-scoped API key

## Headers

- `X-Project-ID` (string (uuid), **required**)

  Project UUID. Required for all project-scoped endpoints.

  Example: `$YGO_PROJECT_ID`

## Request body

Required.

### application/json

Schema: object, `ExportApprovedHotelTextRequest`

The hotel to export. The locale is always the project's default locale; the request names none.

- `HotelID` (string (uuid), **required**)

  UUID of the hotel. Required, a valid non-nil UUID, and a live member of the calling project.

  Example: `019f412f-c41c-746e-b569-e6454677366c`

#### Example request: approvedText. Export one hotel

```json
{
  "HotelID": "019f412f-c41c-746e-b569-e6454677366c"
}
```

## Responses

### 200 OK

The approved catalog text file, with the served image URLs. The body is the file itself, not a JSON envelope.

Headers:

- `Content-Disposition` (string)

  Download name of the file: one ASCII `filename` — hotel slug, served locale, approval date (UTC day) — and no `filename*` form.

  Example: `attachment; filename="neptune-luxury-resort_de-DE_2026-08-27.txt"`
- `Content-Length` (integer)

  Size of the file in bytes. Always set explicitly; the body is never content-encoded.

  Example: `1020`
- `Cache-Control` (string)

  Always `no-store`: the file is one project's content, named after its hotel.

  Example: `no-store`
- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`
- `X-Content-Type-Options` (string)

  Always `nosniff`: the body is a text file and is never to be sniffed into anything else.

  Example: `nosniff`

#### text/plain

Schema: string, `ApprovedHotelTextFile`

The file body: UTF-8 with LF line endings. A framed metadata block (`Hotel`, `GIATA`, `ProductID`, `Locale`, `Approved`, `Text version`, `Images`, and the always-present `AI notice` disclosure), then the approved texts between `--- BEGIN APPROVED TEXT ---` and `--- END APPROVED TEXT ---`, each introduced by its template key in brackets, then the image URLs the approval page shows (the page's own selection — the operator's ordered image list when the project holds one for the hotel, otherwise at most ten chosen by the approval image rule; both documented on the `Images` property of `getApprovalLink`) between `--- BEGIN IMAGE URLS (in the order the approval page serves them) ---` and `--- END IMAGE URLS ---`, numbered, one per line, in the page's order.

Example:

```text
==================================================================
 APPROVED CATALOG TEXT - METADATA (not part of the text, do not paste)
 Hotel:         Neptune Luxury Resort
 GIATA:         741
 ProductID:     NEP-KOS-01
 Locale:        de-DE
 Approved:      2026-08-27T13:50:10Z by Ayşe Yılmaz
 Text version:  2026-08-19T14:15:29Z
 Images:        3
 AI notice:     This text is AI-generated (EU AI Act Art. 50(2))
==================================================================
--- BEGIN APPROVED TEXT ---

[Summary]
Neptune Luxury Resort ist ein **5-Sterne-Resort in Familienbesitz direkt am Strand**, das sich in Mastichari auf der Insel Kos befindet. Die 1989 gegründete Unterkunft liegt inmitten weitläufig angelegter Themengärten direkt an einem privaten, abgelegenen Sandstrand.

[Highlights]
- Privater Sandstrand in ruhiger Lage
- Weitläufig angelegte Themengärten
- Außergewöhnliche Sauberkeit in der gesamten Anlage

[GuestPolicies]
Check-in ab 15:00 Uhr, Check-out bis 11:00 Uhr. Haustiere sind nicht gestattet.

--- END APPROVED TEXT ---

--- BEGIN IMAGE URLS (in the order the approval page serves them) ---
1. https://images.ygo.ai/hotels/019f412f-c41c-746e-b569-e6454677366c/3f9a2c7e.jpg
2. https://images.ygo.ai/hotels/019f412f-c41c-746e-b569-e6454677366c/b71d04e2.jpg
3. https://images.ygo.ai/hotels/019f412f-c41c-746e-b569-e6454677366c/9c4e61aa.jpg
--- END IMAGE URLS ---

```

##### Example: approvedText. The approved text in the project's default locale, then the served image URLs

```text
==================================================================
 APPROVED CATALOG TEXT - METADATA (not part of the text, do not paste)
 Hotel:         Neptune Luxury Resort
 GIATA:         741
 ProductID:     NEP-KOS-01
 Locale:        de-DE
 Approved:      2026-08-27T13:50:10Z by Ayşe Yılmaz
 Text version:  2026-08-19T14:15:29Z
 Images:        3
 AI notice:     This text is AI-generated (EU AI Act Art. 50(2))
==================================================================
--- BEGIN APPROVED TEXT ---

[Summary]
Neptune Luxury Resort ist ein **5-Sterne-Resort in Familienbesitz direkt am Strand**, das sich in Mastichari auf der Insel Kos befindet. Die 1989 gegründete Unterkunft liegt inmitten weitläufig angelegter Themengärten direkt an einem privaten, abgelegenen Sandstrand.

[Highlights]
- Privater Sandstrand in ruhiger Lage
- Weitläufig angelegte Themengärten
- Außergewöhnliche Sauberkeit in der gesamten Anlage

[GuestPolicies]
Check-in ab 15:00 Uhr, Check-out bis 11:00 Uhr. Haustiere sind nicht gestattet.

--- END APPROVED TEXT ---

--- BEGIN IMAGE URLS (in the order the approval page serves them) ---
1. https://images.ygo.ai/hotels/019f412f-c41c-746e-b569-e6454677366c/3f9a2c7e.jpg
2. https://images.ygo.ai/hotels/019f412f-c41c-746e-b569-e6454677366c/b71d04e2.jpg
3. https://images.ygo.ai/hotels/019f412f-c41c-746e-b569-e6454677366c/9c4e61aa.jpg
--- END IMAGE URLS ---

```

### 400 Bad Request

Bad Request - the request body or the X-Project-ID header failed validation, or the project has no default locale.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: missingProjectHeader. X-Project-ID header missing

```json
{
  "Error": {
    "Code": "VALIDATION_ERROR",
    "Message": "X-Project-ID header is required"
  }
}
```

##### Example: invalidBody. Malformed request body

```json
{
  "Error": {
    "Code": "VALIDATION_ERROR",
    "Message": "Invalid request body"
  }
}
```

##### Example: invalidHotelID. HotelID missing or not a valid UUID

```json
{
  "Error": {
    "Code": "VALIDATION_ERROR",
    "Message": "Validation failed",
    "Fields": [
      {
        "Field": "HotelID",
        "Message": "HotelID must be a valid UUID"
      }
    ]
  }
}
```

##### Example: noDefaultLocale. The project has no default locale

```json
{
  "Error": {
    "Code": "VALIDATION_ERROR",
    "Message": "Project has no default locale (Settings.Content.DefaultLocale), so there is no locale to export"
  }
}
```

### 401 Unauthorized

Unauthorized - Invalid or missing bearer token.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: missingToken. No Authorization header

```json
{
  "Error": {
    "Code": "UNAUTHORIZED",
    "Message": "Missing bearer token"
  }
}
```

##### Example: invalidToken. The bearer token is not valid

```json
{
  "Error": {
    "Code": "UNAUTHORIZED",
    "Message": "Invalid bearer token"
  }
}
```

### 403 Forbidden

Forbidden - the caller is authenticated but may not act on this project. Also returned with code INSUFFICIENT_SCOPE when the API key does not carry the content.authoring:read permission this endpoint requires.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: accessDenied. The user token has no editor access to the project

```json
{
  "Error": {
    "Code": "FORBIDDEN",
    "Message": "Access denied to project"
  }
}
```

##### Example: noProjectScope. The request carries no project scope

```json
{
  "Error": {
    "Code": "FORBIDDEN",
    "Message": "Project access required"
  }
}
```

##### Example: insufficientScope. A project token without the content.authoring:read scope

```json
{
  "Error": {
    "Code": "INSUFFICIENT_SCOPE",
    "Message": "token lacks scope content.authoring:read"
  }
}
```

### 404 Not Found

Not Found - the project or the hotel is not reachable for this caller, or the project's default locale has no approved text, or the project's `Content.ApprovalTextKeys` setting hides every text this hotel has in that locale.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: projectNotFound. The project does not exist or was deleted (user tokens)

```json
{
  "Error": {
    "Code": "NOT_FOUND",
    "Message": "Project not found"
  }
}
```

##### Example: hotelNotFound. The hotel is not a live member of the project

```json
{
  "Error": {
    "Code": "NOT_FOUND",
    "Message": "Hotel not found"
  }
}
```

##### Example: noTextForLocale. The hotel has approved, but the project's default locale carries no text

```json
{
  "Error": {
    "Code": "NOT_FOUND",
    "Message": "No approved text in the project's default locale"
  }
}
```

### 409 Conflict

Conflict - nothing this endpoint may serve as approved: the hotel has not approved, its approval recorded no text version, a text of the exported locale was regenerated, added or cleared after the approval, or a text carries an unreadable version stamp, or a text carries one of the export file's own frame markers on a line of its own (under LF, CRLF or a lone CR).

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: notApproved. The hotel has no approval link, or its link has not reached `approved`

```json
{
  "Error": {
    "Code": "NOT_APPROVED",
    "Message": "Hotel has not approved its catalog text yet"
  }
}
```

##### Example: notApprovedNoVersion. Approved, but the approval recorded no text version

```json
{
  "Error": {
    "Code": "NOT_APPROVED",
    "Message": "Hotel approved a text that carried no version stamp, so nothing can be exported as approved. Remedy: regenerate the hotel's texts (that stamps them), revoke the link and create a new one, and let the hotel approve again - the version is then recorded and the export opens"
  }
}
```

##### Example: notApprovedTextMoved. Approved, but a text of the exported locale was regenerated after the approval

```json
{
  "Error": {
    "Code": "NOT_APPROVED",
    "Message": "Hotel's text was regenerated after its approval, so the live text is not the text the hotel approved and nothing can be exported as approved. Remedy: revoke the link and create a new one, and let the hotel approve the current text again - the export then opens"
  }
}
```

##### Example: notApprovedUnreadableStamp. Approved, but a text carries a version stamp that cannot be read

```json
{
  "Error": {
    "Code": "NOT_APPROVED",
    "Message": "Hotel's text carries a version stamp that cannot be read, so nothing can be said about which version the hotel approved and nothing can be exported as approved. Remedy: regenerate the hotel's texts (that rewrites the stamps), revoke the link and create a new one, and let the hotel approve again - the version is then recorded and the export opens"
  }
}
```

##### Example: notApprovedForgedFrame. A text carries one of the file's own frame markers on a line of its own

```json
{
  "Error": {
    "Code": "NOT_APPROVED",
    "Message": "Hotel's approved text contains a line that equals one of the export file's own frame markers, so the file could not be delimited safely and nothing can be exported as approved. Remedy: change that text, revoke the link and create a new one, and let the hotel approve again."
  }
}
```

### 429 Too Many Requests

Too Many Requests. The response includes a `Retry-After` header with the number of seconds to wait before retrying.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`
- `Retry-After` (integer)

  Number of seconds to wait before retrying the request. Present on 429 responses.

  Example: `39`

  Limits: min 1

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: rateLimited. Limit exceeded

```json
{
  "Error": {
    "Code": "RATE_LIMIT_EXCEEDED",
    "Message": "Rate limit exceeded. Retry after the number of seconds in the Retry-After header."
  }
}
```

### 500 Internal Server Error

Internal Server Error - Unexpected server error. Include the X-Trace-ID header value when contacting support.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: approvalFailed. The approval could not be read

```json
{
  "Error": {
    "Code": "INTERNAL_ERROR",
    "Message": "Failed to load approval"
  }
}
```

##### Example: hotelFailed. The hotel could not be loaded

```json
{
  "Error": {
    "Code": "INTERNAL_ERROR",
    "Message": "Failed to load hotel"
  }
}
```

##### Example: membershipFailed. Hotel membership could not be verified

```json
{
  "Error": {
    "Code": "INTERNAL_ERROR",
    "Message": "Failed to verify hotel"
  }
}
```

##### Example: textsFailed. The hotel's generated texts could not be read (the page's texts read degraded); no partial file is served

```json
{
  "Error": {
    "Code": "INTERNAL_ERROR",
    "Message": "Failed to load hotel texts"
  }
}
```

##### Example: noApprovalTime. An invariant violation, not a client state: the approval row is marked approved but carries no approval time, which the file's Approved line and its download name are both built from. Corrupt data — no request can cause it or clear it

```json
{
  "Error": {
    "Code": "INTERNAL_ERROR",
    "Message": "Approval record has no approval time"
  }
}
```

##### Example: inputsFailed. The hotel's images or identifiers could not be read; no file is certified from a degraded gallery or metadata block. The endpoint description lists every read this covers. The hotel's text and its approval are unaffected, so the remedy is to download again once the failing read recovers

```json
{
  "Error": {
    "Code": "INTERNAL_ERROR",
    "Message": "Failed to load the hotel's images and identifiers"
  }
}
```
