Top Activities Email#
Generate HTML email content for top activities recommendations.
Endpoint#
GET marketing/v1/mail-campaign/top-activities-template
Description#
This endpoint generates HTML email content featuring top activity recommendations. It can either use a predefined list of product IDs or dynamically fetch recommendations based on location parameters.
The endpoint returns formatted HTML content suitable for email campaigns, with product information including pricing in the specified currency.
Request Parameters#
Location Parameters (for dynamic recommendations)#
The following parameters are used when productIds is not provided:
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
String |
Optional |
IATA airport code for the destination (e.g., “PAR” for Paris) |
|
String |
Optional |
Name of the destination city |
|
Long |
Optional |
Unique identifier for the destination |
|
Double |
Optional |
Search radius in kilometers around the specified coordinates |
|
Double |
Optional |
Latitude coordinate for location-based search |
|
Double |
Optional |
Longitude coordinate for location-based search |
Note: When using dynamic recommendations, at least one location parameter (iataCode, cityName, destinationId, or lat/lon pair) should be provided.
Product Parameters#
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
List<Long> |
Optional |
List of specific product IDs to include in the email. When provided, location parameters are ignored. |
Display Parameters#
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
Integer |
Optional |
Maximum number of recommendations to fetch (defaults to 10 if not provided). Values higher than 10 will be automatically capped at 10 to ensure optimal email performance and user experience. |
|
String |
Optional |
ISO currency code for price display (e.g., “EUR”, “USD”). Defaults to EUR if not provided or invalid. |
Request Examples#
Example 1: Using Specific Product IDs#
GET marketing/v1/mail-campaign/top-activities-template?productIds=12345,67890,11223¤cyCode=USD
Example 2: Dynamic Recommendations by City#
GET marketing/v1/mail-campaign/top-activities-template?cityName=Paris¤cyCode=EUR
Example 3: Dynamic Recommendations by IATA Code#
GET marketing/v1/mail-campaign/top-activities-template?iataCode=NYC&maxRecommendations=10¤cyCode=USD
Example 4: Dynamic Recommendations by Coordinates#
GET marketing/v1/mail-campaign/top-activities-template?lat=48.8566&lon=2.3522&radius=5.0¤cyCode=EUR
Response#
Content-Type#
text/html
Success Response#
Code: 200 OK
Content: HTML formatted email content ready for email campaign distribution.
The HTML content includes:
Structured layout optimized for email clients
Product images and descriptions
Pricing information in the requested currency
Call-to-action buttons
Responsive design for mobile and desktop email clients
Error Responses#
Code |
Description |
|---|---|
400 |
Bad Request - Invalid input parameters or validation failed |
401 |
Unauthorized - Missing or invalid authentication |
403 |
Forbidden - Insufficient permissions to access this endpoint |
404 |
Not Found - Specified products or destination not found |
500 |
Internal Server Error - Server error during processing |
Behavior Notes#
Product ID Priority: When
productIdsis provided, the endpoint uses those specific products and ignores all location-based parameters.Dynamic Recommendations: When
productIdsis not provided, the endpoint fetches recommendations based on location parameters. The system validates that appropriate location parameters are present.Product Limit: The
maxRecommendationsparameter is respected but automatically capped at a maximum of 10 products to ensure optimal email performance and user experience. If you request more than 10, the system will return exactly 10. If not provided, defaults to 10.Currency Handling:
The system validates the provided currency code against supported currencies
Invalid or unsupported currencies default to EUR
Prices are converted to the requested currency for display
Locale: The email content language is determined by the request context locale, defaulting to English if not specified.
HTML Output: The generated HTML is optimized for email clients and includes inline styles for maximum compatibility.
Use Cases#
Personalized email campaigns featuring destination-specific activities
Promotional emails with curated activity selections
Follow-up emails after destination searches
Geographic-targeted marketing campaigns