Skip to main content

Snag Solutions - API Docs (v 0.1)


What’s Changed


GET /api/loyalty/rule_edits
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Changed property data (array) Changed items (object):
      • Changed property data (object)
        Data that was changed on the rule
        • Changed property metadata (object)
          Optional metadata for the loyalty rule
      • Changed property previousData (object)
        Previous data of the rule before the edit
        • Changed property metadata (object)
          Optional metadata for the loyalty rule
POST /api/loyalty/rule_edits//restore
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Changed property data (object)
      Data that was changed on the rule
      • Changed property metadata (object)
        Optional metadata for the loyalty rule
    • Changed property previousData (object)
      Previous data of the rule before the edit
      • Changed property metadata (object)
        Optional metadata for the loyalty rule
GET /api/loyalty/rule_groups
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Changed property data (array) Changed items (object):
      Schema for a get loyalty rule groups response
      • Changed property loyaltyGroupItems (array) Changed items (object):
        • Changed property loyaltyRule (object)
          • Changed property metadata (object)
            • Added property maxLikes (integer)
              Reaction limit for likes. Once the post reaches this many likes, the Like requirement is hidden from users. Likes are never verified server-side, so this only controls display.
            • Added property maxReposts (integer)
              Reaction limit for reposts. Once the post reaches this many reposts, the Repost requirement is hidden and no longer verified.
            • Added property maxComments (integer)
              Reaction limit for comments. Once the post reaches this many comments, the Comment requirement is hidden and no longer verified.
            • Added property reactionStats (object)
              Latest scraped public reaction counts for the post, written back from social-service (throttled). Drives which reaction requirements are hidden once they hit their configured limit. Not admin-editable.
              • Property likeCount (number)
              • Property repostCount (number)
              • Property commentCount (number)
              • Property syncedAt (string)
GET /api/loyalty/rules
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Changed property data (array) Changed items (object):
      • Changed property metadata (object)
        Optional metadata for the loyalty rule
POST /api/loyalty/rules
Request:
Changed content type : application/json
  • Changed property metadata (object)
    Additional metadata for the loyalty rule
    • Added property maxLikes (integer)
      Reaction limit for likes. Once the post reaches this many likes, the Like requirement is hidden from users. Likes are never verified server-side, so this only controls display.
    • Added property maxReposts (integer)
      Reaction limit for reposts. Once the post reaches this many reposts, the Repost requirement is hidden and no longer verified.
    • Added property maxComments (integer)
      Reaction limit for comments. Once the post reaches this many comments, the Comment requirement is hidden and no longer verified.
    • Added property reactionStats (object)
      Latest scraped public reaction counts for the post, written back from social-service (throttled). Drives which reaction requirements are hidden once they hit their configured limit. Not admin-editable.
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Changed property metadata (object)
      Additional metadata for the loyalty rule
      • Added property maxLikes (integer)
        Reaction limit for likes. Once the post reaches this many likes, the Like requirement is hidden from users. Likes are never verified server-side, so this only controls display.
      • Added property maxReposts (integer)
        Reaction limit for reposts. Once the post reaches this many reposts, the Repost requirement is hidden and no longer verified.
      • Added property maxComments (integer)
        Reaction limit for comments. Once the post reaches this many comments, the Comment requirement is hidden and no longer verified.
      • Added property reactionStats (object)
        Latest scraped public reaction counts for the post, written back from social-service (throttled). Drives which reaction requirements are hidden once they hit their configured limit. Not admin-editable.
POST /api/loyalty/rules/
Request:
Changed content type : application/json
  • Changed property metadata (object)
    Additional metadata for the loyalty rule
    • Added property maxLikes (integer)
      Reaction limit for likes. Once the post reaches this many likes, the Like requirement is hidden from users. Likes are never verified server-side, so this only controls display.
    • Added property maxReposts (integer)
      Reaction limit for reposts. Once the post reaches this many reposts, the Repost requirement is hidden and no longer verified.
    • Added property maxComments (integer)
      Reaction limit for comments. Once the post reaches this many comments, the Comment requirement is hidden and no longer verified.
    • Added property reactionStats (object)
      Latest scraped public reaction counts for the post, written back from social-service (throttled). Drives which reaction requirements are hidden once they hit their configured limit. Not admin-editable.
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Changed property metadata (object)
      Additional metadata for the loyalty rule
      • Added property maxLikes (integer)
        Reaction limit for likes. Once the post reaches this many likes, the Like requirement is hidden from users. Likes are never verified server-side, so this only controls display.
      • Added property maxReposts (integer)
        Reaction limit for reposts. Once the post reaches this many reposts, the Repost requirement is hidden and no longer verified.
      • Added property maxComments (integer)
        Reaction limit for comments. Once the post reaches this many comments, the Comment requirement is hidden and no longer verified.
      • Added property reactionStats (object)
        Latest scraped public reaction counts for the post, written back from social-service (throttled). Drives which reaction requirements are hidden once they hit their configured limit. Not admin-editable.

Result


API changes are backward compatible