Joy dev docs
User guide
  • Joy Javascript API
    • Introduction to the Joy SDK
    • Public API get methods
    • Public API action methods
    • Widget methods
  • Joy REST API
    • Customers
    • Earning programs
    • Redeeming programs
    • Points history
    • Rewards
    • Point manupulation
    • VIP Tiers
    • Referral
  • JOY OPEN API V2
    • Customer
Powered by GitBook
On this page
  • Open widget
  • Close widget
  • Open page
  • Open to a redeeming program
  1. Joy Javascript API

Widget methods

Open widget

You can manually trigger the opening of the Joy floating widget with this method:

joyInstance.openWidget()

Close widget

You can manually trigger the close of the Joy floating widget with this method:

joyInstance.closeWidget()

Open page

You can use this method to open a targeted page on the floating widget.

joyInstance.openPage(page)
//View below for possible values

All possible values for the page would be:

Page value
Page description

home

The home page the widget

howToEarn

The earning program list of the widget

howToRedeem

The redeeming program list of the widget

milestoneV2

The milestone rewards page of the widget

activities

The point history page of the widget

rewards

The coupon list page of the widget

Open to a redeeming program

You can get the list of the redeeming programs available and then use the program ID to open:

joyInstance.openRedeemProgram(programId)

PreviousPublic API action methodsNextCustomers

Last updated 8 months ago