This page will detail the entire process of creating a complete Stock Transfer and a complete Purchase Order using the API. The other pages in this section further detail the available API requests for each attribute.
First, in this example, stock will be created for a product:
* Required
† Required Warning - It is currently impossible to create a location using the API.
A pre-existing Location in the back office is required to create the Product Stock, as
Product Stock requires a Location ID.
The orders given above are the most efficient ways of creating a Product Stock entry, a Stock Transfer and a Purchase Order, due to ID dependencies.
The first step in creating a Product Stock is to create the Supplier of the product. This is only required once, for each unique tax rate, and does not need to be re-created for each product.
Documentation on how to create new supplier can be found here.
As creating a Location via the API is currently impossible, for this step, the example request and response will show how to retrieve an existing Location ID by name.
Documentation on how to get list of existing locations can be found here.
The third step is to create the Product Stock. This contains the stock level information for a product at a specific location.
Documentation on how to add new stock can be found here.