Step 1. Submit the AI Job request
Endpoint: POST - /api/v1/tth/hospitality_product_categories
Attribute |
Type |
Mandatory |
Description |
content |
String |
Yes |
Provide the content to generate travel product categories. |
city |
String |
No |
Specify the city to travel. |
country |
String |
No |
Specify the country to travel. |
language |
String |
No |
Specify the language of the output, defaults to English . |
max_quantity |
Number |
No |
Maximum number of product categories to generate. |
voice_tone |
String |
No |
Specify the voice tone. The default will be neutral . |
context |
String |
No |
The list of other categories that will be taken into consideration during the mapping process (for example your current categories). |
Request example:
{
"content": "Hotel Crystal 大人専用",
"city": "Tokyo",
"country":"Japan",
"language": "English",
"max_quantity":10,
"voice_tone": "neutral",
"context":null
}
RESPONSE EXAMPLE:
{
"status_url": "https://sharpapi.com/api/v1/content/translate/job/status/5de4887a-0dfd-49b6-8edb-9280e468c210",
"job_id": "5de4887a-0dfd-49b6-8edb-9280e468c210"
}
Step 2. Monitor & Fetch AI Job Results
An endpoint is used to check on the progress of the requested API job.
RESULT EXAMPLE:
{
"data": {
"type": "api_job_result",
"id": "afb7cc23-23a5-479c-92a9-be983792dabc",
"attributes": {
"status": "success",
"type": "tth_hospitality_product_categories",
"result": [
{
"name": "Adult Only Hotels",
"weight": 10
},
{
"name": "Luxury Hotels",
"weight": 8.5
},
{
"name": "Boutique Hotels",
"weight": 7.5
},
{
"name": "Romantic Getaways",
"weight": 7
},
{
"name": "City Hotels",
"weight": 6.5
},
{
"name": "Couples Retreats",
"weight": 6
}
]
}
}
}