AppCouponsApi
All URIs are relative to https://business.apis.kesk.app/v1
| Method | HTTP request | Description |
|---|---|---|
| getCouponByCode | GET /coupons/code/{code} | Get coupon details by code. |
| getCouponDetails | GET /coupons/{id} | Get coupon details by ID. |
| getCoupons | GET /coupons | List all coupons with optional filtering. |
| validateCoupon | POST /coupons/validate | Validate a coupon and calculate the discount. |
getCouponByCode
CouponResponse getCouponByCode(code, vendor_type_id)
Get coupon details by code.
Retrieves coupon information using the coupon code string, with optional validation against a specific vendor type to ensure applicability before use.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| code | String | Coupon code to look up (e.g., SAVE20, WELCOME10) | [default to null] |
| vendor_type_id | Long | Optional vendor type ID to validate coupon applicability | [optional] [default to null] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
getCouponDetails
CouponResponse getCouponDetails(id)
Get coupon details by ID.
Retrieves complete information about a specific coupon including all applicable products, vendors, and usage restrictions for detailed preview or application.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Long | Unique identifier of the coupon to retrieve | [default to null] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
getCoupons
PaginatedResponse_CouponResponse getCoupons(vendor_type_id, latitude, longitude, page)
List all coupons with optional filtering.
Retrieves available coupons with optional filtering by vendor type and location. Returns enriched coupon details including applicable products and vendors.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| vendor_type_id | Long | Vendor type ID to filter coupons by business category | [optional] [default to null] |
| latitude | Double | User’s current latitude for location-based coupon filtering | [optional] [default to null] |
| longitude | Double | User’s current longitude for location-based coupon filtering | [optional] [default to null] |
| page | Integer | Page number for pagination (default: 1) | [optional] [default to null] |
Return type
PaginatedResponse_CouponResponse
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
validateCoupon
ValidateCouponResponse validateCoupon(ValidateCouponRequest)
Validate a coupon and calculate the discount.
Validates a coupon code against order details and calculates the final discounted amount. Checks eligibility, usage limits, and applicability before returning discount breakdown.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ValidateCouponRequest | ValidateCouponRequest | Validation request containing coupon code, amount, and context |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8