patchworks/magento2-connector

Patchworks Connector module for Magento2

1.04 2017-11-02 16:03 UTC

This package is not auto-updated.

Last update: 2025-01-25 00:27:30 UTC


README

The Magento2 Patchworks Connector, provides extensions to the standard Magento2 REST API to give a few extra features that come in handy when importing/exporting data from Magento2.

#Installation To install and enable the module, run the following commands from the root location of your Magento2 installation:

  1. composer require patchworks/magento2-connector
  2. php bin/magento module:enable Patchworks_Connector

#Note This module is still in first release beta.

#About Patchworks http://www.patchworks.co.uk/
Patchworks middleware helps integrate data between different business systems. Check out the website above for more information.

#Key Features

Reindex (GET)
/rest/V1/patchworks/reindex?index={indexName}
Allows a remote system to trigger a reindex process via the REST API.

REST API Error Report
/rest/V1/patchworks/apierror?report={reportNumber}
Allows the remote retrieval of the webapi-X error from the logs folder.

Image Search (GET)
/rest/V1/patchworks/imagesearch?sku={sku}
Allows a remote system to search the /media/import folder for image references that have a file name matching the SKU passed in the URL. Matching images are then returned as an array for use in external systems.

Mass Stock Update (PUT)
/rest/V1/patchworks/stocklevels/
Allowance for external systems to post stock levels on mass, the module then updates the database directly with the new stock level data.

When sending data to this function it expects the following format:

{
    'stock_items': {
        'sku': 'ABC123',
        'qty': 49
    },
    {
        'sku': 'FJ3FF',
        'qty': 23
    }
}

Mass Stock Export (GET)
/rest/V1/patchworks/stocklevels/
Allows the export of all stocklevels from the Magento system in a single call.