Service Implementation (API)
Native iOS and Android integration via REST endpoint
1. What it is and when to use it
The Eligibility API checks, in a single call, whether a product supports Virtual Try-On and returns the iframe URL ready to open in a WebView β no need to run JavaScript on the client side.
Use this endpoint in native apps that don't have access to the store's DOM, for example when rendering a product page on iOS or Android.
2. Endpoint
POST https://tryon.internalsizebay.com/api/tryon/eligibility
Required header
Content-Type
application/json
3. Request body
Full example
{
"tenant_id": 6273,
"sid": "user-session-abc123",
"product_data": {
"product_id": "sku-42",
"permalink": "https://yourstore.com/produtos/polo",
"lang": "en",
"title": "Men's Polo Shirt",
"category": "tops",
"description": "Slim fit polo in pima cotton.",
"price": "USD 149.90",
"image_url": "https://cdn.yourstore.com/polo.jpg"
}
}Root fields
tenant_id
number
β
Numeric ID of your Sizebay tenant
sid
string
β
User session identifier (max. 512 chars). Used for analytics inside the modal
product_data
object
β
Product data β see table below
product_data fields
product_id
string
β
256 chars
Unique product identifier in the catalog
permalink
string (URL)
β
2048 chars
Canonical URL of the product page
lang
string (enum)
β
β
Modal language. Example: pt, en, es, it
title
string
β *
512 chars
Product name. Used to infer the category when category isn't sent
category
string
β *
256 chars
Product category. Accepts free text ("tops") or a direct enum ("UPPER_BODY")
description
string
β
2000 chars
Product description
price
string
β
64 chars
Display price, e.g.: "R$ 149,90"
image_url
string (URL)
β
2048 chars
URL of the main product image
4. Responses
200 β Eligible product: open the iframe_url in a WebView
200 β Ineligible product: don't display the Try-On button
400 β Validation error: missing or invalid field
reason codes (ineligible)
reason
Meaning
UNSUPPORTED_CATEGORY
The product category couldn't be mapped to any supported Try-On category
UNKNOWN_TENANT
The provided tenant_id wasn't found or is inactive
5. Supported categories
If your app already has a structured taxonomy, pass the enum directly in category to skip text-based inference.
UPPER_BODY
Tops, t-shirts, blouses, jackets, hoodies, blazers, coats, polos
LOWER_BODY
Pants, jeans, skirts, shorts, leggings, bermudas
FULL_BODY
Dresses, jumpsuits, gowns
FOOTWEAR
Shoes, sneakers, boots, sandals, flip-flops
BAGS
Bags, backpacks, wallets
HEAD
Caps, hats, sunglasses, helmets, earrings, necklaces
6. Integrate into the app (iOS / Android)
When you receive "eligible": true, open the iframe_url in a WebView with camera permission enabled.
Last updated