Skip to main content
POST

Attribute orders

A successful response includes an attribution array. Copy each { key, value } onto the shopper’s Shopify cart, either as cart attributes or as line-item properties on the items they visualized. Orders carrying these attributes count toward Hemsy revenue in the dashboard’s Analytics page, and the _hemsy_request_id value links the order back to this visualization.
Pass Shopify variantId or productId values in the request (rather than raw image URLs) so the visualization also appears in the store’s Top Products.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
userPhoto
string
required

Public URL or base64 data URL of the user image.

products
(Variant ID · object | Images · object)[]
required
Minimum array length: 1

For each product, choose one option: variantId or images.

Response

200 - application/json

Successful visualization

image
string
attribution
object[]

Attributes to copy onto the shopper's Shopify cart (cart or line-item level) so the resulting order is attributed to this visualization in the dashboard's Analytics page. Underscore-prefixed keys are hidden from shoppers.

code
string
error
string
message
string