The State of the State Compliance API
In Washington the Liquor Control Board (LCB) has taken control of the budding Marijuana business. Our Producers, Processors and Retailers – all of them must provide a crazy amount of operational details to the State for compliance reporting. This compliance system also has some APIs exposed which provide a good example of why the State shouldn't be building these systems.
The core problem is there is only one vendor, BioTrackTHC. They constructed this API, provide the documentation and any technical support for this API. The configuration of a government agency and a single vendor working on a system in virtual isolation is just not set up for some awesome win.
Little inconsistencies and plainly missing requirements are indicators of larger problems.
There is basically no testing system. Vendors who which to integrate with API must have a I502 license. This is rather difficult to do. It requires a partnership with one or more licenses just to get a peek at the API. If you the developer can find a licensee who is willing to share the testing option here is just a 'testing' flag – we hope it doesn't interfere with the live data. There is a steep competitive disadvantage for any third party vendors attempting to integrate.
Date and Time data are handled inconsistently. In some places it's a UNIX timestamp (pretty standard). In others is's a formatted time (%m/%d/%Y) and in others it's split into three fields – one each for year, month and day. The fields switch between naming as runonwords and wide_case.
A core component of the State's system is the unique Barcode ID of an asset (Plant, Waste Lot, Inventory, Transfer Manifest). The naming varies in the API between “barcode_id” and “barcodeid”.
Inventory Type has a similar issue. Is it “invtype” or “inventorytype”?
There are some severe problems with the Inventory Transfer too. I'll be covering that in a future post.