Fetch Triggers (Aggregated Earning Rules)

Fetches the aggregated earning rules of your loyalty program, i.e. the triggers through which a customer can earn (signup, purchase, review, referral, birthday, social follows and so on).

  • Only triggers that are active and visible are returned, ordered by their position as configured on the dashboard
  • Pass content_types to fetch only earn or only social triggers
  • Pass lead_id to also get activities, the number of times that customer has already completed each trigger (useful to show completed / pending state in the UI)
  • Triggers of reward_type offer carry the linked offer object so the reward coupon can be rendered without an extra call
  • Use this API along with Fetch Aggreegated Details (program settings) and Fetch Aggreegated Offers (redemption rules) to render the complete loyalty program on your app or website
  • Prefer cachefront.nector.io for this call

Response data contains

  • items: array of triggers (_id, slug, name, content_type, reward_type, rule_type, render_type, reward, rule, content, position, is_open, is_override, offer)
  • count: total number of matching triggers
  • activities: array of { trigger_id, count } for the given lead_id (empty array when lead_id is not passed)
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
uuid

(This needs to be triggers _id value) (Fetch a single trigger)

uuid

(This needs to be leads _id value) (When passed, activities array in the response contains the completion count of each trigger for this customer)

content_types
array of strings

(This can only be one of earn,social) (Pass multiple times to include more than one content type, ex. content_types=earn&content_types=social) (Defaults to all)

content_types
Allowed:
number
≥ 1

(Minimum is 1) (Defaults to 1)

number
1 to 100

(Minimum is 1) (Maximum is 100) (Defaults to 20)

Headers
string
enum
required

(Required) (This can only be one of mobile,web) (web for browsers and servers, mobile for native apps)

Allowed:
string
required

(Required) (This needs to be your apikey) (Read only api key is sufficient)

string
required

(Required) (This needs to be your workspaceid)

Responses

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json