Adding a product picker aggregate using APIs

  • Versão de lançamento: Australia
  • Atualizado 12 de mar. de 2026
  • 1 min. de leitura
  • Follow these steps to add a product picker aggregate using API calls.

    Antes de Iniciar

    Role required: Admin

    Procedimento

    1. Using Postman or another API tool, set the authorization mode to "Bearer token", and provide the token of the environment where you want to create the aggregate.

      In the product picker aggregates area, two endpoints are available in the admin APIs:

      Adding a product picker aggregate using APIs

      The GET endpoint gets the list of all the aggregates that are already available on a product picker. The parameter is the variable name of the product picker field that is passed in the URL in Postman.

      The POST endpoint creates a new aggregate on the product picker. The parameters are the variable name of the product picker field and the request body or payload that gives the details of the aggregates to create.

      Examples of product picker endpoints:

      Adding a product picker aggregate using APIs

    2. Set the following URL as the URL of the Postman API call.
      (This is the URL from the image just above.)

      https://<tenant>.<sector>.logik.io/api/Admin/v1/productPickers/<productPickerName>/aggregateFields

      Replace the URL with the parameters that apply to your environment, including the sector name and the variable name of the product picker from the UI.
    3. Send the call.
      This returns a list of aggregates already applied in the UI. You can copy any of the responses for a particular aggregate entry to set the request body for the post method in the next step meant to create a new aggregate. If there are no preconfigured aggregates, you can take the sample request code directly from the API documentation.
    4. Change GET to POST, copy the body of the request from the previous steps, and replace the body with the new aggregate details, including the field variable name and the aggregate type.
      You can add only one field per API call.
    5. Send the call.
      The response includes an aggregate ID that indicates that the aggregate is successfully created.

    Resultado

    In the UI, refresh the page to see the added aggregate.

    Adding a product picker aggregate using APIs