> ## 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.

# Create a smart listing

> Creates a new smart listing with the specified rules for filtering product variants



## OpenAPI

````yaml /swagger/management-api.json post /api/v1/{team_slug}/{app_slug}/smart-listings
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:
    post:
      tags:
        - Smart Listings
      summary: Create a smart listing
      description: >-
        Creates a new smart listing with the specified rules for filtering
        product variants
      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: smart-listing created successfully
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/internal_pkg_webserver_v1.SmartListingResponse
        '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.SmartListingResponse:
      properties:
        data:
          $ref: >-
            #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.SmartListing
        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.SmartListing:
      properties:
        created_at:
          type: string
        id:
          type: string
        rules:
          items:
            $ref: >-
              #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.ListingRule
          type: array
        slug:
          type: string
        updated_at:
          type: string
      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.ListingRule:
      properties:
        id:
          type: string
        operator:
          $ref: >-
            #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.ListingRuleOperator
        target:
          $ref: >-
            #/components/schemas/github_com_enadhq_nabbit_internal_pkg_webserver_models.ListingRuleTarget
        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.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

````