Skip to content

Is "See it on you" available for a product?

GET
/v1/products/{product}/tryon
curl --request GET \
--url https://api.tryyoursize.com/v1/products/example/tryon \
--header 'TYS-Publishable-Key: <TYS-Publishable-Key>'

Key: publishable (pk_test_… / pk_live_…), from an origin registered for the key.

Used by the inline element, the size-guide button and the window to decide whether to offer the try-on. Called from the brand’s page (an allowed origin of the store) or from the window. sizes are the garment’s sizes as entered in Studio; shop_sizes are the store’s own labels for them (the product’s size map, e.g. “M” → “Medium”), so the page can preselect its own variant.

product
required
string
>= 1 characters <= 120 characters

The product’s SKU / style ID in the store.

Availability (never 404 for an unknown product, available is false)

Media typeapplication/json

Whether the store offers “See it on you” for a product. available is false when the store has no published garment for that product (SKU), or its category cannot be simulated yet; the other fields are then omitted.

object
available
required
boolean
product

The product’s SKU / style ID, as given.

string
garment_name
string
category

The garment type; it sets which POMs are needed.

string
Allowed values: tshirt shirt sweater jacket dress skirt jeans trousers shorts leggings polo hoodie
sizes

The garment’s size labels as entered in Studio, smallest to largest. Try-on results and summary.recommended_size use these.

Array<string>
shop_sizes

The store’s own label for each entry of sizes, same order (the product’s size map, e.g. “M” → “Medium”; the Studio label where the map has no entry).

Array<string>
garment_version_id
string format: uuid

Example

{
"category": "tshirt"
}

Missing or invalid credentials

Media typeapplication/json

Every error has this shape. error is a human-readable message, status the HTTP status. code is stable and machine-readable; doc_url links its explanation; request_id identifies the request (also in the X-Request-ID response header): quote it to support.

object
error
required
string
status
required
integer
code

Stable error code, e.g. invalid_request, unauthorized, reauth_required, payment_required, forbidden, not_found, conflict, unprocessable, rate_limited, internal_error, not_implemented, unavailable, invalid_api_version, idempotency_key_in_use, idempotency_key_reused, invalid_idempotency_key, handle_expired, handle_invalid.

string
doc_url
string format: uri
request_id
string

Example

{
"code": "not_found",
"doc_url": "https://docs.tryyoursize.com/api/errors/#not_found"
}

Not allowed

Media typeapplication/json

Every error has this shape. error is a human-readable message, status the HTTP status. code is stable and machine-readable; doc_url links its explanation; request_id identifies the request (also in the X-Request-ID response header): quote it to support.

object
error
required
string
status
required
integer
code

Stable error code, e.g. invalid_request, unauthorized, reauth_required, payment_required, forbidden, not_found, conflict, unprocessable, rate_limited, internal_error, not_implemented, unavailable, invalid_api_version, idempotency_key_in_use, idempotency_key_reused, invalid_idempotency_key, handle_expired, handle_invalid.

string
doc_url
string format: uri
request_id
string

Example

{
"code": "not_found",
"doc_url": "https://docs.tryyoursize.com/api/errors/#not_found"
}

Was this page helpful?