Cashback Rule 🤝

APIs to create, update or delete Redemption Rules and Configurations

Available Endpoints

Object Documentation

Cashback Rule

AvailableTo Object

POST - Create Cashback Rule

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

This API is used to create a client's cashback rule

Request

Body

Note that you can only create cashback rules that are limited to a certain VIP tier or tags, you cannot create a general default cashback rule that is available to all customers (A default cashback rule is created once a client is created automatically)

Sample Request

{
  "pointsRewardedAsCashback": 10.0,
  "minAmountToSpend": 5,
  "availableTo": {
    "level": {
      "levelId": 1234
    }
  }
}

Response

Body

Cashback Rule Object

Sample Response

{
  "id": 12345,
  "isDefault": false,
  "minAmountToSpend": 6.0,
  "pointsRewardedAsCashback": 10.0,
  "availableTo": {
    "level": {
      "levelId": 12345,
      "levelName": "Bronze"
    },
    "tags": []
  }
}

PUT - Update Cashback Rule

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

This API is used to update a client's cashback rule

Request

Header

Path Parameters

Body

Only parameters that will be updated should be sent

Cashback Rule Object

Sample Request

{
  "amountToSpendForReward": 2,
  "pointsRewardedAsCashback": 37
}

Response

Body

Cashback Rule Object

Sample Response

{
  "id": 12345,
  "isDefault": false,
  "minAmountToSpend": 2.0,
  "pointsRewardedAsCashback": 37.0,
  "availableTo": {
    "level": {
      "levelId": 12345,
      "levelName": "Bronze"
    },
    "tags": []
  }
}

PUT - Update Default Rule

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

This API is used to update the default cashback rule (Cashback rule that applies to all customers)

Request

Header

Body

{
  "amountToSpendForReward": 2,
  "pointsRewardedAsCashback": 37
}

Response

Body

Cashback Rule Object

Sample Response

{
  "id": 12345,
  "isDefault": true,
  "minAmountToSpend": 2.0,
  "pointsRewardedAsCashback": 37.0,
  "availableTo": {
    "level": {
      "levelId": null,
      "levelName": null
    },
    "tags": []
  }
}

PUT - Update Cashback Configurations

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

This API is used to updated general configrations of the cashback program

Request

Header

Body

Only parameters that will be updated should be sent

Sample Request

{
  "isCashbackActive": false,
  "returnWindowDuration": 20
}

Response

Body

Sample Response

{
  "isCashbackActive": false,
  "returnWindowDuration": 20
}

DELETE - Delete Cashback Rule

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

This API deletes a client's cashback rule

Request

Header

Path Parameters

Default rule cannot be deleted

Response

Body

No Response Body

Sample Response

true

Last updated