Skip to main content

How can I use the Pickware API for automation?

Pickware API for Shopware 6: GraphQL API access, REST endpoints with a Postman collection, and stock bookings from external systems.

In this article, we show you how to use our API to automate various warehouse and stock management tasks. Our API gives you flexible options to ship orders, manage stock levels, and retrieve product information.

Note: In the long term, the REST API described here is intended to be replaced by the new GraphQL API. The GraphQL API is not yet enabled for Shopware 6, so until then you use the REST API described here.

API documentation and Postman collection

To make it easier for you to get started, you will find a Postman collection attached. Postman is a free tool for API development and testing that allows developers to create and test API requests. The collection contains detailed information on all available endpoints, request formats, and expected responses. It also includes example requests that you can run in your test environment.

You can find the download link to the collection at the end of this article. You can import it into Postman as described here.

To access the REST API via the Postman collection, create a new integration in the Shopware Admin. Enter the ID and the secret key generated in the process into the Postman collection.

Available endpoints

Our API for warehouse and stock management currently gives you access to a number of endpoints designed specifically to optimize warehouse and stock processes. Here is an overview of the available endpoints:

  1. POST Ship order completely: This endpoint allows you to mark an order as completely shipped. The stock of the products in the order is booked out in the process.

  2. POST Move stock to and from stock locations: With this endpoint, you can move stock between different stock locations. This endpoint can also be used to stock and destock items.

  3. POST Get all stocks by bin location id: This endpoint returns a list of all stocks located on specific bin locations, sorted by the ID of the bin location.

  4. POST Get all stocks by bin location code: Similar to the previous endpoint, this endpoint returns a list of all stocks on a bin location, but the search & sorting is done by the bin location code.

  5. GET Get product stock: With this endpoint, you can query the current stock of a specific product.

  6. PATCH Update total product stock: This endpoint allows you to update the available stock of a product. Based on the stock you enter, either stocking or destocking is performed according to our booking strategy.

Booking stock from external systems

If an external system such as a fulfillment provider or a cash register system is supposed to change stock in Pickware, use the Pickware endpoints for this. Two obvious approaches do not lead to the desired stock booking:

  • Setting the delivery status to shipped: This only changes the state. Stock is only booked out when shipping via the Ship order button on the order, via the WMS App, or via the POST Ship order completely endpoint.

  • Writing the Shopware field stock: If an external system writes to the stock field via the Shopware API, Pickware sets the available stock to this value and books stock in or out of the warehouse accordingly.

For stock changes from external systems, use POST Move stock to and from stock locations (/api/_action/pickware-erp/stock/move) instead. Specify unknown as the source. As the destination, specify destination.binLocation.id, or destination.warehouse.id for the default bin location of a warehouse.

Attention: Generic endpoints such as pickware-erp-goods-receipt are not intended for creating or deleting. Follow-up processes such as price calculation and stock booking do not run correctly in that case.

Support and feedback

If you have any questions or need support using the API, our support team is happy to help. Do not hesitate to contact us if you have suggestions or feedback on how to improve our API. Here you can access the contact form.

Did this answer your question?