apyhub
ARTIFICIAL INTELLIGENCE · SMART GENERATION

Generate Product Review Sentiment API

What it does

Review Sentiment Analysis scores product review text and returns the inferred opinion for each submitted job. Send a review in the content field, get back a job_id and status_url, then poll the job status endpoint until processing finishes.

The status response includes a data object with id, type, and attributes. Inside attributes, you can read the job status, the result type, and a result object containing score and opinion when the analysis is available.

Use Review Sentiment Analysis when you need to sort customer feedback into positive or negative buckets, flag reviews for moderation, or feed sentiment signals into reporting dashboards. It fits pipelines that process reviews at scale without requiring you to model the text yourself.

Because the service is asynchronous, it works well for batch submissions and background processing. Submit the text, track the job by UUID, and consume the result only when the status changes to a completed state.

▣ ENDPOINT 01 / 02
POST
Submit Generate Product Review Sentiment job
http://localhost:8080/sharpapi/generate-product-review-sentiment
QUICKSTARTGUIDE

Quickstart

Submit a review text for asynchronous sentiment analysis.

curl -X POST "http://localhost:8080/sharpapi/generate-product-review-sentiment" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"The product arrived quickly and works exactly as expected."}'

What you'll get back

Returns a JSON object with two string fields: job_id is the UUID of the submitted job, and status_url is the URL you can use to check its status.

{
  "status_url": "https://apyhub.com/services/provider/sharpapi/api/v1/ecommerce/review_sentiment/job/status/8b6da84e-2d2e-4cb7-9193-00db6f1557c3",
  "job_id": "8b6da84e-2d2e-4cb7-9193-00db6f1557c3"
}
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*
Provide review text to analyze the sentiment.

About this endpoint

What it does

Submits an asynchronous job to analyze the sentiment of product review text provided in the request body. The response returns the job identifier and a status URL so you can check progress later.

Request Body

ParameterTypeMandatoryDescription
contentStringYesProvide review text to analyze the sentiment.

Response

Returns a JSON object with required job_id and status_url string fields. job_id is the identifier of the submitted asynchronous job, and status_url is the URL used to check the submitted job status.

ParameterTypeMandatoryDescription
job_idStringYesIdentifier of the submitted asynchronous job. UUID format.
status_urlStringYesURL used to check the submitted job status. URI format.

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 identifier from job_id and use the returned status_url to check progress.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
GET
Get Generate Product Review Sentiment job status
http://localhost:8080/sharpapi/generate-product-review-sentiment/job/status/:job_id
QUICKSTARTGUIDE

Quickstart

Check the status of a sentiment-analysis job by its job ID.

curl -X GET "http://localhost:8080/sharpapi/generate-product-review-sentiment/job/status/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. The data object can include id and type strings, plus an attributes object with type, status, and a result object containing score and opinion strings.

{
  "data": {
    "id": "job_123",
    "type": "job",
    "attributes": {
      "type": "sentiment",
      "status": "completed",
      "result": {
        "score": "0.82",
        "opinion": "positive"
      }
    }
  }
}
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

Retrieves the current status of a Generate Product Review Sentiment job by its job_id. On success, it returns a JSON object containing a data object with the job identifier, type, and status information, plus the result payload when available.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesJob identifier in UUID format.

Response

Returns a JSON object with a data object. The data object contains id and type string fields, and an attributes object with type, status, and result fields.

AttributeTypeMandatoryDescription
dataObjectYesResponse wrapper containing the job record.
data.idStringYesJob identifier.
data.typeStringYesJob record type.
data.attributesObjectYesJob attributes, including status and result payload.
data.attributes.typeStringYesAttribute type.
data.attributes.statusStringYesJob status.
data.attributes.resultObjectNoResult payload for the job.
data.attributes.result.scoreStringNoSentiment score.
data.attributes.result.opinionStringNoSentiment opinion.

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.