Check stock
Last updated
Was this helpful?
Last updated
Was this helpful?
The Check stock API endpoint receives an SKU parameter for a particular product. The SKU can be found in the Shopify variant sku
attribute.
In return, DotApparel will respond with a list of inventory locations, identified by their Apparel21 store ID, and the current stock level for each location. This data should be matched with the enriched store data stored elsewhere, and displayed to the customer.
Make a GET
request to /apps/dotapparel/api-checkStock?sku=
from the frontend of your Shopify store. This uses the to pass the request through to the DotApparel backend for calculation.
For example, if the Shopify sku is 9328088450762
, you can make a GET
request to /apps/dotapparel/api-checkStock?sku=9328088450762
The response will look like the example below.
Each entry in the data
array corresponds to a store in which that product is stocked. If a store is missing, it means that the item is not currently stocked at that location.
The storeId
and storeNumber
attributes are taken directly from Apparel21. The storeId
is a unique ID that Apparel21 assigns to the store, which makes be different between Apparel21 instances. The storeNumber
attribute is manually entered by your administrator when setting up stores. Therefore, we recommend using storeNumber
to identify stores.