Skip to content
You're viewing the API v4 documentation, recommended for new integrations.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Size Recommender API

REST API for retrieving AI-powered size recommendations including fit category, confidence score, and customer feedback summary.

The Size Recommender API returns fit guidance for a specific product based on aggregated return data and customer feedback. Use this endpoint to power the Selection Guide UI widget or to build your own custom integration.

For the full OpenAPI specification, see the Size Recommender API Reference.

List Articles

Use GET /v4/size-recommender/articles/?account_id={account_id} to list articles with fit information. No API token is required. The response is a JSON array, not a paginated results object; this endpoint has no cursor parameter.

curl --get 'https://api.parcellab.com/v4/size-recommender/articles/' \
  --data-urlencode 'account_id=1234567'

Example response:

[
  {
    "account_id": 1234567,
    "article_name": "White Cotton Shirt",
    "size_fit_category": "Likely to run small",
    "confidence_smetabase_core": 0.8,
    "smoothed_fit_position": -0.3
  }
]

Each item contains account_id, article_name, size_fit_category, confidence_smetabase_core, and smoothed_fit_position. Image URLs and fit summaries are only in the recommendation response. Use each article_name to request the full recommendation. The list contains articles available to Size Recommender; it is not a complete product-catalog export.

Get a Recommendation

Base URL: https://api.parcellab.com

Path parameters

Parameter
Type
Description

productId

string

The product identifier. This should match the product name or ID used in your order data. URL-encode if it contains special characters.

Query parameters

Parameter
Type
Required
Description

account_id

integer

Yes

Your parcelLab account ID.

Example request

Example response

Response fields

Field
Type
Description

article_name

string

The product identifier as stored in parcelLab.

size_fit_category

string

Human-readable fit label: "Likely to run small", "True to size", "Likely to run large", or "Insufficient data" when confidence is below the account's threshold.

confidence_smetabase_core

number

Confidence score between 0 and 1. Higher values indicate more reliable recommendations.

smoothed_fit_position

number

Normalized fit position on a scale from -1 (runs very small) to +1 (runs very large). A value near 0 indicates a balance between too-small and too-large return reasons; check confidence before interpreting it as true to size. Smoothing moves results with few fit-related returns toward 0.

raw_fit_position

number

Raw (unsmoothed) fit position. Useful for analytics or custom visualizations.

n_outbound

integer

Total number of outbound shipments analyzed for this product.

llm_summary

string

AI-generated plain-language summary of customer feedback about the product's fit.

account_id

integer

The account ID associated with this recommendation.

Fields without a value, such as llm_summary, article_image_url, and problem_descriptions, are omitted from the response. The schema also allows null for these fields, so treat null the same as a missing field.

How Fit Position Is Calculated

The calculation groups historical article data by account and article_name. The configured lookback window and mapped return reasons determine which records contribute. small_returns counts Returns Portal records mapped to the too-small reason; big_returns counts those mapped to the too-large reason.

For 8 too-small returns and 2 too-large returns, the raw value is -0.6 and the smoothed value is -0.3. Negative values indicate more too-small returns; positive values indicate more too-large returns. Smoothing reduces the effect of small samples.

Article eligibility requires fit-related return data and the configured minimum outbound count. Below the account's confidence threshold, size_fit_category is "Insufficient data". Otherwise, a smoothed position of -0.3 or lower is labeled "Likely to run small", 0.3 or higher is labeled "Likely to run large", and values in between are labeled "True to size". A 404 or "Insufficient data" does not establish that a product is true to size. Use size_fit_category and confidence_smetabase_core with the fit position, and use a fallback when data is insufficient.

Error handling

HTTP Status
Meaning
Recommended action

200

Recommendation found.

Display the recommendation.

404

No recommendation available for this product.

Show a fallback or hide the widget. The UI widget handles this automatically via notFoundMode with true-to-size, empty, or hidden.

429

Rate limited.

Retry after the delay indicated in the response headers.

5xx

Server error.

Retry with exponential backoff.

Caching

The UI widget caches responses by accountId + productId combination for the duration of the page session. If you build a custom integration, consider caching responses to avoid unnecessary API calls — recommendation data changes infrequently (typically updated daily).

Authentication

The Size Recommender API is a public, read-only endpoint. No authentication token is required. The account_id query parameter scopes the request to your account's data.

Last updated

Was this helpful?