> ## 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.

# Referrals Configurations

> Retrieve referral program configuration for the loyalty program.



## OpenAPI

````yaml GET /api/v4.0/integrations/configurations/referrals
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/referrals:
    get:
      summary: Referrals Configurations
      description: >-
        This API retrieves the referral configuration, including customer and
        friend rewards, as well as metadata related to the events that trigger
        referral rewards.
      operationId: getReferralsConfigurations
      parameters:
        - 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: Referral settings retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralConfiguration'
      security:
        - apiKey: []
components:
  schemas:
    ReferralConfiguration:
      type: object
      properties:
        referralMethod:
          type: string
          description: >-
            This specifies who will receive the referral reward when a
            successful referral is made. Possible values: CustomerOnly (Only the
            customer making the referral will receive the reward. The referred
            friend will not receive any reward), CustomerAndFriend (Both the
            customer making the referral and the referred friend will receive
            rewards, encouraging mutual benefit).
        eventName:
          type: string
          description: >-
            This describes the event that will trigger the referral reward.
            Example: if the eventName is set to place_order, the referral reward
            will be granted when the referred friend completes an order after
            using the referral link. Other events can also be configured to
            trigger the reward, depending on your system's setup.
        eventMetaData:
          type:
            - object
            - 'null'
          description: >-
            Contains additional metadata about the event that triggers the
            referral.
          properties:
            name:
              type:
                - string
                - 'null'
              description: The name of the event metadata.
            operator:
              type:
                - string
                - 'null'
              description: >-
                The operator used for event metadata (e.g., equals,
                greater_than).
            value:
              type:
                - string
                - 'null'
              description: The value associated with the event metadata.
        friendReward:
          type:
            - object
            - 'null'
          description: >-
            The reward details given to the referred friend as part of the
            referral program.
          properties:
            score:
              type:
                - number
                - 'null'
              description: The score awarded to the referred friend.
            point:
              type:
                - number
                - 'null'
              description: The points awarded to the referred friend.
            coupon:
              type:
                - object
                - 'null'
              description: A coupon object that is awarded to the referred friend.
              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."
        customerReward:
          type:
            - object
            - 'null'
          description: >-
            The reward details given to the customer as part of the referral
            program.
          properties:
            score:
              type:
                - number
                - 'null'
              description: The score awarded to the customer.
            point:
              type:
                - number
                - 'null'
              description: The points awarded to the customer.
            coupon:
              type:
                - object
                - 'null'
              description: A coupon object that is awarded to the customer.
              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."
            extraReward:
              type:
                - object
                - 'null'
              description: >-
                It contains all the details of the reward (like the friendReward
                Object) that will be awarded to the customer as a bonus on top
                of the regular reward for every X friend referred.
              properties:
                forEvery:
                  type:
                    - number
                    - 'null'
                  description: >-
                    This defines the number of friends a customer needs to refer
                    in order to earn the extraReward. For example, if the value
                    of forEvery is set to 5, the customer will receive the extra
                    reward for every 5 friends they successfully refer. This
                    acts as a bonus on top of the regular reward, incentivizing
                    more referrals.
                score:
                  type:
                    - number
                    - 'null'
                  description: The score awarded as part of the extra reward.
                point:
                  type:
                    - number
                    - 'null'
                  description: The points awarded as part of the extra reward.
                coupon:
                  type:
                    - object
                    - 'null'
                  description: A coupon object that is awarded as part of the extra reward.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: apikey

````