Skip to main content
Skip table of contents

Stock Retrieval API

From a retailers perspective, the stock retrieval API allows them to pull stock values for all of the products, supplied by the fulfillers that they have a dropship connection with. This data could then be used to temporarily disable out-of-stock products on their website, until the items are back in stock.

Retrieving Stock Values from the KornitX Platform

To retrieve stock values from the platform, make a HTTP GET request to the stock retrieval endpoint.

Stock Retrieval Endpoint - https://api-sl-2-2.kornitx.net/stock

Request Headers

The request requires the Basic Authorization header.

Authorization: Basic COMPANYREFID:APIKEY

Don't forget to replace COMPANYREFID and APIKEY with your sales channel company reference ID and API key respectively!

URL Filter Parameters

The Stock Retrieval Endpoint accepts 2 URL filter parameters that are detailed below.

Key

Example Value

Description

dropship_ref

300056

The dropship company ref ID or the value of the External Ref field of the dropship. Used to limit the stock data to only products supplied by the fulfiller belonging to the dropship connection.

changed_since

2023-01-01 00:00:00

Filter that returns only the products that have had their stock value updated since the specified date-time. The date-time value must be in the format “YYYY-MM-DD HH:MM:SS”.

An example of the endpoint including both parameters can be seen below.

https://api-sl-2-2.kornitx.net/stock?dropship_ref=300056&changed_since=2023-01-01 00:00:00

Example Response

JSON
{
    "stock": [
        {
            "linked": [
                {
                    "product": {
                        "id": 8965089,
                        "supplier_sku": "SGS7E-CS-G-TEST",
                        "retail_sku": ""
                    },
                    "variant": null
                }
            ],
            "quantity_available": 50,
            "lead_time_days": 3,
            "daily_capacity": null
        },
        {
            "linked": [
                {
                    "product": {
                        "id": 10503195,
                        "supplier_sku": "AP-P-BK-SSR",
                        "retail_sku": ""
                    },
                    "variant": null
                }
            ],
            "quantity_available": 119,
            "lead_time_days": 2,
            "daily_capacity": null
        }
    ]
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.