Automatic Related Products API

Automatic Related Products API

1. Amasty\Mostviewed\Api\GroupRepositoryInterface - class for managing related product rules.
  1. POST /V1/amasty_mostviewed/rules", method="save" - create a rule;
  2. PUT /V1/amasty_mostviewed/rules/:groupId, method="save" - edit a rule;
  3. DELETE /V1/amasty_mostviewed/rules/:groupId", method="deleteById" - delete a rule by its ID;
  4. GET /V1/amasty_mostviewed/rules/:groupId", method="getById" - get a rule by its ID;
  5. GET /V1/amasty_mostviewed/rules", method="getList" - get a list of rules.

2. Amasty\Mostviewed\Api\ProductGroupResolverInterface - class for managing rules for product pages.
  1. GET /V1/amasty_mostviewed/rules/product-group-by-id", method="getGroupByProductIdAndPosition" - get a group for product pages by product ID and position;
  2. GET /V1/amasty_mostviewed/rules/product-group-by-sku", method="getGroupByProductSkuAndPosition" - get a group for product pages by product and position

3. Amasty\Mostviewed\Api\CategoryGroupResolverInterface - class for managing rules for category pages.
  1. GET /V1/amasty_mostviewed/rules/category-group", method="getGroupByCategoryIdAndPosition - get a group for category pages by category ID and position.

4. Amasty\Mostviewed\Api\CartGroupResolverInterface - class for managing rules for shopping cart pages.
  1. GET /V1/amasty_mostviewed/rules/guest-cart-group/:maskedCartId", method="getGroupByMaskedQuoteIdAndPosition" - get a group for shopping cart pages by positiob for not logged-in customers;
  2. GET /V1/amasty_mostviewed/rules/cart-group", method="getGroupByQuoteIdAndPosition" - get a group for shopping cart pages.

5. Amasty\Mostviewed\Api\CustomGroupResolverInterface - class for managing rules with custom positions (for example, CMS pages).
  1. GET /V1/amasty_mostviewed/rules/custom-group", method="getGroup"- get a group with custom position by its ID;
  2. GET /V1/amasty_mostviewed/rules/custom-group-for-product", method="getGroupForProduct" - get a group with custom position by product ID;
  3. GET /V1/amasty_mostviewed/rules/custom-group-for-guest-cart/:maskedCartId", method="getGroupForGuestCart" - get a group with custom position for not logged-in user shopping cart page;
  4. GET /V1/amasty_mostviewed/rules/custom-group-for-customer-cart", method="getGroupForCart" - get a group with custom position for users on shopping cart page. 

      • Related Articles

      • Automatic Related Products | GraphQL methods

        Queries amMostviewedGroups -(uid: String!, position: String) description: get information about related product rules amMostviewedBundlePacks (uid: String) description: get information about bundle packs
      • What Amasty extensions support API?

        Each Amasty extension that has API support, includes the etc/webapi.xml file. The webapi.xml file contains API configurations with the list of available API requests. For example, a request from the Custom Form module interface: 1 - endpoint URL; 2 - ...
      • One Step Checkout API

        1. Amasty\Checkout\Api\AdditionalFieldsManagementInterface - class for managing additional fields for logged-in users: POST /V1/amasty_checkout/carts/:cartId/amcheckoutFields, method="save" - save a field for a specific cart by ID; POST ...
      • Product Parts Finder API

        1. Amasty\Finder\Api\DropdownRepositoryInterface - class for managing parts finder dropdowns: POST /V1/amasty_finder/dropdown, method="save" - create a dropdown; PUT /V1/amasty_finder/dropdown/:id, method="save" - edit a dropdown; DELETE ...
      • Store Pickup API

        1. Amasty\StorePickup\Api\GuestShippingMethodManagementInterface - class for managing shipping methods on guest checkout: POST /V1/guest-carts/:cartId/estimate-shipping-methods, method="estimateByExtendedAddress" - displays available shipping methods ...