Frequently bought together products
POST https://{{subdomain}}.commercelayer.io/metrics/analysis/fbt
The problem
You want to get the list of products that, over your order history, have been added as line items to the same orders as two specific other products (SKUs or bundles).
The solution
Filter
You need to perform an FBT query setting the required filter on the line items field to specify the array containing the IDs of the two products with which you're searching the correlation:
Attribute | Operator |
---|---|
item_ids | in: [ BmDzSVkXAW, ZrxeSRgOmB ] |
Request Body
{"filter"=>{"line_items"=>{"item_ids"=>{"in"=>["{{item_1}}", "{{item_2}}"]}}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string | ||
Content-Type | string |