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

# List program activities

> 
<Info>

<Badge color="gray">Documentation in progress</Badge>

This documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.

</Info>

Returns a cursor-paginated list of activities recorded for a program (created, updated,
deleted, activated, deactivated and assignment changes). Supports filtering by activity
`id`, `type` and `created_at`.



## OpenAPI

````yaml /openapi/loyalties-v2.json get /v2/loyalties/programs/{programId}/activities
openapi: 3.1.0
info:
  title: Voucherify API - Loyalty v2
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v2/loyalties/programs/{programId}/activities:
    parameters:
      - name: programId
        in: path
        required: true
        description: Identifies the loyalty program. Format `lprg_[a-f0-9]+`.
        schema:
          type: string
          pattern: ^lprg_[a-f0-9]+$
    get:
      tags:
        - Programs
      summary: List program activities
      description: >-

        <Info>


        <Badge color="gray">Documentation in progress</Badge>


        This documentation is in progress. The parameters, fields, request and
        response bodies, and other data may be subject to change. If you need
        more information or you want to share feedback, contact [Voucherify
        support](https://www.voucherify.io/contact-support) or your Technical
        Account Manager.


        </Info>


        Returns a cursor-paginated list of activities recorded for a program
        (created, updated,

        deleted, activated, deactivated and assignment changes). Supports
        filtering by activity

        `id`, `type` and `created_at`.
      operationId: listProgramActivities
      parameters:
        - name: filters
          in: query
          required: false
          description: >-
            Filters the results. Pass a deep object, for example
            `filters[type][conditions][$is]=vl.program.created`. Fields combine
            through `junction`, which defaults to `AND`. Omit `filters` to apply
            no field filter.
          style: deepObject
          explode: true
          schema:
            oneOf:
              - $ref: >-
                  #/components/schemas/LoyaltiesProgramsActivitiesListRequestQuery
              - type: 'null'
        - name: limit
          in: query
          required: false
          description: >-
            Limits the page size to an integer from 1 to 100. Defaults to 10. A
            numeric string is accepted and rounded to the nearest integer.
          schema:
            type:
              - number
              - string
              - 'null'
            minimum: 1
            maximum: 100
            default: 10
        - name: order
          in: query
          required: false
          description: >-
            Orders the results. Accepts one value or an array. Prefix a field
            with `-` for descending order. Defaults to `-created_at`. The same
            field cannot be used in both directions. Rows with the same sort
            value are then ordered by `id` ascending.
          schema:
            oneOf:
              - type: array
                items:
                  type: string
                  enum:
                    - created_at
                    - '-created_at'
              - type: string
                enum:
                  - created_at
                  - '-created_at'
              - type: 'null'
        - name: cursor
          in: query
          required: false
          description: >-
            Continues pagination. Pass the `cursor.next` value from a previous
            response. Format `lcrsapr_[a-f0-9]+`. The cursor matches the filters
            and order of that response.
          schema:
            type:
              - string
              - 'null'
            pattern: ^lcrsapr_[a-f0-9]+$
      responses:
        '200':
          description: Paginated list of program activities.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/V2LoyaltiesProgramsActivitiesListResponseBody
        '400':
          description: >-
            Validation error - request body or query parameters failed
            validation, or the operation is not allowed in the current resource
            state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict - e.g. duplicate resource or invalid state transition.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Internal server error:
                  value:
                    code: 500
                    key: api_error
                    message: >-
                      Something went wrong. Don't worry, your campaigns are
                      still safe and the Voucherify Team has been notified.
                      Check out our Help Center and forums for help, or head
                      back to home.
      security:
        - X-App-Id: []
          X-App-Token: []
        - bearerAuth: []
components:
  schemas:
    LoyaltiesProgramsActivitiesListRequestQuery:
      type: object
      description: >-
        Request query schema for **GET**
        `/v2/loyalties/programs/{programId}/activities`.
      properties:
        junction:
          description: >-
            Joins the field filters. Allowed values are `AND` and `OR`. Defaults
            to `AND`.
          oneOf:
            - type: string
              enum:
                - AND
                - OR
            - type: 'null'
        id:
          description: Filters by activity ID. Format `laprg_[a-f0-9]+`.
          oneOf:
            - $ref: >-
                #/components/schemas/LoyaltiesProgramsActivitiesListRequestQueryId
            - type: 'null'
        type:
          description: >-
            Filters by activity type. Allowed values: `vl.program.created`,
            `vl.program.updated`, `vl.program.deleted`, `vl.program.activated`,
            `vl.program.deactivated`, `vl.program.card_definition.assigned`,
            `vl.program.card_definition.unassigned`,
            `vl.program.earning_rule.assigned`,
            `vl.program.earning_rule.unassigned`, `vl.program.reward.assigned`,
            `vl.program.reward.unassigned`, `vl.program.reward.updated`,
            `vl.program.tier_structure.assigned`,
            `vl.program.tier_structure.unassigned`.
          oneOf:
            - $ref: >-
                #/components/schemas/LoyaltiesProgramsActivitiesListRequestQueryType
            - type: 'null'
        created_at:
          description: Filters by activity creation date.
          oneOf:
            - $ref: '#/components/schemas/ProgramDateFilterConditions'
            - type: 'null'
      additionalProperties: false
      title: Loyalties Programs Activities List Request Query
    V2LoyaltiesProgramsActivitiesListResponseBody:
      title: V2 Loyalties Programs Activities List Response Body
      type: object
      description: >-
        Response body schema for **GET**
        `/v2/loyalties/programs/{programId}/activities`.
      allOf:
        - $ref: '#/components/schemas/ProgramActivityListResponse'
    ErrorResponse:
      type: object
      description: Standard error response returned by all Loyalty v2 endpoints.
      properties:
        code:
          type: integer
          description: HTTP status code of the error.
        key:
          type: string
          description: Machine-readable error key.
        message:
          type: string
          description: Human-readable error message.
        details:
          type: string
          description: Additional details about the error.
        request_id:
          type: string
          description: Unique identifier of the request that produced the error.
        resource_id:
          type: string
          description: Unique identifier of the resource that produced the error.
        resource_type:
          type: string
          description: Type of the resource that produced the error.
    LoyaltiesProgramsActivitiesListRequestQueryId:
      type: object
      description: >-
        Filter conditions for the activity `id` field (ID field type). Allowed
        conditions:

        `$is`, `$is_not`, `$in`, `$not_in`. Values must match the program
        activity id pattern

        `^laprg_[a-f0-9]+$`. Each condition accepts a single string or an array
        of strings

        (max 1 item for `$is`/`$is_not`, max 100 items for `$in`/`$not_in`).
      properties:
        conditions:
          type: object
          minProperties: 1
          additionalProperties: false
          properties:
            $is:
              description: >-
                Matches one value. A string or a one-element array. Format
                `laprg_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^laprg_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^laprg_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is_not:
              description: >-
                Excludes one value. A string or a one-element array. Format
                `laprg_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^laprg_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^laprg_[a-f0-9]+$
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $in:
              description: >-
                Matches any of the values. A string or an array of 1 to 100
                values. Format `laprg_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^laprg_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^laprg_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
            $not_in:
              description: >-
                Excludes any of the values. A string or an array of 1 to 100
                values. Format `laprg_[a-f0-9]+`.
              oneOf:
                - type: string
                  pattern: ^laprg_[a-f0-9]+$
                - type: array
                  items:
                    type: string
                    pattern: ^laprg_[a-f0-9]+$
                  minItems: 1
                  maxItems: 100
                - type: 'null'
      required:
        - conditions
      additionalProperties: false
    LoyaltiesProgramsActivitiesListRequestQueryType:
      type: object
      description: >-
        Filter conditions for the activity `type` field (ENUM field type).
        Allowed conditions:

        `$is`, `$is_not`, `$in`, `$not_in`. Allowed values are the program
        activity types.

        Each condition accepts a single value or an array of values (max 1 item
        for

        `$is`/`$is_not`, up to 10 items for `$in`/`$not_in`).
      properties:
        conditions:
          type: object
          minProperties: 1
          additionalProperties: false
          properties:
            $is:
              description: Matches one value. A string or a one-element array.
              oneOf:
                - type: string
                  enum:
                    - vl.program.created
                    - vl.program.updated
                    - vl.program.deleted
                    - vl.program.activated
                    - vl.program.deactivated
                    - vl.program.card_definition.assigned
                    - vl.program.card_definition.unassigned
                    - vl.program.earning_rule.assigned
                    - vl.program.earning_rule.unassigned
                    - vl.program.reward.assigned
                    - vl.program.reward.unassigned
                    - vl.program.reward.updated
                    - vl.program.tier_structure.assigned
                    - vl.program.tier_structure.unassigned
                - type: array
                  items:
                    type: string
                    enum:
                      - vl.program.created
                      - vl.program.updated
                      - vl.program.deleted
                      - vl.program.activated
                      - vl.program.deactivated
                      - vl.program.card_definition.assigned
                      - vl.program.card_definition.unassigned
                      - vl.program.earning_rule.assigned
                      - vl.program.earning_rule.unassigned
                      - vl.program.reward.assigned
                      - vl.program.reward.unassigned
                      - vl.program.reward.updated
                      - vl.program.tier_structure.assigned
                      - vl.program.tier_structure.unassigned
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is_not:
              description: Excludes one value. A string or a one-element array.
              oneOf:
                - type: string
                  enum:
                    - vl.program.created
                    - vl.program.updated
                    - vl.program.deleted
                    - vl.program.activated
                    - vl.program.deactivated
                    - vl.program.card_definition.assigned
                    - vl.program.card_definition.unassigned
                    - vl.program.earning_rule.assigned
                    - vl.program.earning_rule.unassigned
                    - vl.program.reward.assigned
                    - vl.program.reward.unassigned
                    - vl.program.reward.updated
                    - vl.program.tier_structure.assigned
                    - vl.program.tier_structure.unassigned
                - type: array
                  items:
                    type: string
                    enum:
                      - vl.program.created
                      - vl.program.updated
                      - vl.program.deleted
                      - vl.program.activated
                      - vl.program.deactivated
                      - vl.program.card_definition.assigned
                      - vl.program.card_definition.unassigned
                      - vl.program.earning_rule.assigned
                      - vl.program.earning_rule.unassigned
                      - vl.program.reward.assigned
                      - vl.program.reward.unassigned
                      - vl.program.reward.updated
                      - vl.program.tier_structure.assigned
                      - vl.program.tier_structure.unassigned
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $in:
              description: >-
                Matches any of the values. A string or an array of 1 to 10
                values.
              oneOf:
                - type: string
                  enum:
                    - vl.program.created
                    - vl.program.updated
                    - vl.program.deleted
                    - vl.program.activated
                    - vl.program.deactivated
                    - vl.program.card_definition.assigned
                    - vl.program.card_definition.unassigned
                    - vl.program.earning_rule.assigned
                    - vl.program.earning_rule.unassigned
                    - vl.program.reward.assigned
                    - vl.program.reward.unassigned
                    - vl.program.reward.updated
                    - vl.program.tier_structure.assigned
                    - vl.program.tier_structure.unassigned
                - type: array
                  items:
                    type: string
                    enum:
                      - vl.program.created
                      - vl.program.updated
                      - vl.program.deleted
                      - vl.program.activated
                      - vl.program.deactivated
                      - vl.program.card_definition.assigned
                      - vl.program.card_definition.unassigned
                      - vl.program.earning_rule.assigned
                      - vl.program.earning_rule.unassigned
                      - vl.program.reward.assigned
                      - vl.program.reward.unassigned
                      - vl.program.reward.updated
                      - vl.program.tier_structure.assigned
                      - vl.program.tier_structure.unassigned
                  minItems: 1
                  maxItems: 10
                - type: 'null'
            $not_in:
              description: >-
                Excludes any of the values. A string or an array of 1 to 10
                values.
              oneOf:
                - type: string
                  enum:
                    - vl.program.created
                    - vl.program.updated
                    - vl.program.deleted
                    - vl.program.activated
                    - vl.program.deactivated
                    - vl.program.card_definition.assigned
                    - vl.program.card_definition.unassigned
                    - vl.program.earning_rule.assigned
                    - vl.program.earning_rule.unassigned
                    - vl.program.reward.assigned
                    - vl.program.reward.unassigned
                    - vl.program.reward.updated
                    - vl.program.tier_structure.assigned
                    - vl.program.tier_structure.unassigned
                - type: array
                  items:
                    type: string
                    enum:
                      - vl.program.created
                      - vl.program.updated
                      - vl.program.deleted
                      - vl.program.activated
                      - vl.program.deactivated
                      - vl.program.card_definition.assigned
                      - vl.program.card_definition.unassigned
                      - vl.program.earning_rule.assigned
                      - vl.program.earning_rule.unassigned
                      - vl.program.reward.assigned
                      - vl.program.reward.unassigned
                      - vl.program.reward.updated
                      - vl.program.tier_structure.assigned
                      - vl.program.tier_structure.unassigned
                  minItems: 1
                  maxItems: 10
                - type: 'null'
      required:
        - conditions
      additionalProperties: false
    ProgramDateFilterConditions:
      type: object
      description: >-
        Filter conditions for date fields (DATE field type). Allowed conditions:

        `$before`, `$after` (date values), `$is`, `$more_than`, `$less_than`

        (non-negative integers, interpreted as a number of days), `$has_value`,
        `$is_unknown`.

        Each condition accepts a single value or an array with a single value.
      properties:
        conditions:
          type: object
          minProperties: 1
          additionalProperties: false
          properties:
            $before:
              description: >-
                Matches dates before the given value. An ISO 8601 date-time, as
                a string or a one-element array.
              oneOf:
                - type: string
                  format: date-time
                - type: array
                  items:
                    type: string
                    format: date-time
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $after:
              description: >-
                Matches dates after the given value. An ISO 8601 date-time, as a
                string or a one-element array.
              oneOf:
                - type: string
                  format: date-time
                - type: array
                  items:
                    type: string
                    format: date-time
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $is:
              description: >-
                Matches a date exactly the given number of days ago. A
                non-negative integer, as a string or a one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $more_than:
              description: >-
                Matches dates more than the given number of days ago. A
                non-negative integer, as a string or a one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $less_than:
              description: >-
                Matches dates less than the given number of days ago. A
                non-negative integer, as a string or a one-element array.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1
                - type: 'null'
            $has_value:
              description: Matches when the field is set. The condition value is ignored.
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
                - type: 'null'
            $is_unknown:
              description: >-
                Matches when the field is not set. The condition value is
                ignored.
              oneOf:
                - type: string
                - type: array
                  maxItems: 1
                - type: 'null'
      required:
        - conditions
      additionalProperties: false
    ProgramActivityListResponse:
      type: object
      description: Cursor-paginated list of program activities.
      properties:
        object:
          type: string
          description: Object type marker.
          const: list
        data:
          type: array
          description: Activities on the current page.
          items:
            $ref: '#/components/schemas/ProgramActivity'
        cursor:
          description: Pagination cursor, or `null` when there are no more results.
          oneOf:
            - $ref: '#/components/schemas/ProgramListCursor'
            - type: 'null'
    ProgramActivity:
      type: object
      description: >-
        An activity recorded for a program. The `data` payload always contains
        the `program`

        object snapshot; assignment activities additionally include the related
        resource

        (`card_definition`/`earning_rule`/`reward`/`tier_structure`) and the
        assignment object

        (`program_card_definition`/`program_earning_rule`/`program_reward`/`program_tier_structure`).
      properties:
        id:
          type: string
          description: Unique activity identifier.
          pattern: ^laprg_[a-f0-9]+$
        program_id:
          type: string
          description: Unique identifier of the program the activity relates to.
          pattern: ^lprg_[a-f0-9]+$
        type:
          type: string
          description: Activity type.
          enum:
            - vl.program.created
            - vl.program.updated
            - vl.program.deleted
            - vl.program.activated
            - vl.program.deactivated
            - vl.program.card_definition.assigned
            - vl.program.card_definition.unassigned
            - vl.program.earning_rule.assigned
            - vl.program.earning_rule.unassigned
            - vl.program.reward.assigned
            - vl.program.reward.unassigned
            - vl.program.reward.updated
            - vl.program.tier_structure.assigned
            - vl.program.tier_structure.unassigned
        data:
          type: object
          description: >-
            Activity payload. Always includes a `program` snapshot; assignment
            activities also include the assigned/unassigned resource and
            assignment objects.
        created_at:
          type: string
          format: date-time
          description: Activity timestamp (ISO 8601).
        group_id:
          type: string
          description: >-
            Unique identifier grouping activities recorded within the same
            operation.
        source:
          $ref: '#/components/schemas/ProgramActivitySource'
          description: Origin of the activity. Omitted when unknown.
    ProgramListCursor:
      type: object
      description: >-
        Cursor for fetching the next page of results. Present only when more
        results are available.
      properties:
        next:
          type: string
          description: >-
            Cursor id to pass as the `cursor` query parameter in the next
            request.
        expires_at:
          type: string
          format: date-time
          description: Timestamp after which the cursor expires and can no longer be used.
    ProgramActivitySource:
      type: object
      description: Origin of the activity.
      properties:
        channel:
          type: string
          description: Channel the activity originated from.
          enum:
            - USER_PORTAL
            - API
            - CLIENT_API
            - INTERNAL
        user:
          type: object
          description: >-
            User that triggered the activity. Present for user-originated
            activities.
          properties:
            id:
              type: string
              description: User identifier.
        api_key:
          type: object
          description: >-
            API key that triggered the activity. Present for API-originated
            activities.
          properties:
            name:
              type: string
              description: API key name.
            app_id:
              type: string
              description: Application id of the API key.
            client_app_id:
              type: string
              description: Client application id of the API key.
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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