Cashback Rule 🤝

APIs to create, update or delete Redemption Rules and Configurations

Available Endpoints

TypeDescriptionEndpoint

POST

integrations/client/cashback/config/rule

PUT

integrations/client/cashback/rule/{ruleId}

PUT

integrations/client/cashback/rule

PUT

integrations/client/cashback/config

DELETE

integrations/client/cashback/rule/{ruleId}

Object Documentation

Cashback Rule

AttributeTypeDescription

id

integer

Id of the cashback rule

isDefaultRule

boolean

A boolean indicating if the cashback rule is the default one

minAmountToSpend

double

Amount needed to be spent in order to be rewarded the cashback

pointsRewardedAsCashback

double

Points awarded for the amount specified in minAmountToSpend

availableTo

Object

An AvailableTo object specifying the availability of the rule (To whom this rule will be applied on)

AvailableTo Object

AttributeTypeDescription

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

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

AttributeTypeRequiredDescription

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

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)

AttributeTypeRequired

minAmountToSpend

double

Yes

Amount needed to be spent in order to be rewarded the cashback

pointsRewardedAsCashback

double

Yes

Points awarded for the amount specified in minAmountToSpend

availableTo

Object

Yes

An AvailableTo object specifying the availability of the rule (To whom this rule will be applied on)

(If left empty or null it will be applied to all)

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

AttributeTypeRequiredDescription

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

AttributeTypeDescription

ruleId

integer

Id of the client's cashback rule

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

AttributeTypeRequiredDescription

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

AttributeTypeDescription

isActive

boolean

A Boolean indicating if the cashback program is active

minAmountToSpend

double

Amount needed to be spent in order to be rewarded the cashback

pointsRewardedAsCashback

double

Points awarded for the amount specified in minAmountToSpend

{
  "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

AttributeTypeRequiredDescription

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

AttributeType

isCashbackActive

boolean

A Boolean flag indicating if the Cashback program is active for the client

returnWindowDuration

integer

Number of days that the customer can return an order and points get deducted accordingly

Sample Request

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

Response

Body

AttributeTypeDescription

isCashbackActive

boolean

A Boolean flag indicating if the Cashback program is active for the client

returnWindowDuration

integer

Number of days that the customer can return an order and points get deducted accordingly

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

AttributeTypeRequiredDescription

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

ParameterTypeDescription

ruleId

integer

Id of the client's cashback rule

Response

Body

No Response Body

Sample Response

true

Last updated