Stock API for the retrieval and setting of stock values

Stock API for the retrieval and setting of stock values

KornitX provides a Stock API to allow suppliers to provide up-to-date stock information when stock positions change by making a PUT request to the stock update endpoint.


A retailer can also use the stock API to retrieve stock information by making a GET request to the stock retrieval endpoint.

Use of these API endpoints is optional.

Endpoints


1.1 Updating Stock Levels

Stock levels can be updated using either the fulfiller SKU or the barcode as the identifier of the stock product.  The barcode of a stock product can be found in the eCommerce and Data tab of the product.
For stock updates, there is a simple call that allows the update of stock quantity.  The following provides an example of a call that sets the quantity of two stock products:
curl-X PUT -d"{{"sku":"ABCD","data": {"quantity_available": 10 }},{"barcode": "1234567891011", "data": {"quantity_available":12}} ]'-H "Authorization: Basic <COMPANYREFID>: <APIKEY>" -H"Content-type: application/json" https://api-sl-2-2.custom-gateway.net/stock/availability
where <COMPANYREFID> is your fulfiller company ref ID and where <APIKEY> is the API Key associated with that fulfiller company.

1.2 Retrieving stock levels

A second API end-point allows request and retrieval of stock levels for each stock product via the sales channel company within KornitX.  Use of this endpoint requires fulfillers to keep stock levels up to date for the products that they supply.

An example of the API call and data retrieved is shown below:


curl "https://api-sl-2-2.custom-gateway.net/stock" -H"Authorization: Basic <COMPANYREFID>:<APIKEY>"
where <COMPANYREFID> is your sales channel company ref ID and where <APIKEY> is the API Key associated with that sales channel company.
The following illustrates a sample of the data structure and attributes retrieved by the above API call:

{

   "stock":[

      {

         "linked":[

            {

               "product":{

                  "id":1538144,

                  "supplier_sku":"00884422",

                  "retail_sku":"00884422"

               },

               "variant":null

            }

         ],

         "quantity_available":10000,

         "lead_time_days":0,

         "daily_capacity":0

      },

      {

         "linked":[

            {

               "product":{

                  "id":2947461,

                  "supplier_sku":"FM06231FOC",

                  "retail_sku":""

               },

               "variant":null

            }

         ],

         "quantity_available":0,

         "lead_time_days":0,

         "daily_capacity":0

      }

   ]

}


The API call will return the supplier and retail SKU associated with each stock product visible to the Retailer, variant data (where for example there are linked size options), the quantity available (stock level) and any lead-time and daily capacity metrics set against the stock product.




    • Related Articles

    • Product Integration | Generic API

      Introduction This article has been created to show how to setup the Product integration Kornit X has built to connect to Generic API.  Setup To setup the Generic API integration, please head to your category and within and within the advanced ...
    • Stock Management and Stock API

      A new stock management system has been added. Key features include: Makes use of stock products in CPP. The ability to export and import stock levels. Webhooks that allow retailers to receive stock level updates from suppliers in near realtime. Stock ...
    • Red Bubble API

      Red Bubble is an eCommerce artist portal that hosts millions of artwork designs by independent artists from all around the world. The artwork is available for purchase, on demand, printed on anything from clothing & apparel to home decor & ...
    • Stock Picking Documents - Standard

      An example of the label can be seen below, and in PDF form attached This label contains a Item Description, SKU, Quantity and Item ID Barcode for station scanpoints. Label Dimensions - 110 x 30 MM Examples Purchase Locations -  ...
    • Production Integration - Generic API

      Introduction The Generic API production integration pushes batch data and related order data, in JSON format, to an API endpoint.  The integration makes it easy for fulfillers with in-house developers, to ingest this data and produce jobs outside of ...