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

Changes

Changed in 3 of the 38 revisions of this API.14

    • the endpoint scheme security apiKey AND secretKey was added to the API

      api-security-added

    • the endpoint scheme security apiKey was removed from the API

      api-security-removed

    • the endpoint scheme security secretKey was removed from the API

      api-security-removed

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 38 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog