Is "See it on you" available for a product?
const url = 'https://api.tryyoursize.com/v1/products/example/tryon';const options = {method: 'GET', headers: {'TYS-Publishable-Key': '<TYS-Publishable-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The product’s SKU / style ID in the store.
Responses
Section titled “Responses”Availability (never 404 for an unknown product, available is false)
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
The product’s SKU / style ID, as given.
The garment type; it sets which POMs are needed.
The garment’s size labels as entered in Studio, smallest to largest. Try-on results and summary.recommended_size use these.
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).
Example
{ "category": "tshirt"}Missing or invalid credentials
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
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.
Example
{ "code": "not_found", "doc_url": "https://docs.tryyoursize.com/api/errors/#not_found"}Not allowed
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
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.
Example
{ "code": "not_found", "doc_url": "https://docs.tryyoursize.com/api/errors/#not_found"}Was this page helpful?
Thank you. We read every answer.