Product record
Each product needs:- A stable external product ID.
- A title.
- At least one publicly accessible product image URL.
- A handle when URL matching uses handles.
enabled: truebefore it may appear on the storefront.
Product IDs and handles are identifiers, not display text. Keep them stable and send updates under the same product ID.
Import a CSV
In virtual.fit, open Custom JS → Sync Products and download the CSV template.CSV columns
| Column | Required | Description |
|---|---|---|
product_id | Yes | Stable identifier used for upserts and optional URL matching. |
title | Yes | Merchant-facing product title. |
product_image_url or product_image_urls | Yes | One URL, or multiple URLs separated by |. |
handle | When matching by handle | URL-safe storefront handle or slug. |
preview_image_url | No | Thumbnail shown in virtual.fit. |
enabled | No | true by default. Accepts true/false, 1/0, yes/no, or y/n. |
product_id. Importing the same ID updates the existing product.
Push from your backend
Use the management API from a trusted server:$VIRTUAL_FIT_API_BASE, $SITE_ID, and $VIRTUAL_FIT_API_KEY with values from your account and server environment.
Upsert behavior
- The
product_idin the URL is the idempotency key. - Sending an existing product ID updates its record.
titleand at least one product image URL are required.- Sending
product_image_urlsreplaces the linked image URL set for that product. enableddefaults totruewhen omitted on a new record.handleandpreview_image_urlare optional but recommended.
Image requirements
Product image URLs must be reachable by virtual.fit without shopper cookies, expiring browser sessions, or IP-bound authorization. Use:- HTTPS URLs.
- Stable CDN paths.
- High-resolution JPEG, PNG, or WebP images.
- Images that show one garment clearly.
Recommended sync strategy
Upsert changed records
Send a product when its title, handle, images, or eligibility changes. Reusing the product ID keeps the operation idempotent.
Disable before deleting
Send
enabled: false when a product should stop appearing. This removes storefront eligibility without losing diagnostic history.Common sync failures
| Failure | Fix |
|---|---|
| Missing required values | Include product_id, title, and at least one image URL. |
| Image analysis never completes | Confirm the image URL is publicly reachable and returns an image content type. |
| URL tester finds no product | Align the URL-derived value with handle or product_id. |
| Unexpected image set after update | Send the complete intended product_image_urls array, not only the new image. |