Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.snagsolutions.io/llms.txt

Use this file to discover all available pages before exploring further.

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.
      • Changed property rewards (array)
        Array of rewards granted when the badge is achieved
        Changed items (object):
        • Changed property rewardType (string)
          Type of reward (points or multiplier)
          Added enum value:
          • token
POST /api/loyalty/badges
Request:
Changed content type : application/json
  • Changed property rewards (array)
    Array of rewards granted when the badge is achieved
    Changed items (object):
    • Changed property rewardType (string)
      Type of reward (points or multiplier)
      Added enum value:
      • token
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Changed property rewards (array)
      Array of rewards granted when the badge is achieved
      Changed items (object):
      • Changed property rewardType (string)
        Type of reward (points or multiplier)
        Added enum value:
        • token
POST /api/loyalty/badges/
Request:
Changed content type : application/json
  • Changed property rewards (array)
    Array of rewards granted when the badge is achieved
    Changed items (object):
    • Changed property rewardType (string)
      Type of reward (points or multiplier)
      Added enum value:
      • token
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Changed property rewards (array)
      Array of rewards granted when the badge is achieved
      Changed items (object):
      • Changed property rewardType (string)
        Type of reward (points or multiplier)
        Added enum value:
        • token
DELETE /api/loyalty/badges/
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Changed property rewards (array)
      Array of rewards granted when the badge is achieved
      Changed items (object):
      • Changed property rewardType (string)
        Type of reward (points or multiplier)
        Added enum value:
        • token
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 rewardType (string)
          Type of the reward
          Added enum value:
          • token
        • Changed property metadata (object)
          Optional metadata for the loyalty rule
      • Changed property previousData (object)
        Previous data of the rule before the edit
        • Changed property rewardType (string)
          Type of the reward
          Added enum value:
          • token
        • 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 rewardType (string)
        Type of the reward
        Added enum value:
        • token
      • Changed property metadata (object)
        Optional metadata for the loyalty rule
    • Changed property previousData (object)
      Previous data of the rule before the edit
      • Changed property rewardType (string)
        Type of the reward
        Added enum value:
        • token
      • 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 rewardType (string) Added enum value:
            • token
          • Changed property metadata (object)
            • Changed property range (array)
              Array defining ranges and corresponding rewards.
              Changed items (object):
              • Changed property amount (number -> object)
                Reward amount for this range.
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 rewardType (string)
        Type of the reward
        Added enum value:
        • token
      • Changed property metadata (object)
        Optional metadata for the loyalty rule
POST /api/loyalty/rules
Request:
Changed content type : application/json New optional properties:
  • loyaltyCurrencyId
  • Added property tokenReward (object)
    When rewardType is token, provide relayer and either an ERC-20 contract or isNative=true to find or create loyalty currency and onchain token.
    • Property relayerId (string)
      Stratus relayer for token distribution (same network as contract)
    • Property contractId (string)
      ERC-20 contract to reward with; must match relayer network. Required unless isNative is true.
    • Property isNative (boolean)
      When true, reward is the chain native gas token (ETH, MATIC, BNB, …) and contractId is omitted.
  • Changed property metadata (object)
    Additional metadata for the loyalty rule
    • Changed property range (array)
      Array defining ranges and corresponding rewards.
      Changed items (object):
      • Changed property amount (number -> object)
        Reward amount for this range.
  • Changed property loyaltyCurrencyId (string)
    Unique identifier for the loyalty currency. Optional when rewardType is token and tokenReward is provided; backend will find or create the currency from the selected contract.
  • Changed property rewardType (string)
    Type of reward issued by the rule
    Added enum value:
    • token
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json New optional properties:
    • loyaltyCurrencyId
    • Added property tokenReward (object)
      When rewardType is token, provide relayer and either an ERC-20 contract or isNative=true to find or create loyalty currency and onchain token.
    • Changed property metadata (object)
      Additional metadata for the loyalty rule
      • Changed property range (array)
        Array defining ranges and corresponding rewards.
        Changed items (object):
        • Changed property amount (number -> object)
          Reward amount for this range.
    • Changed property loyaltyCurrencyId (string)
      Unique identifier for the loyalty currency. Optional when rewardType is token and tokenReward is provided; backend will find or create the currency from the selected contract.
    • Changed property rewardType (string)
      Type of reward issued by the rule
      Added enum value:
      • token
POST /api/loyalty/rules/
Request:
Changed content type : application/json
  • Added property loyaltyCurrencyId (string)
    Loyalty currency. Optional when rewardType is token and tokenReward is provided; backend resolves the hidden currency from the contract.
  • Added property tokenReward (object)
    When rewardType is token, provide relayer and either an ERC-20 contract or isNative=true to find or create the hidden loyalty currency and onchain token.
    • Property relayerId (string)
      Stratus relayer for token distribution (same network as contract)
    • Property contractId (string)
      ERC-20 contract to reward with; must match relayer network. Required unless isNative is true.
    • Property isNative (boolean)
      When true, reward is the chain native gas token (ETH, MATIC, BNB, …) and contractId is omitted.
  • Changed property metadata (object)
    Additional metadata for the loyalty rule
    • Changed property range (array)
      Array defining ranges and corresponding rewards.
      Changed items (object):
      • Changed property amount (number -> object)
        Reward amount for this range.
  • Changed property rewardType (string)
    Type of reward issued by this rule
    Added enum value:
    • token
Return Type:
Changed response : 200 OK
200
  • Changed content type : application/json
    • Added property loyaltyCurrencyId (string)
      Loyalty currency. Optional when rewardType is token and tokenReward is provided; backend resolves the hidden currency from the contract.
    • Added property tokenReward (object)
      When rewardType is token, provide relayer and either an ERC-20 contract or isNative=true to find or create the hidden loyalty currency and onchain token.
    • Changed property metadata (object)
      Additional metadata for the loyalty rule
      • Changed property range (array)
        Array defining ranges and corresponding rewards.
        Changed items (object):
        • Changed property amount (number -> object)
          Reward amount for this range.
    • Changed property rewardType (string)
      Type of reward issued by this rule
      Added enum value:
      • token

Result


API changes broke backward compatibility