Get Started

Headless

Integrate Malachyte with a headless system

This guide is the starting point for integrating Malachyte with a headless or custom-built storefront. It covers what is needed before starting and links to the full API reference for each product.

Overview

Malachyte powers personalized recommendations, search, and product listing pages (PLP) for e-commerce platforms. Malachyte supports both Shopify and custom-built websites.

In a headless setup, the client's storefront calls the Malachyte API directly at runtime. The logic (strategy, rules, filters, ranking) lives in components set up in the Malachyte Portal, so clients can change what shoppers see without changing frontend code.


Before Starting

Requirements:

  • An API key. Every request sends it in the x-api-key header. The client's Malachyte contact provides it.
  • A base URL. It looks like https://api-yoursite.malachyte.com. The client's Malachyte contact provides the exact URL for each store.
  • Component IDs from the Portal. Each recommendation, search, or PLP experience is a component in the Malachyte Portal with its own ID.
  • A visitor_id (UUID). Generate one per shopper session and keep it the same for the whole session. It drives personalization and attribution. If the shopper is logged in, also send their user_id, which stays the same across sessions.

Full authentication details are on each API page below.


API Reference by Product

ProductMain endpointFull reference
RecommendationsPOST /v1/recommendations/componentRecommendations API
SearchPOST /v1/search/componentSearch API
Product Listing Pages (PLP)POST /v1/listing/{category_id}PLP API

Each page covers authentication, request fields, example requests, error responses, and behavior notes for that product.