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

# Create a catalog selection

> Create a selection using filters, sort order, and a result limit.



## OpenAPI

````yaml /en/api-reference/openapi.yaml post /v1/projects/{projectId}/catalogs/{catalogName}/selections
openapi: 3.0.3
info:
  title: Notifly API
  version: 1.0.0
  contact:
    email: contact@notifly.tech
servers:
  - url: https://api.notifly.tech
    description: Notifly API server
security: []
tags:
  - name: catalog
    x-group: Catalogs
paths:
  /v1/projects/{projectId}/catalogs/{catalogName}/selections:
    parameters:
      - $ref: '#/components/parameters/ProjectId'
      - name: catalogName
        in: path
        description: Unique name supplied when the catalog was created.
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          maxLength: 250
    post:
      tags:
        - catalog
      summary: create-api-catalog-selection
      description: Create a selection using filters, sort order, and a result limit.
      operationId: createApiCatalogSelection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CatalogSelectionCreateRequest'
      responses:
        '200':
          description: Completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogEmptyResponse'
        '400':
          $ref: '#/components/responses/CatalogBadRequest'
        '401':
          $ref: '#/components/responses/CatalogUnauthenticated'
        '403':
          $ref: '#/components/responses/CatalogPermissionDenied'
        '404':
          $ref: '#/components/responses/CatalogNotFound'
        '409':
          $ref: '#/components/responses/CatalogConflict'
        '413':
          $ref: '#/components/responses/CatalogPayloadTooLarge'
        '500':
          $ref: '#/components/responses/CatalogInternalServerError'
      security:
        - bearerAuth: []
components:
  parameters:
    ProjectId:
      name: projectId
      in: path
      description: Notifly project ID.
      required: true
      schema:
        type: string
        pattern: ^[a-f0-9]{32}$
        minLength: 32
        maxLength: 32
  schemas:
    CatalogSelectionCreateRequest:
      type: object
      additionalProperties: false
      required:
        - selection
      properties:
        selection:
          $ref: '#/components/schemas/CatalogSelection'
      example:
        selection:
          name: sale-products
          description: 할인 상품
          filters:
            - field: price
              operator: less than
              value: 50000
          results_limit: 10
          sort_field: price
          sort_order: asc
    CatalogEmptyResponse:
      type: object
      required:
        - data
        - error
      properties:
        data:
          nullable: true
          enum:
            - null
        error:
          nullable: true
          enum:
            - null
      example:
        data: null
        error: null
    CatalogSelection:
      type: object
      additionalProperties: false
      required:
        - name
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 250
          pattern: \S
        description:
          type: string
          maxLength: 250
        filters:
          type: array
          maxItems: 4
          items:
            $ref: '#/components/schemas/CatalogSelectionFilter'
        results_limit:
          type: integer
          minimum: 1
          maximum: 50
          default: 50
          description: The default is 50.
        sort_field:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          maxLength: 250
        sort_order:
          type: string
          enum:
            - asc
            - desc
      oneOf:
        - not:
            anyOf:
              - required:
                  - sort_field
              - required:
                  - sort_order
        - required:
            - sort_field
            - sort_order
    CatalogApiErrorResponse:
      type: object
      required:
        - data
        - error
      properties:
        data:
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/CatalogApiError'
      example:
        data: null
        error:
          code: INVALID_ARGUMENT
          message: Invalid bulk item request.
          details:
            - field: items[0].unknown_field
              path:
                - items
                - 0
                - unknown_field
              code: invalid-fields
              message: 'Unrecognized field: unknown_field.'
    CatalogSelectionFilter:
      type: object
      description: >-
        Operators depend on the field type. Use `equals` or `does not equal` for
        `string`. Add `greater than` and `less than` for `number`. Use `is` for
        `boolean`, `before` or `after` for `time`, and `includes value` or `does
        not include value` for `array`. Filters are unavailable for `geo` and
        `object`. Use a non-null `value`.
      additionalProperties: false
      required:
        - field
        - operator
        - value
      properties:
        field:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          maxLength: 250
        operator:
          type: string
          enum:
            - equals
            - does not equal
            - greater than
            - less than
            - is
            - before
            - after
            - includes value
            - does not include value
        value:
          description: >-
            Use a non-null `string`, `number`, or `boolean` value as required by
            the field type and operator.
          oneOf:
            - type: string
              maxLength: 5000
            - type: number
            - type: boolean
    CatalogApiError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: array
          description: >-
            Identifies fields and paths where validation failed. Use these
            structured fields in clients.
          items:
            $ref: '#/components/schemas/CatalogApiValidationErrorDetail'
      additionalProperties: true
    CatalogApiValidationErrorDetail:
      type: object
      description: >-
        One validation error. The `field` value is a human-readable path with
        dots and brackets. The `path` value represents the same location as an
        array of strings and numbers.
      required:
        - field
        - path
        - code
        - message
      properties:
        field:
          type: string
          description: >-
            Field path in dot and bracket notation, for example
            `items[0].price`.
        path:
          type: array
          description: Field path as an array of string and number segments.
          items:
            anyOf:
              - type: string
              - type: integer
        code:
          type: string
          description: Code that identifies why the input was rejected.
        message:
          type: string
          description: Human-readable validation error message.
      additionalProperties: false
  responses:
    CatalogBadRequest:
      description: Invalid Catalog request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogUnauthenticated:
      description: Authentication required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogPermissionDenied:
      description: Project access denied.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogNotFound:
      description: Catalog resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogConflict:
      description: Catalog resource already exists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogPayloadTooLarge:
      description: JSON body exceeds 4 MiB.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogInternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Pass the token issued by `POST /authenticate` as a bearer token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.