Step 1. Submit the AI Job request
Endpoint: POST - /api/v1/tth/ta_product_categories
Attribute |
Type |
Mandatory |
Description |
content |
String |
Yes |
Provide the content to generate travel product categories. |
city |
String |
No |
Specify the city of travel. |
country |
String |
No |
Specify the country related to travel. |
language |
String |
No |
Specify the language of the output, defaults to English . |
max_quantity |
Number |
No |
Specify the maximum length of the paraphrased content. |
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": "Oasis of the Bay",
"city": "Ha Long",
"country": "Vietnam",
"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
Endpoint: GET - /api/v1/tth/ta_product_categories/job/status/:uuid
An endpoint is used to check on the progress of the requested API job.
Result example:
{
"data": {
"type": "api_job_result",
"id": "55bc3311-d16e-4949-83a0-d367b7f79f89",
"attributes": {
"status": "success",
"type": "tth_ta_product_categories",
"result": [
{
"name": "Boat Tours",
"weight": 9.5
},
{
"name": "Nature & Wildlife Tours",
"weight": 8.7
},
{
"name": "Water Sports",
"weight": 7.8
},
{
"name": "Sightseeing Cruises",
"weight": 9.2
},
{
"name": "Day Trips",
"weight": 8
},
{
"name": "Eco Tours",
"weight": 7.5
},
{
"name": "Adventure Tours",
"weight": 6.8
},
{
"name": "Cultural Tours",
"weight": 6
},
{
"name": "Multi-day Tours",
"weight": 5.5
},
{
"name": "Private Sightseeing Tours",
"weight": 5.2
}
]
}
}
}