Product Attachments API

Product Attachments API

API functionality for Product Attachments is available with the API for Product Attachments Add-On only.

1. Amasty\ProductAttachmentApi\Api\FrontendAttachmentInterface - class for getting product attachments on frontend:
  1. GET /V1/amasty_product_attachment/getByProductId, method="getByProductId" - get an attachmetn by product ID;
  2. GET /V1/amasty_product_attachment/getByCategoryId, method="getByCategoryId" - get an attachment by category ID;
  3. GET /V1/amasty_product_attachment/getByFileIds, method="getByFileIds" - get an attachment by file ID.
2. Amasty\ProductAttachmentApi\Api\DownloadFileInterface - class for downloading files:
  1. GET /V1/amasty_product_attachment/download, method="download" - download a file.
3. Amasty\ProductAttachmentApi\Api\UploadFileInterface - class for uploading files (attachments):
  1. POST /V1/amasty_product_attachment/filemanage/uploadFile, method="upload" - upload a file.
4. Amasty\ProductAttachmentApi\Api\BackendAttachmentInterface - class for managed attachments in backend:
  1. GET /V1/amasty_product_attachment/filemanage/:fileId, method="getById" - get information about an attachment;
  2. POST /V1/amasty_product_attachment/filemanage, method="save" - create an attachment;
  3. PUT /V1/amasty_product_attachment/filemanage/:fileId, method="save" - edit an attachment;
  4. DELETE /V1/amasty_product_attachment/filemanage/:fileId, method="deleteById" - delete an attachment;
  5. GET /V1/amasty_product_attachment/filemanage/files, method="getList" - get a list of all attachments.
      • Related Articles

      • Product Attachments | GraphQL methods

        Queries getAmProductAttachmentSettings description: get Product Attachment module settings getAmFiles (ids: [Int]) description: get info about uploaded files
      • How to add product attachments to a CMS page?

        Product attachments can be added to CMS pages via Magento widgets, and there are two methods to do that. Method #1 Step 1. At Magento admin → Content → Widgets, create a widget of the Amasty Attachments Block type, choose Design Theme and click ...
      • 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 - ...
      • 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 ...
      • Product Labels API

        Amasty\Label\Api\LabelRepositoryInterface - class for managing lables: GET /V1/amasty_labels/get/:id, method="getById" - get information about a label; DELETE /V1/amasty_labels/delete/:id, method="deleteById" - delete a label; POST ...