> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enad.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview smart listing results

> Returns all product variants that match the specified listing rules without creating a listing



## OpenAPI

````yaml /swagger/management-api.json post /api/v1/{team_slug}/{app_slug}/smart-listings/preview
openapi: 3.0.0
info:
  contact:
    email: support@enad.io
    name: API support
    url: http://enad.io/support
  description: This is the documentation for Public API v1
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://enad.io/terms/
  title: Public API
  version: '1.0'
servers:
  - url: //api.enad.io
security: []
paths:
  /api/v1/{team_slug}/{app_slug}/smart-listings/preview:
    post:
      tags:
        - Smart Listings
      summary: Preview smart listing results
      description: >-
        Returns all product variants that match the specified listing rules
        without creating a listing
      parameters:
        - description: App slug
          in: path
          name: app_slug
          required: true
          schema:
            type: string
        - description: Team slug
          in: path
          name: team_slug
          required: true
          schema:
            type: string
      requestBody:
        $ref: >-
          #/components/requestBodies/internal_pkg_webserver_v1.SmartListingRequest
      responses:
        '200':
          description: All product-variants affected by the listing rules
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/internal_pkg_webserver_v1.SmartListingProductsResponse
        '400':
          description: Invalid request (e.g. bad UUID, validation error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_pkg_webserver_v1.ErrorMessage'
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_pkg_webserver_v1.ErrorMessage'
        '422':
          description: Invalid request and not parsable by backend
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_pkg_webserver_v1.ErrorMessage'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_pkg_webserver_v1.ErrorMessage'
      security:
        - BearerAuth: []
components:
  requestBodies:
    internal_pkg_webserver_v1.SmartListingRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/internal_pkg_webserver_v1.SmartListingRequest'
      description: smart-listing configuration
      required: true
  schemas:
    internal_pkg_webserver_v1.SmartListingProductsResponse:
      properties:
        data:
          items:
            $ref: >-
              #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.ListingProductVariant
          type: array
        details:
          description: >-
            Additional contextual information about the response. Used to
            provide supplementary details beyond the main data payload, such as
            validation warnings or processing notes
          items:
            type: string
          type: array
        success:
          type: boolean
      type: object
    internal_pkg_webserver_v1.ErrorMessage:
      properties:
        details:
          items:
            type: string
          type: array
        message:
          type: string
        success:
          type: boolean
      type: object
    internal_pkg_webserver_v1.SmartListingRequest:
      properties:
        rules:
          items:
            $ref: '#/components/schemas/internal_pkg_webserver_v1.ListingRuleRequest'
          type: array
        slug:
          type: string
      required:
        - rules
        - slug
      type: object
    github_com_enadhq_nabbit_internal_pkg_webserver_models.ListingProductVariant:
      properties:
        app_id:
          type: string
        attributes:
          items:
            $ref: >-
              #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.ProductListingAttribute
          type: array
        category_slugs:
          items:
            type: string
          type: array
        custom_fields:
          additionalProperties:
            type: string
          type: object
        id:
          type: string
        image_urls:
          items:
            type: string
          type: array
        prices:
          items:
            $ref: >-
              #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.Price
          type: array
        product_id:
          type: string
        product_name:
          type: string
        total_stock:
          type: integer
        variant_name:
          type: string
        variant_number:
          type: string
        warehouse_stocks:
          items:
            $ref: >-
              #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.WarehouseStock
          type: array
      type: object
    internal_pkg_webserver_v1.ListingRuleRequest:
      properties:
        operator:
          allOf:
            - $ref: >-
                #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.ListingRuleOperator
          enum:
            - equal
            - not-equal
            - greater-than
            - less-than
            - contains
        target:
          allOf:
            - $ref: >-
                #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.ListingRuleTarget
          enum:
            - stock
            - price
            - attribute
            - title
            - category
        target_id:
          description: used for warehouse stock validation
          type: string
        value_float:
          type: number
        value_list:
          items:
            type: string
          type: array
        value_string:
          type: string
      required:
        - operator
        - target
      type: object
    github_com_enadhq_nabbit_internal_pkg_webserver_models.ProductListingAttribute:
      properties:
        template_id:
          type: string
        template_name:
          type: string
        values:
          items:
            type: string
          type: array
      type: object
    github_com_enadhq_nabbit_internal_pkg_webserver_models.Price:
      properties:
        amount:
          type: number
        currency:
          type: string
        on_sale:
          type: boolean
      type: object
    github_com_enadhq_nabbit_internal_pkg_webserver_models.WarehouseStock:
      properties:
        stock:
          type: integer
        warehouse_id:
          type: string
      type: object
    github_com_enadhq_nabbit_internal_pkg_webserver_models.ListingRuleOperator:
      enum:
        - less-than
        - greater-than
        - equal
        - not-equal
        - contains
      type: string
      x-enum-varnames:
        - OperatorLessThan
        - OperatorGreaterThan
        - OperatorEqual
        - OperatorNotEqual
        - OperatorContains
    github_com_enadhq_nabbit_internal_pkg_webserver_models.ListingRuleTarget:
      enum:
        - stock
        - price
        - title
        - attribute
        - category
      type: string
      x-enum-varnames:
        - TargetStock
        - TargetPrice
        - TargetTitle
        - TargetAttribute
        - TargetCategory

````