Skip to main content
POST

Identifying the shopper

Every identity field is optional. Send whichever ones your storefront has, and Glood resolves them to a single visitor profile: email and phone exist for storefronts that never see a Shopify customer_id. They identify the same shopper profile a customer_id would, so recommendations are personalized identically either way.
Send every identifier you have, not just one. A shopper often has both an anonymous browsing profile (under client_id) and an identified one (under customer_id or email). Passing both lets Glood pick whichever holds the richer browsing history.
Matching ignores formatting, so you do not need to normalize before sending:
  • email — case and surrounding whitespace are ignored (" Shopper@Example.com " matches shopper@example.com)
  • phone — punctuation and spacing are ignored (+1 (555) 010-9999 matches +15550109999)
Sending no identifier at all is valid. You get the same recommendations, just without personalization — no error. An unrecognized email or phone behaves the same way.

How personalization works

When a request identifies a shopper with browsing history, results are ranked using that history in addition to the products in product_ids:
  • similar_products — stays anchored to the products you asked about; browsing history refines the ordering rather than replacing it.
  • bought_together — the same blend, applied to co-purchase candidates.
Only browsing history is used. Purchase and cart history do not affect ranking. To override the automatic behaviour, set ranking_criteria on an individual query — for example bestsellers or new_arrivals. Leaving it unset is recommended.
Personalization improves as browsing data accumulates. A shopper Glood has not seen before receives standard relevance-ranked recommendations.

Authorizations

Authorization
string
header
required

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

Headers

x-shop
string
required

Shopify store URL

Example:

"shop.myshopify.com"

Body

application/json

Request body

queries
object[]
required
client_id
string

Client identifier (Shopify _shopify_y device cookie). Optional.

user_id
string

User identifier generated by Glood. Optional.

customer_id
string

Shopify customer ID for a logged-in shopper. Optional.

email
string

Shopper email address. Use this when your storefront has no access to a Shopify customer_id — it resolves to the same visitor profile. Case and surrounding whitespace are ignored. Optional.

Example:

"shopper@example.com"

phone
string

Shopper phone number. Alternative to customer_id, with the same behaviour as email. Formatting is ignored, so +1 (555) 010-9999 and +15550109999 are equivalent. Optional.

Example:

"+15550109999"

publicationIds
(string | integer)[]

Optional. Numeric Shopify publication (sales channel) ids. When present, only products published on at least one of these channels are returned and the default "published to the Online Store" gate is replaced by this filter; market and B2B filters still apply. A single id may be sent without the array wrapper. Each id must be one the merchant enabled under Settings → Sales channels; unknown ids return 400. The id is the numeric tail of gid://shopify/Publication/.

Maximum array length: 50
Pattern: ^[0-9]+$
Example:

Response

Recommendations response

status
enum<string>
required

Response status

Available options:
ok
serve_id
string<uuid>
required

Unique identifier for this recommendation serve request

data
object
required

Recommendation results keyed by query ID