apyhub
ARTIFICIAL INTELLIGENCE · E-COMMERCE QUICK TOOLS

Generate Product Categories API

What it does

Product Category Generator helps you turn a product name and its parameters into a ranked set of category suggestions. Send content in the request body, and optionally include context to narrow the category space, language to control the output language, voice_tone to shape the wording, and max_quantity to limit how many categories you want back.

The POST endpoint starts an asynchronous job and returns a job_id plus a status_url. You then poll the status endpoint with that job_id until the job reaches success, failed, queued, or running.

When the job completes successfully, the result includes an array of category objects with name and weight. Use the weights to sort or filter the suggested categories before mapping them into your own taxonomy, autocomplete flow, catalog enrichment pipeline, or internal classification workflow.

Use Product Category Generator when you need category ideas for a new listing, want to standardize product taxonomy across vendors, or need a lightweight way to generate category candidates before a human review step.

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

QUICKSTART

GUIDE

Quickstart

Submit a product description to generate categories for it.

curl -X POST "https://api.eu.apyverse.com/sharpapi/generate-product-categories" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Wireless noise-cancelling headphones",
    "language": "English"
  }'

What you'll get back

Returns a JSON object with two top-level string fields: job_id, the unique identifier for the submitted job, and status_url, the URL to poll for job status.

{
  "job_id": "job_123abc",
  "status_url": "https://api.example.com/jobs/job_123abc"
}
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*
Product name and its parameters.
List of other categories to consider.

About this endpoint

What it does

Submits a product-categorization generation job using the provided product content and optional context fields. The response returns identifiers you can use to poll the job status asynchronously.

Request Body

ParameterTypeMandatoryDescription
contentStringYesProduct name and its parameters.
contextStringNoList of other categories to consider.
languageStringNoDefaults to English.
voice_toneStringNoNo schema-defined constraints or default.
max_quantityIntegerNoNo schema-defined constraints or default.

Response

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

AttributeTypeMandatoryDescription
job_idStringYesThe unique identifier for the submitted job.
status_urlStringYesThe URL to poll for job status.

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 from the response.

Body

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

QUICKSTART

GUIDE

Quickstart

Check the status of a product-categories generation job by replacing job_id in the path.

curl -X GET "https://api.eu.apyverse.com/sharpapi/generate-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 id (the job UUID), type (for example, api_job_result), and attributes; attributes.status is a string that can be running, failed, queued, or success, and attributes.result is an array of objects with name and weight when available.

{
  "data": {
    "id": "8b7f3d2e-1c4a-4f9d-9d2f-3b7c7f2f1a11",
    "type": "api_job_result",
    "attributes": {
      "status": "success",
      "result": [
        {
          "name": "Electronics",
          "weight": 0.92
        }
      ]
    }
  }
}
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 product-categories generation job by its job_id. The response returns a JSON object with job metadata under data, including the current job status and, once the job succeeds, the generated result.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesThe job's unique UUID.

Response

Returns a JSON object with a data object field. data contains the job id, type, and an attributes object with status; when the job reaches success, attributes also includes result, an array of objects with name and weight fields.

AttributeTypeMandatoryDescription
dataObjectYesJob metadata wrapper containing the job id, type, and attributes.
data.idStringNoThe job's unique UUID.
data.typeStringNoJob type value. The schema example shows api_job_result.
data.attributesObjectNoJob attributes wrapper containing the current status and, on success, result.
data.attributes.statusENUMNoCurrent status of the asynchronous job. Allowed values: running, failed, queued, success.
data.attributes.resultObject ArrayNoGenerated product categories returned when the job succeeds. Each item contains name and weight.
data.attributes.result[].nameStringNoCategory name.
data.attributes.result[].weightNumberNoCategory 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 field is only populated once status is success, so treat it 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.