unPLUGDevelopers

Program and catalog API

Get the program

GET/v1/program

Returns the program for the brand that owns the key. Cache it for a few minutes; it changes only when someone edits the program in the unPLUG dashboard.

Permissions: Secret key with program:read, or a member token.

Response fields#

Returns 200 with Program

  • brand_idstring (uuid)
    Your brand.
  • namestring
    The program name guests see, for example Rewards.
  • point_nameobject
    singular and plural, for example Bean and Beans. Use these in your UI instead of the word "points".
    Show attributesHide attributes
    • singularstring
    • pluralstring
  • earningobject
    Show attributesHide attributes
    • typestring
      One of spend, visit
    • points_per_dollarinteger
      When type is spend.
    • points_per_visitinteger
      When type is visit.
    • roundingstring
      One of down
    • earn_onstring
      Points are earned on the subtotal after discounts.
      One of subtotal
  • tiersarray of Tier
    Tiers from lowest to highest. Each has id, name, min_lifetime_points and, when the tier gives one, upgrade_bonus_points (points added once when a member moves up into it). Tiers are based on lifetime points, so spending points never drops a member's tier.
    Show attributesTier
    • idstring (uuid)
    • namestring
    • min_lifetime_pointsinteger
    • upgrade_bonus_pointsinteger
      Points added when a member reaches this tier.
  • default_time_zonestring
    IANA time zone used for anything that has no location, such as birthdays.
  • currencystring
    ISO 4217 code. USD.
  • points_expiryobjectNullableComing soon
    Coming soon { "days_inactive": 365 } when points expire after a period with no activity. Points don't expire at launch, and the field is absent.
    Show attributesHide attributes
    • days_inactiveinteger

Error descriptions#

401Unauthorized
token_expired

The member token is older than 15 minutes. Get a new one from your server.

Any endpoint can also return the common errors.