Gift Card API

Gift Card API

1. Amasty\GiftCard\Api\ImageRepositoryInterface - class for managing gift card images: 
  1. POST /V1/amgcard/image, method="save" - save a gift card image;
  2. PUT /V1/amgcard/image/:id, method="save" - save a gift card image by ID;
  3. DELETE /V1/amgcard/image/:id, method="deleteById" -delete a gift card image by ID;
  4. GET /V1/amgcard/image/:id, method="getById" -get a gift card image by ID;
  5. GET /V1/amgcard/image/all, method="getList" - get a list of all gift card images.
2. Amasty\GiftCard\Api\CodePoolRepositoryInterface -class for managing gift card code pools:
  1. POST /V1/amgcard/code-pool, method="save" - create a code pool;
  2. PUT /V1/amgcard/code-pool/:id, method="save" - edit a specific code pool by ID; 
  3. DELETE /V1/amgcard/code-pool/:id, method="deleteById" - delete a code pool by ID;
  4. GET /V1/amgcard/code-pool/:id, method="getById" - get a code pool data by ID; 
  5. GET /V1/amgcard/code-pool/all, method="getList" - get the list of all code pools.
3. Amasty\GiftCard\Api\CodeGeneratorManagementInterface - class for gift card code generation: 
  1. PUT /V1/amgcard/code-generator/code-pool/:codePoolId/qty/:qty, method="generateCodesForCodePool" - generate gift card codes;
  2. PUT /V1/amgcard/code-generator/code-pool/:codePoolId, method="generateCodesByTemplate" - generate gift card codes by template.

FAQ

Q: Can I get an example of Gift Card account creation via API? 

A: A new gift card account can be created with the following API request: /rest/V1/amgcard/account. It requires specific parameters to be passed in the request body. Please find the example of the request body below:
{
    "account": {
        "code_id": 1,
        "image_id": 1,
        "website_id": 1,
        "status": 1,
        "initial_value": 10,
        "current_value": 6
    }
}

Fill in the values in the request body with the required data. Kindly note that to create a new entity (i.e. for a request with POST type), you don't need to specify the account ID, since it is auto-incremented.



Click the Send button and check the created gift card account in Magento admin. 
      • Related Articles

      • Gift Wrap API

        1. Amasty\GiftWrap\Api\WrapRepositoryInterface - class for managing gift wraps: POST /V1/amasty_giftWrap/wrap, method="save" - create a wrap; PUT /V1/amasty_giftWrap/wrap/:entityId, method="save" - edit a wrap; DELETE ...
      • 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 ...
      • 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, ...
      • 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 ...
      • 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 ...
      • Announcements

      • Already Done in Q1'23

        New features and improvements Order Attributes v3.8.0 NEW now Order Attributes are placed on the PayPal Review Page; we added compatibility with Hyvä Theme for the module. You can find package for installing in composer suggest (Note: the compatibility
      • Roadmap | What to expect in Q1'23

        New features and improvements Improved Layered Navigation generate SEO-friendly URLs for multi-select Category filter; better speed performance of the Apply filters button; improve Category list load time. Special Promotions Pro optimize data types in
      • Already Done in Q4'22

        New Amasty services Make sure your site is well-performing with our E-commerce QA testing service. Let our specialists check various elements of your website and get the issues fixed. The service is available for any e-commerce platform (Magento, Shopify,
      • Roadmap | What to expect in Q4'22

        New features and improvements Elastic Search better performance of synonyms; REST API support. Product Labels enhanced extension performance with a lot of products on the page. Blog Pro posts migration from one Magento instance to another; email notifications
      • Already done in Q3'22

        New solutions Our new SaaS tool - Website SEO Health Check. Discover the most severe SEO mistakes which can damage your website. Available as part of Pro and Premium SEO Toolkit. New features and improvements Import and Export NEW we added the possibility