curl -X POST "https://api.genlook.app/storefront/v1/try-ons/gen_xyz789abc/share" \
-H "Authorization: Bearer pk_your_key_here" \
-H "X-Genlook-Anonymous-Id: anon_..." \
-H "Content-Type: application/json" \
-d '{
"effectiveDomain": "yourstore.com",
"productUrl": "https://yourstore.com/products/blue-shirt"
}'
const response = await fetch(`https://api.genlook.app/storefront/v1/try-ons/${jobId}/share`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${PUBLISHABLE_KEY}`,
'X-Genlook-Anonymous-Id': anonymousId,
'Content-Type': 'application/json',
},
body: JSON.stringify({
effectiveDomain: 'yourstore.com',
productUrl: 'https://yourstore.com/products/blue-shirt',
})
});
const result = await response.json();
{
"shareToken": "abc123xyz789",
"shareUrl": "https://genlook.app/s/abc123xyz789",
"expiresAt": "2024-02-15T10:30:00Z"
}
Storefront API reference
Share Try-On
Create a shareable link for a virtual try-on result
POST
/
storefront
/
v1
/
try-ons
/
{id}
/
share
curl -X POST "https://api.genlook.app/storefront/v1/try-ons/gen_xyz789abc/share" \
-H "Authorization: Bearer pk_your_key_here" \
-H "X-Genlook-Anonymous-Id: anon_..." \
-H "Content-Type: application/json" \
-d '{
"effectiveDomain": "yourstore.com",
"productUrl": "https://yourstore.com/products/blue-shirt"
}'
const response = await fetch(`https://api.genlook.app/storefront/v1/try-ons/${jobId}/share`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${PUBLISHABLE_KEY}`,
'X-Genlook-Anonymous-Id': anonymousId,
'Content-Type': 'application/json',
},
body: JSON.stringify({
effectiveDomain: 'yourstore.com',
productUrl: 'https://yourstore.com/products/blue-shirt',
})
});
const result = await response.json();
{
"shareToken": "abc123xyz789",
"shareUrl": "https://genlook.app/s/abc123xyz789",
"expiresAt": "2024-02-15T10:30:00Z"
}
Create a public share link for a completed try-on. Links include Open Graph and Twitter Card metadata for rich social previews. Links expire after 7 days.
With the SDK:
On JavaScript, the
@genlook/storefront SDK is the recommended integration: it calls this endpoint for you, along with the rest of the try-on flow.SDK
const url = await genlook.getShareUrl(entryId);
Request
string
required
A try-on ID with status
COMPLETED.string
The customer-facing domain (e.g.
yourstore.com). Defaults to the Shopify store domain.string
Absolute product page URL captured from the storefront at share time (e.g.
https://yourstore.com/products/blue-shirt). Used by the public share page product CTA.curl -X POST "https://api.genlook.app/storefront/v1/try-ons/gen_xyz789abc/share" \
-H "Authorization: Bearer pk_your_key_here" \
-H "X-Genlook-Anonymous-Id: anon_..." \
-H "Content-Type: application/json" \
-d '{
"effectiveDomain": "yourstore.com",
"productUrl": "https://yourstore.com/products/blue-shirt"
}'
const response = await fetch(`https://api.genlook.app/storefront/v1/try-ons/${jobId}/share`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${PUBLISHABLE_KEY}`,
'X-Genlook-Anonymous-Id': anonymousId,
'Content-Type': 'application/json',
},
body: JSON.stringify({
effectiveDomain: 'yourstore.com',
productUrl: 'https://yourstore.com/products/blue-shirt',
})
});
const result = await response.json();
Response
string
required
Unique token for the share link.
string
required
Complete shareable URL.
string
required
ISO 8601 expiration timestamp.
{
"shareToken": "abc123xyz789",
"shareUrl": "https://genlook.app/s/abc123xyz789",
"expiresAt": "2024-02-15T10:30:00Z"
}
Cache the
shareUrl. If a share link already exists for a try-on, reuse it instead of creating a new one.Get a shared try-on
GET /storefront/v1/shares/{token} (public, no auth) returns the try-on image and metadata for the share landing page at https://genlook.app/s/{token}.
string
required
The try-on ID backing the share link.
string
required
URL of the try-on image shown on the share page.
string
required
The Shopify store domain that owns the try-on.
string
required
ISO 8601 timestamp for when the share link was created.
string
required
ISO 8601 expiration timestamp. Share links expire after 7 days.
string
Product page URL for the share page “Shop this look” CTA. Prefer the URL sent at share creation; falls back to the persisted store product URL when absent.
string
External product GID (e.g.
gid://shopify/Product/123).string
Product title shown on the share page.
string
Customer-facing domain captured when the share link was created.
Was this page helpful?

