apyhub
DEVELOPER TOOLS · SMART GENERATION

Generate Tours & Activities Product Categories API

What it does

Tour Category Generator turns travel content into a ranked list of tours and activities product categories. Send it content, and optionally add city, country, language, context, and max_quantity to shape the output. The service returns a job_id so you can check processing asynchronously.

When the job completes, you get a structured result with a status and a result array. Each result item includes a category name and a numeric weight, which helps you prioritize the best-fitting categories for a destination page, marketplace listing, or travel catalog.

Use it when you need to classify destination descriptions, normalize supplier copy, or build browsing filters from unstructured travel text. language lets you request the output in a specific language, while city and country provide geographic context for better category matching.

Tour Category Generator is built for travel products that need clean taxonomy data without hand-editing every listing. It gives you a repeatable way to transform free-form text into an ordered set of tour and activity categories.

▣ ENDPOINT 01 / 02
POST
Generate Tours & Activities Product Categories Submit Job
https://api.eu.apyverse.com/sharpapi/generate-tours-activities-product-catego

QUICKSTART

GUIDE

Quickstart

Create a travel product category generation job from the content you provide.

curl -X POST "https://api.eu.apyverse.com/sharpapi/generate-tours-activities-product-catego" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Top things to do in Paris for first-time visitors"
  }'

What you'll get back

Returns a JSON object with a required job_id string field — the ID of the created job.

{
  "job_id": "5de4887a-0dfd-49b6-8edb-9280e468c210"
}
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 of travel.
Provide the content to generate travel product categories.
Provide additional context to improve paraphrasing accuracy
Specify the country related to travel.
Specify the language of the output, defaults to `English`
Specify the maximum length of the paraphrased content

About this endpoint

What it does

Submits an async job to generate tours and activities product categories from the provided content. The request body supplies the content to process, and the response returns a job identifier you can use to track the job.

Request Body

ParameterTypeMandatoryDescription
cityStringNoSpecify the city of travel.
contentStringYesProvide the content to generate travel product categories.
contextStringNoProvide additional context to improve paraphrasing accuracy.
countryStringNoSpecify the country related to travel.
languageStringNoSpecify the language of the output, defaults to English.
max_quantityNumberNoSpecify the maximum length of the paraphrased content.

Response

Returns a JSON object with a job_id string field. This is the identifier for the submitted async job.

ParameterTypeMandatoryDescription
job_idStringYesThe job identifier returned when the job is submitted.

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. Extract the job id from job_id.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
GET
Generate Tours & Activities Product Categories Check Job Status
https://api.eu.apyverse.com/sharpapi/generate-tours-activities-product-catego/job/status/:job_id

QUICKSTART

GUIDE

Quickstart

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

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

What you'll get back

Returns a JSON object with a top-level data object. data includes id and type strings plus an attributes object, where attributes.status is the job status and attributes.type identifies the result type; attributes.result is an array of objects with name and weight when results are available.

{
  "data": {
    "id": "55bc3311-d16e-4949-83a0-d367b7f79f89",
    "type": "api_job_result",
    "attributes": {
      "type": "tth_ta_product_categories",
      "status": "success",
      "result": [
        {
          "name": "Boat Tours",
          "weight": 9.5
        }
      ]
    }
  }
}
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 an asynchronous job for generating Tours & Activities product categories using the provided job_id. The response returns a JSON object containing a data object with the job result metadata and status.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesJob identifier, format: string.

Response

Returns a JSON object with a data object. Inside data, the response includes id and type strings plus an attributes object. The attributes object contains status and type strings, and may include a result array of objects with name and weight fields.

AttributeTypeMandatoryDescription
dataObjectYesWrapper object for the job result payload.
data.idStringYesJob result identifier.
data.typeStringYesResult object type.
data.attributesObjectYesObject containing job status and result metadata.
data.attributes.statusENUMYesJob status. Allowed values: success, failed, running, queued.
data.attributes.typeStringYesResult type identifier.
data.attributes.resultObject ArrayNoArray of generated category objects. Each item contains name and weight.
data.attributes.result[].nameStringYesCategory name.
data.attributes.result[].weightNumberYesCategory weight.

Notes

Poll this endpoint with the job_id returned by the submit call. The data.attributes.status field cycles through transitional values (queued, running) before reaching a terminal state (success, failed). The data.attributes.result fields are only populated once status is success; treat them as absent otherwise.

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.