A relationship is a typed, one-way link from one product to another: “this tent’s accessory is that footprint”, “this model replaces that one”. Storefronts read them to build “you might also like” rails, upgrade prompts and bundle listings.
In the admin
The admin doesn’t have a screen for relationships yet. You create, list and delete them through the API, the TypeScript SDK or your own tooling. The MCP server’s product read includes a product’s relationships.
With the API
| Method | Path | What it does |
|---|---|---|
| GET | /v1/products/{id}/relationships | List a product’s relationships |
| POST | /v1/products/{id}/relationships | Create a relationship from this product |
| DELETE | /v1/relationships/{id} | Delete one relationship by its own id |
Create one:
curl -X POST https://api.minipim.com/v1/products/PRODUCT_ID/relationships \
-H 'Authorization: Bearer pim_…' -H 'Content-Type: application/json' \
-d '{ "targetProductId": "TARGET_ID", "type": "accessory", "position": 0 }'
Read them with the SDK:
const { data } = await pim.GET('/v1/products/{id}/relationships', {
params: { path: { id: productId }, query: { type: 'cross_sell' } },
});
Query parameters on the list endpoint:
type: only return one relationship type.direction:outbound(default) returns links where this product is the source.inboundreturns links pointing at it.bothreturns both.
Each row has sourceProductId, targetProductId, type, position and metadata, and the list is ordered by position. Full reference: api.minipim.com/docs.
Relationship types
| Type | Typical use |
|---|---|
cross_sell | Complementary items shown alongside |
up_sell | A higher-end alternative |
related | General “see also” |
accessory | Add-ons for this product |
replacement | A successor or substitute |
bundle_component | A part of a bundle. Put the count in metadata, e.g. { "quantity": 2 } |
Rules and limits
- Relationships are one-way. To make two products point at each other, create two relationships. To find links pointing at a product, use
direction=inbound. - A product can’t relate to itself (422). The target has to be a product in the same organization (404 otherwise).
- There’s no update endpoint. To change a link’s type, position or metadata, delete it and create it again.
- minipim doesn’t stop you from creating the same source, target and type twice. Check before you create if your tooling can retry.
positiondefaults to0. Set it yourself if you want a fixed order.metadatais a free-form object. minipim only stores it.- Deleting either product deletes its relationships.
- Duplicating a product copies its outbound relationships but not the inbound ones.
- Creating and deleting emit
product_relationship.createdandproduct_relationship.deleted, which you can subscribe to with webhooks. - The BigCommerce and Shopify connectors don’t import related products.
See also
- Products — How minipim products work: family, slug, attribute payload and tags, plus creating, editing, duplicating and deleting them in the admin or via the API.
- Modifiers — Modifiers are order-line options such as engraving or gift wrap that don't create SKUs. Learn the 7 types, choice price changes, and how to attach them.
- Webhooks — Send signed minipim catalog events to your storefront: install the Headless connector, choose event groups, verify signatures, and debug deliveries.
- REST API basics — Base URL, authentication, JSON conventions, IDs, money and dates for the minipim /v1 REST API, plus where to find the live OpenAPI reference.