Extracting data for external processing

Posted February 19, 2020 by Clark Wilkins

This story begins with a client request for us to supply data for a “storefront” system that they've contracted to another developer. We already have an API for inventory search in stockd, but the client wanted a more detailed access to item data — including all linked photos. It's not our way to just tell the client to use the existing API when we can make something better and give it to all of our clients at once. So we did.

The core of this technique is this URI:

https://YOURCO.mystockd.com/json.php?mode=2&token=YOURTOKEN&search=YOURPARAMETER

So you hand this information off to your "web developer", and they are off and running. Why? It's because they see that this API is trivial to implement. A search I ran in testing for the client who requested it resulted in this (partial screenshot) dump of 64 matching items. (Look at just the first line and you see "found" : 64....)

JSON formatted search results

This data is in JSON format, and your web developer can easily parse it to get everything they need. Here's another look at it to show the structure after parsing.

JSON parsed search results

What you see here is lot of detailed data on matching items including, where available, linked photographs (we obscured the paths to the images for confidentiality reasons). Your developer can take this data and build out customized store fronts, link into other platforms, etc. Yes, this is a bit technical for some of our readers, but we wanted you to know that we work for you, and to be aware of something that can dramatically expand your business capabilities.



prev: defining item costs
next: global information services