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

# Preview Group Import

> A `POST` to the `/imports/group/preview` endpoint shows who would receive a reward or benefit definition if it were issued to a group now: the group's members (a dynamic group's last completed refresh, a static group's current members), how many already hold an unexpired one, and how many would receive it. `expiry` is what an issue with no expiry of its own takes, the definition's fixed period: an import never applies the definition's expiry condition or the tenant's `reward_extend` rule, and `ignores_condition` / `ignores_auto_extend` say when one is configured.



## OpenAPI

````yaml post /v3/imports/group/preview
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/imports/group/preview:
    post:
      tags:
        - Group Import
      summary: Preview Group Import
      description: >-
        A `POST` to the `/imports/group/preview` endpoint shows who would
        receive a reward or benefit definition if it were issued to a group now:
        the group's members (a dynamic group's last completed refresh, a static
        group's current members), how many already hold an unexpired one, and
        how many would receive it. `expiry` is what an issue with no expiry of
        its own takes, the definition's fixed period: an import never applies
        the definition's expiry condition or the tenant's `reward_extend` rule,
        and `ignores_condition` / `ignores_auto_extend` say when one is
        configured.
      operationId: groupImport.preview
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewGroupImport'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      group:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          handle:
                            type: string
                          type:
                            type: string
                        required:
                          - id
                          - name
                          - handle
                          - type
                      latest_snapshot:
                        anyOf:
                          - $ref: '#/components/schemas/GroupSnapshot'
                          - type: 'null'
                      calculated_rules:
                        type: integer
                      members:
                        type:
                          - integer
                          - 'null'
                      already_holding:
                        type:
                          - integer
                          - 'null'
                      will_receive:
                        type:
                          - integer
                          - 'null'
                      expiry:
                        type: object
                        properties:
                          period:
                            type:
                              - integer
                              - 'null'
                          period_type:
                            type: string
                          absolute_expiry:
                            type:
                              - string
                              - 'null'
                          ignores_condition:
                            type: boolean
                          ignores_auto_extend:
                            type: boolean
                        required:
                          - period
                          - period_type
                          - absolute_expiry
                          - ignores_condition
                          - ignores_auto_extend
                    required:
                      - group
                      - latest_snapshot
                      - calculated_rules
                      - members
                      - already_holding
                      - will_receive
                      - expiry
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    PreviewGroupImport:
      type: object
      properties:
        importable_type:
          type: string
          enum:
            - reward_definition
            - benefit_definition
        importable_id:
          type: integer
        group_definition_id:
          type: integer
      required:
        - importable_type
        - importable_id
        - group_definition_id
      title: PreviewGroupImport
    GroupSnapshot:
      type: object
      properties:
        id:
          type: integer
        group_definition_id:
          type: integer
        status:
          type: string
        source:
          type: string
        baseline_snapshot_id:
          type:
            - integer
            - 'null'
        snapshot_at:
          type: string
        started_at:
          type: string
        completed_at:
          type: string
        failed_at:
          type: string
        error:
          type:
            - string
            - 'null'
        total_candidates:
          type: integer
        total_excluded:
          type: integer
        total_profiles:
          type: integer
        total_added:
          type: integer
        total_removed:
          type: integer
        progress:
          type: object
          description: >-
            Candidate scan progress of a running snapshot: driver streams walked
            so far.
          properties:
            streams_done:
              type: integer
            streams_total:
              type: integer
          required:
            - streams_done
            - streams_total
        events_dispatched_at:
          type: string
        inclusion_breakdown:
          type:
            - array
            - 'null'
          items: {}
        exclusion_breakdown:
          type:
            - array
            - 'null'
          items: {}
        duration_ms:
          type:
            - integer
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items: {}
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - group_definition_id
        - status
        - source
        - baseline_snapshot_id
        - snapshot_at
        - started_at
        - completed_at
        - failed_at
        - error
        - total_candidates
        - total_excluded
        - total_profiles
        - total_added
        - total_removed
        - progress
        - events_dispatched_at
        - inclusion_breakdown
        - exclusion_breakdown
        - duration_ms
        - meta
        - created_at
        - updated_at
      title: GroupSnapshot
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````

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