Search...
getLoyaltyCoupon( )
Developer Preview
Retrieves a loyalty coupon.
Syntax
function getLoyaltyCoupon(loyaltyCouponId: string): Promise<GetLoyaltyCouponResponse>
getLoyaltyCoupon Parameters
NAME
TYPE
DESCRIPTION
loyaltyCouponId
string
ID of the loyalty coupon to retrieve.
Returns
Return Type:
Promise<
GetLoyaltyCouponResponse
>NAME
TYPE
DESCRIPTION
loyaltyCoupon
LoyaltyCoupon
Retrieved loyalty coupon.
Was this helpful?
getLoyaltyCoupon example
Copy Code
1import { coupons } from 'wix-loyalty.v2';23 async function getLoyaltyCoupon(loyaltyCouponId) {4 try {5 const result = await coupons.getLoyaltyCoupon(loyaltyCouponId);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13