Gameball Developers Guide
v3.0
v3.0
  • Introduction
  • What's New in V3.0
  • Installing Gameball
    • Web
      • Show Gameball Customer Widget
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Go-Live Checklist
    • iOS
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • Android
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • React Native
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
      • Migration from v1 to v2
    • Flutter
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Go-Live Checklist
    • Generic Mobile App
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
    • Retail & Modern POS
      • Initialize Gameball Customer Profile
      • Track Orders & Cashback Reward
      • Track Refunds
      • Enable Redemption
        • Prepare POS for Redemption
        • Using Virtual ID
          • Using Virtual Card
  • REST API
    • Overview
      • Server-Side SDKs
    • Authentication
    • API Reference
      • Customer
      • Event
      • Transactions
      • Order
      • Coupons
      • Leaderboard 👑
      • Notifications 👑
      • Configurations 👑
      • Batches 👑
        • Batch Operations Data
      • OTP
      • Partner 🤝
        • Client 🤝
        • Redemption Rule 🤝
        • Cashback Rule 🤝
    • Webhooks
      • Notifications Webhook
      • Customer Profile Webhook
    • Errors
    • Object Reference
  • Tutorials
    • Build Custom UI Elements 👑
      • Display Reward Campaign Progress
      • Show VIP Tiers
      • Show Customer Points Balance
      • Build Leaderboards
      • Show Notifications Inbox
      • Adapt UI to Configurations
      • Advanced UI Techniques
        • Increase Sales with Cashback UI Elements
        • Derive Engagement with Rewards Campaigns UI Elements
    • Tracking Customer Events
    • Build your Own Notification System
    • Checkout Integration Example
    • Redemption Integration Options
      • Redeem with coupon system
        • Integrate your coupon system
          • Example using e-commerce platform(WooCommerce)
          • Example using a custom coupon system
        • Build couponing experience
          • Using Gameball widget
          • Build custom experience
            • Showing customers available points
            • Allowing customers to create coupons
            • Apply the discount code to your cart
        • Coupon integration reference
      • Redeem with direct debt
        • Get customers points balance
        • Redeem customer points
  • Third Party Integrations
    • Segment Integration
Powered by GitBook
On this page
  • Available Endpoints
  • Object Documentation
  • Redemption Rule
  • Coupon Object
  • AvailableTo Object
  • Coupon Group Object
  • POST - Create Redemption Rule
  • Request
  • Response
  • PUT - Update Redemption Rule
  • Request
  • Response
  • PUT - Update Default Rule
  • Request
  • Response
  • PUT - Update Redemption Configurations
  • Request
  • Response
  • DELETE - Delete Redemption Rule
  • Request
  • Response
  1. REST API
  2. API Reference
  3. Partner 🤝

Redemption Rule 🤝

APIs to create, update or delete Redemption Rules and Configurations

Available Endpoints

Type
Description
Endpoint

POST

integrations/client/redemption/rule

PUT

integrations/client/redemption/config/{ruleId}

PUT

integrations/client/redemption/config/rule

PUT

integrations/client/redemption/config

DELETE

integrations/client/redemption/config/{ruleId}

Object Documentation

Redemption Rule

Attribute
Type
Description

id

integer

Id of the redemption rule

pointsToRedeem

double

Points needed for the rule to be redeemed

valueOfPoint

double

In the case of a rule of type general_settings, this attribute specifies the monetary value of one point

ruleType

string

Indicates the type of the rule and can be one of the following:

  • free_shipping_settings

    • For rule that redeems a free shipping coupon

  • percentage_discount_settings

    • For rule that redeems a percentage based discount coupon

  • free_product_settings

    • For rule that redeems a free product coupon

  • fixed_rate_settings

    • For rule that redeems a coupon that discounts a fixed amount

  • general_settings

    • For general rule that allows user to trade points for their monetary value

  • custom

startDate

DateTime

Starting date when the rule can be applied (If null then it starts from the date it is created )

endDate

DateTime

Ending date when the rule will expire (If null then it will not expire)

coupon

Object

availableTo

Object

Coupon Object

Attribute
Type
Required
Description

couponType

string

No

Coupon type, can be one of the following:

  • fixed_discount

  • percentage_discount

  • free_shipping

  • free_product

  • fixed_rate_discount

  • custom

discountValue

double

Yes, in case of coupon type percentage_discount and fixed_discount

Value of coupon, for example if the coupon rewards a fixed amount of points then the amount of points will be in discountValue

minOrderValue

double

No

Minimum order value that this coupon can be applied to

product

object

Yes, in case of coupon type free_product

In the case of a free product coupon this object indicates the details of the product,

The object has the the following attributes:

  • productId

  • productName

  • variantId

  • variantName

collections

array

No

Array of Collection objects in the case where the coupon can only be applied to specific collections, the collection object has the following attributes:

  • collectionId

    • integer

  • collectionName

    • string

group

Object

Yes, in case of coupon type custom

AvailableTo Object

Attribute
Type
Description

level

object

A Level object indicating the VIP tier that the rule is available to,

The Level object has the following attributes:

  • levelName

    • string

  • levelId

    • integer

tags

array

An array of tag names that the rule is available to

Coupon Group Object

Attribute
Type
Description

handle

string

Handle of the group

title

string

Title of the group

url

string

URL of the group

iconPath

string

A path indicating the Icon of the Coupon Group

description

string

Description of the group

maxPerPlayer

integer

Maximum number of times a customer can achieve coupons from this group

startDate

DateTime

Date at which coupons can start to be redeemed from this group

expiryDate

DateTime

Date at which you can no longer redeem coupons from this group

isAvailable

boolean

A boolean flag indicating if there are coupon available to be redeemed from this group

isValid

boolean

Flag indicating if the group is valid (Current Date is between start and expiry dates)

isActive

boolean

Flag indicating if the group is active or not (Client marked the group as active or not and group’s dates are valid)

POST - Create Redemption Rule

https://api.gameball.co/api/v3.0/integrations/client/redemption/rule

This API is used to create a redemption rule for a client

Request

Header

Attribute
Type
Required
Description

Authorization

string

Yes

Partner Access Token, The token is of type Bearer

storeId

string

Yes

Id of the store on the partner's system

Body

A client can only have one free_shipping rule

Attribute
Type
Required
Description

pointsToRedeem

double

Yes

Points needed for the rule to be redeemed

valueOfPoint

double

No

In the case of a rule of type general_settings, this attribute specifies the monetary value of one point

ruleType

string

Yes

Indicates the type of the rule and can be one of the following:

  • free_shipping_settings

    • For rule that redeems a free shipping coupon

  • percentage_discount_settings

    • For rule that redeems a percentage based discount coupon

  • free_product_settings

    • For rule that redeems a free product coupon

  • fixed_rate_settings

    • For rule that redeems a coupon that discounts a fixed amount

  • general_setting

    • For general rule that allows user to trade points for their monetary value

  • custom

startDate

DateTime

No

Starting date when the rule can be applied (If null then it starts from the date it is created )

endDate

DateTime

No

Ending date when the rule will expire (If null then it will not expire)

coupon

Object

Yes

availableTo

Object

No

Sample Request

{
  "pointsToRedeem": 100,
  "valueOfPoint": 0.0,
  "ruleType": "free_product_settings",
  "startDate": null,
  "endDate": null,
  "coupon": {
    "couponType": "free_product",
    "discountValue": null,
    "minOrderValue": 100.0,
    "product": {
      "productId": "6932183449758",
      "productName": "7 Shakra Bracelet",
      "productDisplayNames": [],
      "variantId": "40691241877662",
      "variantName": "Blue"
    },
    "applicableTo": {
      "collections": [],
      "productIds": null
    },
    "group":{
      "handle":"Free_Sundae"
    }   
  },
  "availableTo": {
    "level": {
      "levelId": 12345,
      "levelName": "Silver"
    },
    "tags": ["VIP"]
  }
}

Response

Body

Sample Response

{
  "id": 1234,
  "pointsToRedeem": 100,
  "valueOfPoint": 0.0,
  "ruleType": "free_product_settings",
  "startDate": null,
  "endDate": null,
  "coupon": {
    "couponType": "free_product",
    "discountValue": null,
    "minOrderValue": 100.0,
    "product": {
      "productId": "6932183449758",
      "productName": "7 Shakra Bracelet",
      "productDisplayNames": [],
      "variantId": "40691241877662",
      "variantName": "Blue"
    },
    "applicableTo": {
      "collections": [],
      "productIds": null
    },
    "group": {
      "handle": "Free_Sundae",
      "title": null,
      "url": null,
      "iconPath": null,
      "description": null,
      "maxPerPlayer": null,
      "startDate": null,
      "expiryDate": null,
      "isAvailable": false,
      "isValid": false,
      "isActive": false
    }
  },
  "availableTo": {
    "level": {
      "levelId": 12345,
      "levelName": "Silver"
    },
    "tags": ["VIP"]
  }
}

PUT - Update Redemption Rule

https://api.gameball.co/api/v3.0/integrations/client/redemption/config/rule/{ruleId}

This API is used to Update a client's redemption rule

Request

Header

Attribute
Type
Required
Description

Authorization

string

Yes

Partner Access Token, The token is of type Bearer

storeId

string

Yes

Id of the store on the partner's system

Path Parameters

Parameter
Type
Description

ruleId

integer

Id of the redemption rule

Body

Only parameters that will be updated should be sent

{
  "pointsToRedeem": 500
}

Response

Body

{
  "id":1234,
  "pointsToRedeem": 500,
  "valueOfPoint": 0.0,
  "ruleType": "free_product_settings",
  "startDate": null,
  "endDate": null,
  "coupon": {
    "couponType": "free_product",
    "discountValue": null,
    "minOrderValue": 100.0,
    "product": {
      "productId": "6932183449758",
      "productName": "7 Shakra Bracelet",
      "productDisplayNames": [],
      "variantId": "40691241877662",
      "variantName": "Blue"
    },
    "applicableTo": {
      "collections": [],
      "productIds": null
    },
    "group": {
      "handle": "Free_Sundae",
      "title": null,
      "url": null,
      "iconPath": null,
      "description": null,
      "maxPerPlayer": null,
      "startDate": null,
      "expiryDate": null,
      "isAvailable": false,
      "isValid": false,
      "isActive": false
    }
  },
  "availableTo": {
    "level": {
      "levelId": 12345,
      "levelName": "Silver"
    },
    "tags": ["VIP"]
  }
}

PUT - Update Default Rule

https://api.gameball.co/api/v3.0/integrations/client/redemption/config/rule

This API is used to Update the default redemption rule.

The default redemption rule defines the value of a point and allows the customer to exchange their points into monetary value based on the rule's configurations

Request

Header

Attribute
Type
Required
Description

Authorization

string

Yes

Partner Access Token, The token is of type Bearer

storeId

string

Yes

Id of the store on the partner's system

Body

Only parameters that will be updated should be sent

Attribute
Type
Description

valueOfPoint

double

This attribute specifies the monetary value of one point

isActive

boolean

A Boolean indicating if the rule is active (Default value is true)

Sample Request

{
  "valueOfPoint": 111.0
}

Response

Body

valueOfPoint

double

This attribute specifies the monetary value of one point

isActive

boolean

A Boolean indicating if the rule is active (Default value is true)

id

integer

Id of the default rule

Sample Response

{
  "id": 1234,
  "valueOfPoint": 111.0,
  "isActive": true
}

PUT - Update Redemption Configurations

https://api.gameball.co/api/v3.0/integrations/client/redemption/config

This API allows you to edit a client's configurations

Request

Header

Attribute
Type
Required
Description

Authorization

string

Yes

Partner Access Token, The token is of type Bearer

storeId

string

Yes

Id of the store on the partner's system

Body

Only parameters that will be updated should be sent

Attribute
Type
Description

isRedemptionActive

boolean

A boolean flag indicating if the Redemption program is active for the client

pointsExpiryPeriod

integer

Number of days that the points will expire after being rewarded

Sample Request

{
  "IsRedemptionActive": false,
  "PointsExpiryPeriod": 800
}

Response

Body

Attribute
Type
Description

isRedemptionActive

boolean

A boolean flag indicating if the Redemption program is active for the client

pointsExpiryPeriod

integer

Number of days that the points will expire after being rewarded

{
  "IsRedemptionActive": false,
  "PointsExpiryPeriod": 800
}

DELETE - Delete Redemption Rule

https://api.gameball.co/api/v3.0/integrations/client/redemption/config/{ruleId}

This API allows deletes a client's redemption rule

Request

Header

Attribute
Type
Required
Description

Authorization

string

Yes

Partner Access Token, The token is of type Bearer

storeId

string

Yes

Id of the store on the partner's system

Path Parameters

Default rule cannot be deleted

Parameter
Type
Description

ruleId

integer

Id of the redemption rule

Response

No Response Body

Sample Response

true
PreviousClient 🤝NextCashback Rule 🤝

Last updated 1 year ago

A describing the coupon that is awarded when the rule is redeemed

An specifying the availability of the rule (To whom this rule will be available)

An describing the coupon group in case of a custom

A describing the coupon that is awarded when the rule is redeemed

An specifying the availability of the rule (To whom this rule will be available)

Redemption Rule Object
Redemption Rule Object
Redemption Rule Object
Create Redemption Rule
Update Redemption Rule
Update Default Rule
Update Redemption Configurations
Delete Redemption Rule
coupon object
AvailableTo object
object
coupon object
AvailableTo object