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

# Get rewards

> Get all rewards



## OpenAPI

````yaml GET /rewards
openapi: 3.0.1
info:
  title: Masivo's REST API
  description: Learn how to use Masivo's REST API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.masivo.ai/api/storefront/v1
security:
  - bearerAuth: []
paths:
  /rewards:
    get:
      description: Get all rewards
      parameters:
        - in: query
          name: from
          description: Starting record index, starting from 0
          required: true
          schema:
            type: string
        - in: query
          name: to
          description: Ending record index, starting from 0
          required: true
          schema:
            type: string
        - in: query
          name: brand_id
          description: The brand id to filter rewards
          schema:
            type: string
        - in: query
          name: type
          description: The type of the reward
          schema:
            type: string
            enum:
              - POINTS
              - DISCOUNT
              - GIFT_CARD
              - PRODUCT
        - in: query
          name: platform
          description: Filter rewards by platform name
          schema:
            type: string
        - in: query
          name: store_id
          description: >-
            Filter by store id. Rewards with stores = null are included because
            they have no store restriction; rewards with a non-empty stores
            array are included only when it contains this id; rewards with
            stores = [] are excluded.
          schema:
            type: string
        - in: query
          name: channel_id
          description: >-
            Filter by channel id. Rewards with channels = null are included
            because they have no channel restriction; rewards with a non-empty
            channels array are included only when it contains this id; rewards
            with channels = [] are excluded.
          schema:
            type: string
        - in: query
          name: product_id
          description: >-
            Filter by product id. Rewards with products = null are included
            because they have no product restriction; rewards with a non-empty
            products array are included only when it contains this id; rewards
            with products = [] are excluded.
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Reward'
components:
  schemas:
    Reward:
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: The reward internal unique identifier
              format: uuid
        - $ref: '#/components/schemas/RewardInsert'
    RewardInsert:
      type: object
      properties:
        brand_id:
          type: string
          description: The brand id of the reward, null if is a global reward
          nullable: true
        platforms:
          type: array
          description: Platforms where this reward applies
          items:
            type: string
          nullable: true
        stores:
          type: array
          description: >-
            Store ids this reward is restricted to. null means no store
            restriction; a non-empty array restricts the reward to those stores;
            [] is an explicit empty restriction and matches no stores.
          items:
            type: string
          nullable: true
        channels:
          type: array
          description: >-
            Channel ids this reward is restricted to. null means no channel
            restriction; a non-empty array restricts the reward to those
            channels; [] is an explicit empty restriction and matches no
            channels.
          items:
            type: string
          nullable: true
        products:
          type: array
          description: >-
            Product ids this reward is restricted to. null means no product
            restriction; a non-empty array restricts the reward to those
            products; [] is an explicit empty restriction and matches no
            products.
          items:
            type: string
          nullable: true
        name:
          type: string
          description: The name of the reward
        description:
          type: string
          description: The description of the reward
        type:
          type: string
          description: The type of the reward
          enum:
            - POINTS
            - DISCOUNT
            - GIFT_CARD
            - PRODUCT
            - CUSTOM
        conditions:
          $ref: '#/components/schemas/AlternativeCondition'
        attributes:
          description: The attributes of the reward
          oneOf:
            - type: object
              description: The attributes of rewards of type POINTS
              properties:
                conversion_factor:
                  type: number
                  description: How much 1 point is worth in your currency
                  example: 0.1
            - description: The attributes of rewards of type DISCOUNT
              type: object
              properties:
                discount_value:
                  type: number
                  description: The discount value
                  example: 10
                discount_type:
                  type: string
                  description: The type of discount
                  enum:
                    - fixed
                    - percentage
                type:
                  type: string
                  description: The discount will be applied to
                  enum:
                    - shipping
                    - order
                    - product
    AlternativeCondition:
      type: array
      description: OR conditions
      items:
        $ref: '#/components/schemas/CompoundCondition'
    CompoundCondition:
      type: array
      description: AND conditions
      items:
        $ref: '#/components/schemas/Condition'
    Condition:
      type: object
      properties:
        type:
          type: string
          description: The type of the condition
          example: Order Value
        operator:
          type: string
          description: The operator to compare the attribute
          example: grater than
        primitive:
          type: string
          description: The primitive of the value to compare
          enum:
            - string
            - number
            - currency
            - boolean
            - absolute date
            - relative date
            - recurring date
        value:
          oneOf:
            - type: number
              example: 9.95
            - type: string
            - type: boolean
          description: The value to compare
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````