POST
/
api
/
storefront
/
v3
/
headless
/
recommendations
/
automatic
curl --request POST \
  --url https://storefront.glood.ai/api/storefront/v3/headless/recommendations/automatic \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-shop: <x-shop>' \
  --data '{
  "product_ids": [
    123
  ],
  "recommendation_type": "similar_products",
  "view": "product_details",
  "pagination": {
    "cursor": "<string>",
    "limit": 25
  }
}'
{
  "status": "ok",
  "serve_id": "<string>",
  "pagination": {
    "cursor": "<string>"
  },
  "products": [
    {
      "product_id": 123,
      "title": "<string>",
      "price": 123,
      "tags": "<string>",
      "product_type": "<string>",
      "vendor": "<string>",
      "image": {
        "id": "<string>",
        "url": "<string>",
        "height": 123,
        "width": 123,
        "altText": "<string>"
      },
      "handle": "<string>",
      "compare_at_price": 123,
      "options": [
        {
          "id": 123,
          "name": "<string>",
          "values": [
            "<string>"
          ],
          "position": 123
        }
      ],
      "variants": [
        {
          "variant_id": 123,
          "title": "<string>",
          "display_name": "<string>",
          "position": 123,
          "sku": "<string>",
          "selected_options": [
            {
              "name": "<string>",
              "value": "<string>"
            }
          ],
          "price": "<string>",
          "compare_at_price": "<string>"
        }
      ]
    }
  ]
}

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
product_ids
integer[]
required

List of product IDs to get recommendations for

recommendation_type
enum<string>
required

Type of recommendations to retrieve

Available options:
similar_products
view
enum<string>
required

Context where recommendations will be displayed

Available options:
product_details,
product_ids
pagination
object

Response

200
application/json
Recommendations
status
enum<string>

Status of the response

Available options:
ok
serve_id
string

Unique identifier for this recommendation serve

pagination
object
products
object[]