Skip to Content

AppCouponsApi

All URIs are relative to https://business.apis.kesk.app/v1 

MethodHTTP requestDescription
getCouponByCodeGET /coupons/code/{code}Get coupon details by code.
getCouponDetailsGET /coupons/{id}Get coupon details by ID.
getCouponsGET /couponsList all coupons with optional filtering.
validateCouponPOST /coupons/validateValidate 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

NameTypeDescriptionNotes
codeStringCoupon code to look up (e.g., SAVE20, WELCOME10)[default to null]
vendor_type_idLongOptional vendor type ID to validate coupon applicability[optional] [default to null]

Return type

CouponResponse

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

NameTypeDescriptionNotes
idLongUnique identifier of the coupon to retrieve[default to null]

Return type

CouponResponse

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

NameTypeDescriptionNotes
vendor_type_idLongVendor type ID to filter coupons by business category[optional] [default to null]
latitudeDoubleUser’s current latitude for location-based coupon filtering[optional] [default to null]
longitudeDoubleUser’s current longitude for location-based coupon filtering[optional] [default to null]
pageIntegerPage number for pagination (default: 1)[optional] [default to null]

Return type

PaginatedResponse_CouponResponse

Authorization

JwtAuthScheme

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

NameTypeDescriptionNotes
ValidateCouponRequestValidateCouponRequestValidation request containing coupon code, amount, and context

Return type

ValidateCouponResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8