Skip to main content

Snag Solutions - API Docs (v 0.1)


What’s Changed


GET /api/loyalty/badges
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Changed property data (array) Changed items (object):
      Response returned upon successful fetching of the badges.
      • Added property rewards (array)
        Array of rewards granted when the badge is achieved
        Items (object):
        • Property id (string)
          UUID of the badge reward
        • Property rewardType (string)
          Type of reward (points or multiplier)
          Enum values:
          • points
          • multiplier
          • badge
        • Property loyaltyCurrencyId (string)
          UUID of the loyalty currency for this reward
        • Property loyaltyCurrencyIds (array)
          Array of loyalty currency IDs for multiplier rewards (empty means all currencies)
          Items (string):
        • Property amount (number)
          Points amount to reward (for points reward type)
        • Property multiplier (number)
          Multiplier to reward (for multiplier reward type)
        • Property isRetroactive (boolean)
          Whether the multiplier should be applied to the user’s existing balance
      • Changed property loyaltyBadgeUsers (array)
        Array of user badges
        Changed items (object):
        • Added property completedAt (string)
          The date and time the user badge was granted
POST /api/loyalty/badges
Request:
Changed content type : application/json
  • Added property rewards (array)
    Array of rewards granted when the badge is achieved
    Items (object):
    • Property rewardType (string)
      Type of reward (points or multiplier)
    • Property loyaltyCurrencyId (string)
      UUID of the loyalty currency for this reward
    • Property loyaltyCurrencyIds (array)
      Array of loyalty currency IDs for multiplier rewards (empty means all currencies)
    • Property amount (number)
      Points amount to reward (for points reward type)
    • Property multiplier (number)
      Multiplier to reward (for multiplier reward type)
    • Property isRetroactive (boolean)
      Whether the multiplier should be applied to the user’s existing balance
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Added property rewards (array)
      Array of rewards granted when the badge is achieved
    • Changed property loyaltyBadgeUsers (array)
      Array of user badges
      Changed items (object):
      • Added property completedAt (string)
        The date and time the user badge was granted
POST /api/loyalty/badges/
Request:
Changed content type : application/json
  • Added property rewards (array)
    Array of rewards granted when the badge is achieved
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Added property rewards (array)
      Array of rewards granted when the badge is achieved
    • Changed property loyaltyBadgeUsers (array)
      Array of user badges
      Changed items (object):
      • Added property completedAt (string)
        The date and time the user badge was granted
DELETE /api/loyalty/badges/
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Added property rewards (array)
      Array of rewards granted when the badge is achieved
    • Changed property loyaltyBadgeUsers (array)
      Array of user badges
      Changed items (object):
      • Added property completedAt (string)
        The date and time the user badge was granted

Result


API changes are backward compatible