apyhub
SMART GENERATION · TRAVEL

Generate Hospitality Product Categories API

What it does

Hospitality Category Generator turns a piece of content into a ranked list of hospitality product categories. Send content, and you can also provide city, country, language, voice_tone, context, and max_quantity to shape the output. The job is submitted asynchronously, so you get back a job_id and a status_url to check when the result is ready.

Use it when you need to classify travel or hospitality content into categories for search, routing, content organization, or product grouping. The output comes back as an array of objects with name and weight, so you can sort, filter, or map the categories into your own workflow.

Because the service is job-based, it fits batch pipelines and higher-latency enrichment tasks better than synchronous lookups. You submit the content once, poll the status endpoint, and read the final category list from the job result when the status becomes success.

Hospitality Category Generator is a good fit for travel platforms, booking tools, and content systems that need structured category suggestions from unstructured text without hand-labeling every item.

▣ ENDPOINT 01 / 02
POST
Generate Hospitality Product Categories - Submit Job
https://api.eu.apyverse.com/sharpapi/generate-hospitality-product-categories

QUICKSTART

GUIDE

Quickstart

Submit the minimum required content to generate hospitality product categories.

curl -X POST "https://api.eu.apyverse.com/sharpapi/generate-hospitality-product-categories" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"Boutique hotel amenities and guest services"}'

What you'll get back

Returns a JSON object with two top-level string fields: job_id is the unique UUID for the submitted job, and status_url is the URI you can poll for status and result.

{
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "status_url": "https://example.com/jobs/550e8400-e29b-41d4-a716-446655440000"
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Specify the city to travel.
Provide the content to generate travel product categories.
Provide additional context to improve paraphrasing accuracy.
Specify the country to travel.
Specify the language of the output.
Specify the voice tone.
Maximum number of product categories to generate.

About this endpoint

What it does

Submits a job to generate hospitality product categories from the provided content, with optional city, country, context, language, voice tone, and maximum quantity inputs. The response returns a job identifier and a status URL for polling the async result.

Request Body

ParameterTypeMandatoryDescription
cityStringNoSpecify the city to travel.
contentStringYesProvide the content to generate travel product categories.
contextStringNoProvide additional context to improve paraphrasing accuracy.
countryStringNoSpecify the country to travel.
languageStringNoSpecify the language of the output. Default: English.
voice_toneStringNoSpecify the voice tone. Default: neutral.
max_quantityNumberNoMaximum number of product categories to generate. Minimum: 1.

Response

Returns a JSON object with a job_id string field and a status_url string field. job_id is the unique identifier of the submitted job, and status_url is the URL used to poll for the job's status and result.

ParameterTypeMandatoryDescription
job_idStringNoThe unique identifier of the submitted job. Format: UUID.
status_urlStringNoURL to poll for the job's status and result. Format: URI.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Use job_id to track the job, and poll the status_url returned in the response.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
GET
Generate Hospitality Product Categories - Check Job Status
https://api.eu.apyverse.com/sharpapi/generate-hospitality-product-categories/job/status/:job_id

QUICKSTART

GUIDE

Quickstart

Check the status of a hospitality product categories job by its job_id path parameter.

curl -X GET "https://api.eu.apyverse.com/sharpapi/generate-hospitality-product-categories/job/status/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. data contains the job result shape: id is the job UUID, type is the API job result type, and attributes includes the job type, status, and result array.

{
  "data": {
    "id": "2f1c7f2a-7c44-4f95-9d7f-2d5a8d7a1f3c",
    "type": "api_job_result",
    "attributes": {
      "type": "tth_hospitality_product_categories",
      "result": [
        {
          "name": "Luxury Hotels",
          "weight": 0.98
        }
      ],
      "status": "success"
    }
  }
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Checks the status of a previously submitted hospitality product category generation job. It returns a JSON object containing the job result wrapper and job status information, including generated categories once the job reaches a successful state.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesJob identifier in UUID format.

Response

Returns a JSON object with a data object field. data contains the job result identifier, result type, and an attributes object with the job payload type, generation status, and the generated category list when available.

AttributeTypeMandatoryDescription
dataObjectNoJob result wrapper. Contains id, type, and attributes.
data.idStringNoJob result identifier in UUID format.
data.typeStringNoResult wrapper type. The schema example shows api_job_result.
data.attributesObjectNoJob attributes. Contains type, result, and status.
data.attributes.typeStringNoResult payload type. The schema example shows tth_hospitality_product_categories.
data.attributes.resultObject ArrayNoGenerated hospitality product categories returned by the job. Each item contains name and weight.
data.attributes.result[].nameStringNoThe name of the generated hospitality product category.
data.attributes.result[].weightNumberNoThe relevance weight/score of this category.
data.attributes.statusENUMNoJob status. Allowed values: running, failed, queued, success.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.