---
title: "Optimise products by page"
method: POST
path: "/v2/user/analytics/{storeId}/optimisations/{actionName}"
tags: ["Analytics - Optimisations"]
---

# Optimise products by page

`POST /v2/user/analytics/{storeId}/optimisations/{actionName}`

/!\ WARNING /!\ \
Apply the operation on every product related to this request. \
This operation is used at the bottom of the analytics page result.

## Path parameters

- `storeId` string, guid, required
- `actionName` 'reenable' | 'disable', optimisationActionName, required

## Request body

- OptimiseRequest — Contains common filter parameters
  - `channelId` string, guid — The channel identifier
  - `periodType` 'Custom' | 'Yesterday' | 'Last7Days' | 'LastWeek' | 'ThisMonth' | 'Last30Days' | 'LastMonth' | 'Last60Days' | 'Last90Days' | 'Last3Months', required — Indicates the period type we want use for the report filter
  - `beginPeriodUtcDate` string, date-time, required — The begin date period you want to get the report. It's required only in case of custom period type !
  - `endPeriodUtcDate` string, date-time, required — The end date period you want to get the report. It's required only in case of custom period type !
  - `categoryFilter` BeezUPCommonCatalogCategoryFilter
    - `categoryPath` string[] — Indicates on which catalog category path you want to make the filter
  - `performanceIndicatorFilters` PerformanceIndicatorFilter[]
    - `performanceIndicator` 'ClickCount' | 'Cost' | 'OrderCount' | 'ProductCount' | 'SoldProductCount' | 'DisabledProductCount' | 'EnabledProductCount' | 'TotalSales' | 'Margin' | 'ROI' | 'PerformanceIndicator', required — Indicate on which indicator or value you want to make your formula
    - `operatorName` string, required — Indicates the operator you want to apply on this indicator
    - `value` number, required — Indicates the filter value to apply on this indicator
  - `advancedFilters` ReportAdvancedFilters, required
    - `marginType` 'Tracker' | 'Global', required
    - `globalMarginPercent` integer — If the margin type is 'Global', indicate the percentage of sale price.
    - `linkClickToOrderType` 'OnPurchaseDate' | 'OnClickDate', required
    - `linkClickToOrderMaxDay` integer — If the linkOrderType is OnClickDate, indicate the max day to search the click from the order
    - `onlyPaymentValidatedOrders` boolean, required — If true, you will get the only the orders with payment validated. Otherwise, you will get all orders validated or not.
    - `onlyDirectSales` boolean, required — If true, you will get only direct sales. Otherwise the indirect sales will be included.
    - `performanceIndicatorFormula` PerformanceIndicatorFormula, required — The KPI formula
      - `firstParameter` 'Cost' | 'TotalSales' | 'Margin' | 'TotalSalesMinusCost' | 'MarginMinusCost' | 'OrderCount' | 'ClickCount' | 'SoldProductCount' | 'One' — Indicate on which indicator or value you want to make your formula
      - `operatorName` 'Multiply' | 'Divide'
      - `secondParameter` 'Cost' | 'TotalSales' | 'Margin' | 'TotalSalesMinusCost' | 'MarginMinusCost' | 'OrderCount' | 'ClickCount' | 'SoldProductCount' | 'One' — Indicate on which indicator or value you want to make your formula
      - `thirdParameter` integer — Indicate the value of the third parameter of your formula
  - `orderBy` 'ClickCount' | 'Cost' | 'OrderCount' | 'ProductCount' | 'SoldProductCount' | 'DisabledProductCount' | 'EnabledProductCount' | 'TotalSales' | 'Margin' | 'ROI' | 'PerformanceIndicator' — Indicate on which indicator or value you want to make your formula
  - `orderByDirection` 'Ascending' | 'Descending' — Indicate which direction to order results by
  - `reportType` 'ByChannel' | 'ByCategory' | 'ByProduct' | 'ByDay', required — The report type
  - `productColumnsToDisplay` BeezUPCommonCatalogColumnId[]
  - `productState` 'All' | 'Enabled' | 'Disabled' — You can filter on the product state.
  - `analyticsProductColumnFilters` AnalyticsProductColumnFilters
    - `sku` string — The product sku filter
    - `title` string — The product title filter
    - `additionalAnalyticsProductColumnFilters` AdditionalAnalyticsProductColumnFilters — Describes a filter on a product's column. The key is the column identifier of your catalog or a custom column.
  - `pageSize` integer — Indicate the item count per page
  - `pageNumber` integer — Indicates the page number

## Response `204`

Products optimisatized

## Other responses

- `400` — Invalid request
- `404` — Store or resource not found
- `default` — Occurs when something goes wrong

---

[API](https://skmtc.net/beezup/apis/beezup-merchant-api.md) · [All operations](https://skmtc.net/beezup/apis/beezup-merchant-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/beezup/beezup-merchant-api/revisions/557b7feddf8a/schema)
