Extra Fee API

Extra Fee API

1. Amasty\Extrafee\Api\TotalsInformationManagementInterface - class for managing cart totals for logged-in users:
  1. POST /V1/amasty_extrafee/carts/:cartId/totals-information, method="calculate" - calculate totals of a specific cart;
  2. POST /V1/amasty_extrafee/carts/mine/totals-information, method="calculate" - calculate totals of the current cart.

2. Amasty\Extrafee\Api\GuestTotalsInformationManagementInterface - class for managing cart totals for guest users:
  1. POST /V1/amasty_extrafee/guest-carts/:cartId/totals-information, method="calculate" - calculate cart totals of a guest user.

3. Amasty\Extrafee\Api\FeesInformationManagementInterface - class for managing fees for logged-in users:
  1. POST /V1/amasty_extrafee/carts/:cartId/fees-information, method="collect" - display fees for a specific cart;
  2. POST /V1/amasty_extrafee/carts/mine/fees-information, method="collect" - display fees for the current cart.

4. Amasty\Extrafee\Api\GuestFeesInformationManagementInterface - class for getting fees for guest customers:
  1. POST /V1/amasty_extrafee/guest-carts/:cartId/fees-information, method="collect" - display fees available for guest users.

5. Amasty\Extrafee\Api\FeeRepositoryInterface - class for managing fees in backend:
  1. POST /V1/amasty_extrafee/fee, method="save" - create a fee;
  2. PUT /V1/amasty_extrafee/fee/:feeId, method="save" - edit a fee;
  3. DELETE /V1/amasty_extrafee/fee/:feeId, method="deleteById" - delete a fee;
  4. GET /V1/amasty_extrafee/fee, method="getById" - get information about a fee;
  5. GET /V1/amasty_extrafee/fee/all, method="getList" - get a list with all fees.

FAQ

Q: We would like to get the information about the order and its fees via API. How are fees represented in an order, and how can we get them?

A: Details regarding fees per each order should be received via the /rest/all/V1/orders query:



In case you require to get the details via the Extra Fee name, an additional query should be added as follows: GET /rest/all/V1/amasty_extrafee/fee?feeId={FEE-ID}, where {FEE-ID} is an ID from the /rest/all/V1/orders response.

As a result, the detailed info regarding the fee should be received:

      • Related Articles

      • Advanced Conditions API (+Reward Points, Extra Fee, Free Gift, Shipping Rules, Shipping Restrictions)

        Advanced Conditions can be purchased both separately and within other Amasty modules: Reward Points, Extra Fee, Free Gift, Shipping Rules, Shipping Restrictions. The Advanced Conditions extension adds its functionality to the main modules, which ...
      • Extra Fee | GraphQL methods

        Queries getListFeeItems description: get a list of created fees getFeeItemsForQuote(cart_id: String!) description: get a list of fees available in the current cart getFeeOptions(fee_id: Int!, store_id: Int!) description: get a list of fee options ...
      • 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 - ...
      • 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 ...
      • Reward Points API

        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 ...