v36

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-017439390.7 KB

This API call updates your coupon configurations, allowing you to modify details about how coupons are structured, authenticated, and mapped within Gameball.

put/api/v4.0/integrations/configurations/coupon

Request body

urlstring required

The URL of your API endpoint where coupons are created. Gameball will send requests to this endpoint whenever a coupon needs to be generated.

methodstring required

The HTTP method used to send requests to the coupon creation endpoint. Allowed values are POST, PUT or GET.

payloadstring

This specifies the structure of the JSON body Gameball will send to your endpoint when creating a coupon. Since different systems may use varying parameter names and structures, you can customize this payload to align with your system's requirements. You should define the JSON payload with placeholders that Gameball will replace with actual data when sending the request. Example: { "customerId": "{{playerUniqueId}}", "amount": "{{value}}", "code": "{{code}}" }

enableFreeProductboolean

Indicates whether free product coupons are enabled.

enableFixedRateboolean

Indicates whether fixed-rate discount coupons are enabled.

enableFreeShippingboolean

Indicates whether free shipping coupons are enabled.

enablePercentageboolean

Indicates whether percentage-based discount coupons are enabled.

Example request

{
  "url": "https://api.mywebsite.com/coupons",
  "method": "POST",
  "queryParams": [
    {
      "key": "appId",
      "value": "12345"
    }
  ],
  "headers": [
    {
      "key": "X-Client-Version",
      "value": "1.0"
    }
  ],
  "payload": "{ \"couponCode\": \"DISCOUNT10\" }",
  "couponMapping": {
    "fixed": "fixed_discount",
    "percentage": "percentage_discount",
    "freeProduct": "free_product",
    "freeShipping": "free_delivery"
  },
  "enableFreeProduct": true,
  "enableFixedRate": true,
  "enableFreeShipping": true,
  "enablePercentage": true
}

Response

Coupon configurations updated successfully