Skip to main content

Relations

Relations let you connect products to one another (e.g. matching accessories, compatible spare parts, recommended alternatives) and resolve those connections at query time. Relations are configured in the Data Platform under Relations (Data Platform → Relations).

The following endpoints accept relations parameters:

You can resolve relations in two ways:

  • By relation id — use includeRelations. Targets one specific relation.
  • By tag — use includeTags. Targets every relation that shares the same tag. In the Data Platform UI the tag is shown as the Relation Type column.

Finding relation tags and ids

Open the Relations table in the Data Platform. Each row represents one relation:

  • The tag is shown in the Relation Type column.
  • The relation id is copied via the three-dot context menu next to the row.

Copy relation id from the three-dot menu in the Relations table

includeRelations

includeRelations is a JSON array of objects, each with a relation id and a limit that caps how many related products are returned for that relation:

[{"id":6548, "limit":5}, {"id":9878, "limit":5}]

Use this when you know exactly which relation(s) you want to resolve. Supported by Get related products and Get related products (bulk).

includeTags

includeTags is a JSON array of objects, each with a tag (the Relation Type) and an optional limitPerRelation that caps how many products are returned for each matched relation:

[{"tag":"Compatible", "limitPerRelation":4}]

Use this when you want every relation with a matching tag. Each product in the response includes a relationTypes.tags array with the matching relations. Supported by all four endpoints listed above.

On GET endpoints (Get related products, Get related products (bulk), Search products and content (GET)) the JSON value must be URL-encoded when used as a query string.

To keep query strings under common URL length limits:

  • includeRelations: up to 30 per request
  • includeTags: up to 30 per request
  • identifiers on Get related products (bulk): up to 100, hard limit 1 000 (requests with more than 1 000 identifiers are rejected with 400 Bad Request)

Larger requests may exceed URL length limits and fail. Split into multiple requests if needed.