Overview

Welcome to the Developer Guide for Shopware ERP powered by Pickware.

Shopware ERP powered by Pickware (or Shopware ERP, as it will be called for brevity’s sake in the rest of this guide) is a plugin for Shopware 5 which adds stock management capabilities to Shopware. As such, it is mostly concerned with managing warehouses, bin locations inside those warehouses, and product stock on those bin locations. In addition to this, Shopware ERP provides features for creating supplier orders and stocking the resulting deliveries, processing orders returned by the customers as well as creating barcode labels for products and bin locations.

Shopware ERP provides two distinct types of public API:

  1. The Shopware ERP PHP API, which can be accessed by any PHP code running alongside Shopware ERP within the same Shopware instance, and
  2. The Shopware ERP REST API, which extends Shopware’s REST API with dedicated endpoints.

Which of these should be used depends on the type of software to be integrated with Shopware ERP:

  • External systems which are deployed on a different server and need to synchronize data continuously should use the REST API.
  • Shopware plugins, including bespoke Shopware extensions developed for an individual project, should use the PHP API.
  • Batch import jobs, which are run based on a schedule or even manually may use both approaches.

Batch import jobs can either be written as an independent application which performs the batch import via the REST API, or as a plugin that adds a console command to Shopware which in turn uses the PHP API to import data from one or more files passed on the command line. Which of these options is better depends on the concrete use case, deployment scenario and required performance characteristics. An independent application using the REST API does not have to reside on the same machine as the Shopware environment but can be run anywhere with an internet connection. On the other hand, using the PHP API eliminates the overhead of making network requests, which may result in a critical performance advantage for throughput-heavy workloads.

In addition to this, the required API capabilities are an important consideration for all types of integration. The REST API focuses on managing warehouse entities, shipping orders and moving stock in and out of warehouses. All capabilities provided by the REST API are also available through the lower-level PHP API. However, the PHP API also allows modifying the system’s behavior to a certain extent by using the Shopware hook events system and decoration.