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

# Campaigns Configurations

> Retrieve active campaigns configuration for the loyalty program.



## OpenAPI

````yaml GET /api/v4.0/integrations/configurations/reward-campaigns
openapi: 3.1.0
info:
  title: Gameball API
  description: >-
    Gameball REST API v4.0 - Complete API reference for integrating loyalty,
    gamification, and customer engagement features
  version: 4.0.0
servers:
  - url: https://api.gameball.co
security:
  - bearerAuth: []
paths:
  /api/v4.0/integrations/configurations/reward-campaigns:
    get:
      summary: Campaigns Configurations
      description: >-
        The API retrieves your reward campaign configurations, including both
        event-based and transactional campaigns. If the customerId, productSku,
        or collectionId query parameters are provided, the response will include
        the reward campaigns that are applicable for the specified customer or
        product.
      operationId: getCampaignsConfigurations
      parameters:
        - name: customerId
          in: query
          description: >-
            Unique identifier for the customer that you can reference across the
            customer's whole lifetime. Could be a database ID, random string,
            email, or anything that uniquely identifies the customer. If
            provided, the API filters and returns only the campaigns that can be
            achieved by this customer.
          required: false
          schema:
            type: string
        - name: collectionId
          in: query
          description: >-
            Unique identifier for a product collection. If provided, the API
            returns the transactional campaigns applicable to the specified
            collection.
          required: false
          schema:
            type: string
        - name: productSku
          in: query
          description: >-
            The SKU (Stock Keeping Unit) of a product. If provided, the API
            returns the transactional campaigns applicable to the specified
            product.
          required: false
          schema:
            type: string
        - name: lang
          in: header
          description: >-
            If the lang header is provided, the response will be returned in the
            specified language (e.g., en for English, fr for French). If this
            header is not included, the system will use the default language.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Campaigns retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RewardCampaignConfiguration'
      security:
        - apiKey: []
components:
  schemas:
    RewardCampaignConfiguration:
      type: object
      properties:
        id:
          type: number
          description: Unique identifier for the reward campaign.
        name:
          type: string
          description: Name of the reward campaign.
        description:
          type:
            - string
            - 'null'
          description: A brief description of the reward campaign.
        isRepeatable:
          type: boolean
          description: >-
            Indicates whether the campaign can be earned multiple times.
            Example: If set to true, a customer can earn the campaign reward
            each time they meet the criteria, and if set to false, the campaign
            can only be earned once per customer.
        maxAchievement:
          type: number
          description: >-
            Specifies the maximum number of times the campaign can be earned if
            the value of isRepeatable is true. If the value is -1, it means the
            campaign can be earned indefinitely. Example: A value of 3 means the
            customer can earn the campaign reward up to three times before it is
            no longer available.
        type:
          type: string
          description: >-
            The type of the campaign. Possible values: SignUp (Reward is given
            when a user signs up), SocialMedia (Reward is linked to social media
            activity), ScheduledChallenge (A time-based challenge that gives
            rewards), Spin The Wheel (Rewards are given based on a
            spin-the-wheel game), EventBased (Reward is given based on specific
            customer events), HighScore (Reward is given based on achieving high
            scores in a campaign), Birthday (Reward is given for
            birthday-related activity).
        visibility:
          type: string
          description: >-
            The visibility status of the campaign. Possible values:
            AlwaysVisible (The campaign is always visible on the widget),
            NotVisible (The campaign is not visible to the customer on the
            widget), VisibleIfEarned (The campaign becomes visible once the
            customer earns it on the widget).
        icon:
          type:
            - string
            - 'null'
          description: >-
            The URL of the campaign's icon image. This icon visually represents
            the campaign and can be used in marketing materials or on the
            platform.
        availability:
          type: object
          description: >-
            Defines the criteria determining which customers are eligible to
            earn this reward campaign.
          properties:
            minTier:
              type: number
              description: >-
                The minimum customer tier order required to achieve in the
                campaign. Customers must meet or exceed this tier to be
                eligible. Example: A value of 2 indicates that only customers in
                the tier with order 2 or higher can earn this campaign.
            tags:
              type: array
              items:
                type: string
              description: >-
                A list of tags that identify the target customers eligible for
                the campaign. Tags can be used to group customers based on
                specific attributes or behaviors. Example: ["loyal",
                "new_customer"] indicates that only customers tagged as "loyal"
                or "new_customer" are eligible for the campaign.
        redirectionButtonText:
          type:
            - string
            - 'null'
          description: >-
            The text displayed on the redirection button within the reward
            campaign page on the widget. Example: "Claim Your Reward" would
            prompt customers to take action.
        redirectionButtonLink:
          type:
            - string
            - 'null'
          description: >-
            The URL that the redirection button points to. When customers click
            the button, they will be redirected to this link. It should lead to
            a relevant page that provides more information or facilitates the
            reward campaign achievement. Example:
            "https://yourwebsite.com/rewards" directs customers to a page where
            they can view their rewards.
        activation:
          type:
            - object
            - 'null'
          description: >-
            Defines the activation criteria for the campaign, which may include
            specific start and end dates.
          properties:
            startDate:
              type:
                - string
                - 'null'
              format: date-time
              description: >-
                The date and time when the campaign becomes active. This value
                determines when customers can begin to earn or win rewards
                associated with the campaign. Example: "2024-11-01T00:00:00"
                indicates that the campaign starts on November 1, 2024.
            endDate:
              type:
                - string
                - 'null'
              format: date-time
              description: >-
                The date and time when the campaign ends. After this date,
                customers will no longer be able to earn this campaign. Example:
                "2024-11-30T23:59:59" indicates that the campaign ends on
                November 30, 2024, at 11:59 PM.
        rewards:
          type: array
          description: >-
            Details of the rewards that the customer will earn once achieving
            this reward campaign.
          items:
            type: object
            properties:
              rankReward:
                type: number
                description: The score rewarded for achieving this reward campaign.
              walletReward:
                type: number
                description: >-
                  The number of points the customer will earn upon achieving
                  this reward campaign. Example: If you have set up a "First
                  Order" campaign where a customer earns 200 points as a reward
                  for placing their first order, the walletReward value would be
                  200.
              walletRewardFactor:
                type:
                  - number
                  - 'null'
                description: >-
                  The multiplier applied to the points a customer earns based on
                  the amount they spend during this campaign. This factor is
                  used in transactional campaigns, such as points multipliers.
                  Example: In a "Double Points" campaign, the walletRewardFactor
                  would be set to 2, meaning the customer will earn twice the
                  normal amount of points for their purchases during the
                  campaign.
              couponReward:
                type:
                  - object
                  - 'null'
                description: >-
                  A coupon object that is awarded to the customer for this
                  reward campaign.
                properties:
                  couponType:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The type of coupon applied. Possible values include:
                      free_shipping, percentage_discount, fixed_discount,
                      fixed_rate_discount, free_product, custom.
                  discountValue:
                    type:
                      - number
                      - 'null'
                    description: >-
                      The value of the discount provided by the coupon in case
                      the coupon type is fixed_discount, percentage_discount or
                      fixed_rate_discount.
                  product:
                    type:
                      - object
                      - 'null'
                    properties:
                      productId:
                        type:
                          - string
                          - 'null'
                        description: The unique identifier for the product.
                      productName:
                        type:
                          - string
                          - 'null'
                        description: The name of the product.
                      variantId:
                        type:
                          - string
                          - 'null'
                        description: The unique identifier for the product variant.
                      variantName:
                        type:
                          - string
                          - 'null'
                        description: The name of the product variant.
                      productDisplayName:
                        type:
                          - string
                          - 'null'
                        description: >-
                          The display name associated with the product that
                          configured on the dashboard based on required
                          language.
                  collections:
                    type:
                      - array
                      - 'null'
                    description: >-
                      A list of collection IDs that the coupon can be applied
                      to.
                    items:
                      type: object
                      properties:
                        collectionId:
                          type:
                            - string
                            - 'null'
                          description: The unique identifier for the collection.
                        collectionName:
                          type:
                            - string
                            - 'null'
                          description: The name for the collection.
                  group:
                    type:
                      - object
                      - 'null'
                    properties:
                      handle:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A unique identifier used to reference the coupon group
                          in the system.
                      title:
                        type:
                          - string
                          - 'null'
                        description: The title of the coupon group.
                      url:
                        type:
                          - string
                          - 'null'
                        description: The URL for the coupon group.
                      iconPath:
                        type:
                          - string
                          - 'null'
                        description: The path to the icon of the coupon group.
                      description:
                        type:
                          - string
                          - 'null'
                        description: A description of the coupon group.
                      maxPerCustomer:
                        type:
                          - number
                          - 'null'
                        description: >-
                          The maximum number of times a customer can use the
                          coupon. Example: 5 indicates that each customer can
                          redeem this coupon up to 5 times.
                      startDate:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          The date when the coupons within this coupon group
                          will become active and valid for redemption.
                      expiryDate:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          The date when the coupons within this coupon group
                          will expire and no longer be valid for redemption.
                      isAvailable:
                        type:
                          - boolean
                          - 'null'
                        description: >-
                          Indicates whether the coupon group is currently
                          available.
                      isActive:
                        type:
                          - boolean
                          - 'null'
                        description: >-
                          Indicates whether the coupon group is currently
                          active.
                  options:
                    type:
                      - object
                      - 'null'
                    properties:
                      name:
                        type:
                          - string
                          - 'null'
                        description: >-
                          The name of the reward rule configured on the
                          dashboard based on required language.
                      expiryAfter:
                        type:
                          - number
                          - 'null'
                        description: >-
                          The number of days after creation that the coupon will
                          expire. Example: If a coupon expires after 14 days,
                          the customer must use it within that period to receive
                          the discount.
                      usageLimit:
                        type:
                          - number
                          - 'null'
                        description: >-
                          The maximum number of times a single coupon can be
                          used. Example: If a coupon has a usage limit of 5, it
                          can be redeemed up to 5 times before it becomes
                          invalid.
                      capping:
                        type:
                          - number
                          - 'null'
                        description: >-
                          The maximum discount value a coupon can provide,
                          regardless of the order amount. Example: If a coupon
                          offers 20% off with a capping of $50, the discount
                          will not exceed $50, even if 20% of the order total is
                          higher.
                      minOrderValue:
                        type:
                          - number
                          - 'null'
                        description: >-
                          The minimum order amount required to apply the coupon.
                          Example: If a coupon has a minimum order value of
                          $100, the customer must spend at least $100 to use the
                          discount.
                      codePrefix:
                        type:
                          - string
                          - 'null'
                        description: >-
                          The prefix that will be added to the beginning of the
                          generated coupon code. Example: If the prefix is
                          "SUMMER", the generated coupon codes might look like
                          "SUMMER12345" or "SUMMERDISCOUNT".
                      redeemInstructions:
                        type:
                          - string
                          - 'null'
                        description: >-
                          The instructions on how the customer can redeem the
                          coupon. Example: "Enter the coupon code at checkout to
                          apply the discount."
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: apikey

````