Create a product
const url = 'https://api.integration.tryonvirtual.com/v1/products';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"example","category":"eyewear","handle":"example","external_id":"example","images":["https://example.com"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.integration.tryonvirtual.com/v1/products \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "category": "eyewear", "handle": "example", "external_id": "example", "images": [ "https://example.com" ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
URL slug. Generated from the title when omitted.
Your own identifier for this product (unique within your shop). Lets you look products up and wire the storefront using ids you already have.
Image URLs to import. Each is downloaded (10s timeout, 15 MB max, must be an image content type). URLs that fail are reported in images_failed without failing the request.
Responses
Section titled “Responses”Product created
object
object
Your own product identifier (SKU, database id…). Set it at create or via PATCH, filter with GET /products?external_id=…, and use it directly in the storefront button/script in place of our id. Read-only for Shopify-platform shops.
Try-on experience. Null when no mode is set yet.
UUID of the active 3D asset (realtime mode only).
True once the product’s images have been processed for AI try-on (processing starts when images are added, typically under a minute). Only show the storefront button when this is true and tryon_status is active.
object
object
Example
{ "product": { "category": "eyewear", "model_type": "realtime", "tryon_status": "active" }}Invalid input
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example" }}