We have created a
public API collection for Reward Points module with all available queries and sample data that you can both test via our demo endpoints and copy to run local tests in your Magento environment. More details about using public collections can be found in the following
FAQ post.
1. Amasty\Rewards\Api\CheckoutRewardsManagementInterface - class responsible for applying reward points on checkout:
- PUT /V1/carts/mine/points/:points, method="set" - apply points;
- DELETE /V1/carts/mine/points/delete, method="remove" - remove applied points.
2. Amasty\Rewards\Api\GuestHighlightManagementInterface - class responsible for highlighting points for guest users:
- POST /V1/rewards/mine/highlight/product, method="getHighlight" - show points for registration to guest users.
3. Amasty\Rewards\Api\CatalogHighlightManagementInterface - class for managing highlights in the catalog:
- POST /V1/rewards/mine/highlight/product, method="getHighlightForProduct" - display highlights on product pages;
- POST /V1/rewards/mine/highlight/category, method="getHighlightForCategory" - display highlights for category pages.
4. Amasty\Rewards\Api\CheckoutHighlightManagementInterface - class for managing highlights on checkout for logged-in users:
- GET /V1/rewards/mine/highlight/checkout, method="getHighlightByCustomerId" - calculate and display highlights on checkout for registered customers.
5. Amasty\Rewards\Api\RewardsRepositoryInterface - class for managing reward points:
- GET /V1/rewards/mine/balance, method="getBalanceByCustomerId" - show reward points balance on the fontend;
- GET /V1/rewards/mine/history, method="getByCustomerId" - show reward points history on the frontend;
- POST /V1/rewards/management/history, method="getById" - show reward points history in the backend;
- POST /V1/rewards/management/history/:customerId, method="getByCustomerId" - show reward points history for a specific customer in the backend.
6. Amasty\Rewards\Api\ExpirationDateRepositoryInterface - class for managing reward points expiration:
- GET /V1/rewards/mine/expiration, method="getItemsByCustomerId" - show points expiration date on the frontend;
- POST /V1/rewards/management/expiration, method="getById" - show points expiration date in the backend;
- POST /V1/rewards/management/expiration/:customerId, method="getItemsByCustomerId" - show points expiration date for a specific customer in the backend.
7. Amasty\Rewards\Api\RewardsProviderInterface - class for editing reward points balance:
- POST /V1/rewards/management/points/rule, method="addPointsByRule" - add reward points to a specific rule;
- POST /V1/rewards/management/points/add, method="addPoints" - add reward points;
- POST /V1/rewards/management/points/deduct, method="deductPoints" - deduct reward points.
8. Amasty\Rewards\Api\RuleRepositoryInterface - class for managing reward points rules:
- POST /V1/rewards/management/rule, method="save" - create a rule;
- PUT /V1/rewards/management/rule/:ruleId, method="save" - edit a rule;
- DELETE /V1/rewards/management/rule/:ruleId, method="deleteById" - delete a rule;
- GET /V1/rewards/management/rule, method="get" - get information about a rule;
- POST /V1/rewards/management/rule/all, method="getRulesByAction" - get rules by action.