Stock

Make sure you familiarize yourself with the following important concepts of our API:
Prices and Quantities, Products and Articles, Sync Markers
After taking the time to understand these concepts, you will much better understand the basics of our API.

Introduction

When you’re developing an application that can display articles and/or create orders, you might be interested in knowing the exact stock of an article. Retrieving the available stock is done through a separate API method.

Contents

getStock Retrieving current stock for one or more articles

You can specify a stockId (similar in function to a syncMarker) to limit the results to changed stock since a specific moment.
Learn more about sync markers here.


Stock information takes the form of an array containing arrays of the following form:

array(
  'stockId' => 9842, // The stockId (syncMarker) of this stock item, register the highest value to use the next time you are synchronizing stock.
  'amountFree' => 10, // The available stock that can be safely sold.
  'amountReserved' => 3, // The stock that is currently reserved in undelivered orders.
  'amountIncoming' => 20, // The stock that is incoming through procurement orders.
)

getStockHistoryV2 Retrieving each individual change of the stock

You can specify a sinceStockId (similar in function to a syncMarker) to limit the results to changed stock since a specific moment.
Learn more about sync markers here.

You can also specify fromFinancialDateTime and throughFinancialDateTime to limit the results.


updateStock Relatively update stock for an article


setStock Absolutely set stock for an article