Automatic Coupons
Apply predefined automatic coupons based on specific promotional criteria.
POST
cURL
Automatic Coupons
The API call applies a predefined automatic coupon that aligns with specific promotional criteria and reward structures. It enables seamless integration with promotional campaigns, ensuring coupons are issued based on predefined eligibility conditions, enhancing customer engagement and marketing efforts.Channel Merging Available
If your system uses different customer IDs across multiple channels (e.g., online and offline), Gameball’s channel merging feature helps unify customer profiles. By including the customer’s mobile number or email (based on your merging configuration) with each request, Gameball will combine activities into a single profile.For more information, head to the Omni-Channel Handling Guide.
If your system uses different customer IDs across multiple channels (e.g., online and offline), Gameball’s channel merging feature helps unify customer profiles. By including the customer’s mobile number or email (based on your merging configuration) with each request, Gameball will combine activities into a single profile.For more information, head to the Omni-Channel Handling Guide.
Request Body
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
The total cost of the order, including all item prices, shipping, taxes, and tips. This value does not account for any discounts or coupons applied and is not used for calculations in Gameball; it is solely saved as historical data linked to the order. Must be a positive value.Example: A customer purchases items worth $120, including taxes and shipping. Even if a $20 coupon is applied, the totalPrice remains $120 as it represents the original cost of the order before any discounts are applied.
The total shipping cost associated with the order. This should be included when a Free Shipping promotion is configured in your account, enabling the system to calculate and apply the appropriate discount to the cart.
An array containing details about each product in the order. If not provided, the calculation will only consider the total order values.
The original price of a single product before any tax or discount is applied. This reflects the cost of one unit of the item, not the total for multiple quantities in an order.Example: If the original price of a product is $50 and a customer buys two units, the **price** for each item would still be recorded as $50, regardless of quantity.
Product category, such as fashion or electronics. It can include one or multiple categories. Example:
["natural", "cosmetics"]Collection ID(s) to which the product belongs. It can include one or multiple collections. Example:
["14313", "4343"]The total amount of taxes applied to the line item, expressed in the shop’s currency. This amount must be positive and reflects the total taxes based on the quantity of the item.
The total discount applied to this line item, expressed as a positive value. This amount should reflect the total discounts based on the quantity of the item.
This object contains details about the specific merchant involved in the transaction, which is particularly important for businesses managing multiple merchants or branches under the same Gameball account. This object can provide identifying information about both the main merchant and any associated branch where the transaction took place.
Response
A boolean indicating whether a coupon was successfully applied to the order (
true if applied, false otherwise).Type of the coupon, such as fixed amount, percentage discount, free shipping, or product-specific coupon.Possible Values:
shippingfixedpercentageproductbuyXgetY
Body
application/json