Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Loyalty
  • Overview
  • Languages
  • Notify
  • Event
  • Storage
  • Configuration
  • Forms
  • Helpers
  • Auth
    • Login
    • Logout
    • Verify
    • Resend
    • Register
    • Refresh
  • Cart
    • Latest
    • Details
    • Quick Add
    • Add Item
    • Delete Item
    • Delete Image
    • Add Coupon
    • Remove Coupon
    • Get Upload Image
    • Get Quick Order Settings
    • Create Quick Order
    • Order Status
    • Get Current Cart Id
    • Price Quote
  • Wishlist
    • Add
    • Remove
    • Toggle
  • Loyalty
    • Get Program
    • Exchange
    • Reset
  • Comment
    • Add Comment
    • Fetch
    • Get Page Comments
    • Get Product Comments
  • Profile
    • Update profile
    • Update contact
  • Product
    • Get price
    • Product availability
    • Categories
    • Offer details
    • Search products
    • Get Gift Details
    • Add Gift To Cart
    • Upload Gift Image
    • Get Product Details
    • Fetch
    • Fetch Options
    • Size Guides
  • Order
    • Create cart from order
    • Cancel
    • Send invoice
    • Show order
  • Booking
    • Add
  • Rating
    • Order
    • Store
    • Products
    • Shipping
  • Currency
    • Change
    • List
  • Component
    • Reviews
    • Menus
  1. Loyalty

Get Program

This endpoint is used to retrieve the details of the loyalty program sponsored by the store, as well as offer prizes and discounts to attract and retain customers. 
TIP
The get program endpoint has been implemented in the Loyalty Web Component , and It's all setup to save developer's time and effort.

Response#

Success
Error
loyalty.getProgram.success
success
boolean 
success
required
Response flag
status
enum<number> 
status
required
Allowed values:
200201202
data
object 
Loyalty
required
Data is available when the success is true
id
string 
required
The id of the loyalty program
name
string 
required
The title of the loyalty program
description
string 
required
The description of the loyalty program
image
string 
required
An image aatched to the loyalty program
points_validity_by
string 
required
The expiration date to exchange the collected points.
points_validity_value
string 
required
The valid value to exchange the collected points.
prize_promotion_title
string 
required
The promotion prize title.
prize_promotion_description
string 
required
The promotion prize title description
prize_promotion_logo
string 
required
The promotion prize logo image
customer
object 
Customer
required
An object that contains the logged-in customer details.
points
array[object (Point) {10}] 
required
A list for the needed points to be collected in order to win a prize.
prizes
array[object (Prize) {3}] 
required
A of the possible awards to win the loyalty prize.

Usage#

To perform the action of getting a program details, the method order() may be called as below, with the id of the order to be rated.

Events#

This endpoint may trigger two events, the onProgramFetched and onProgramNotFetched events.

onProgramFetched#

This event is triggered when fetching the loyalty program is done without having any errors coming back from the backend.

onProgramNotFetched#

This event is triggered when fetching the loyalty program is not completed and an error has occurred.
Previous
Loyalty
Next
Exchange