Coupon integration reference

The table below contains information about main configurations needed to integrate with Gameball.

Main Configuration attributes

Name
Required
Description

Coupon system url

Yes

Your coupon system endpoint responsible for creating coupons.

Method

Yes

Http Method type, i.e: POST, GET, PUT. (usually it is a POST method)

Authentication

Yes

API authentication, i.e: basic auth, no authentication, etc..

Query parameters

No

List of key value pairs of query params. Can contain API keys or other data

Headers

No

Request headers can contain values like API key, bearer token, etc..

Payload

Yes

Request body that contains the coupon details, i.e: coupon code, expiry date.

Payload attributes

Name
Type
Description

playerUniqueId

String

Customer unique id at your system that was used to create the customer at Gameball

entitledProductIds

Array of string

Array of product id (at your system) in which this voucher can be applied for, this should contain id's of product in case of free product voucher.

entitledCollectionIds

Array of string

Array of Categories Ids (At your system) that the generated coupon can be applied to.

oncePerCustomer

boolean

How many times the coupon can be used per customer, it is always sent by true since it is supported only to use one coupon once per customer.

code

String

The coupon code.

usageLimit

int

How many times the coupon can be used in total, for now it is always set to 1 because coupon can be only used once.

value

double

The value of discount.

couponType

object

Type of coupon, currently Gameball supports the following coupons only :

  1. fixed amount voucher

  2. percentage voucher

  3. free shipping

  4. free product

expiresAfter

int

Amount in days that the coupon will be expired after

minOrderValue

int

The minimum order value that the coupon can work with.

source

string

Defines which Gameball module created this coupon. Possible Values:

  • Referral Reward - Customer

  • Referral Reward - Friend

  • Rewards Campaign Reward- Place Order 3 Times

  • VIP Tier - Gold - Life time

  • VIP Tier - Gold - Entry Reward

  • Points Redemption

  • Automation Flow

Last updated