Want to build on Pantri?
We're working to open our API to anyone who wants to build on it, without needing to enter a partnership.
We want to enable self organised integration for everyone from a maker with an IoT fruitbowl, to an international grocer.
Here's what you can expect: a simple, clean API using RESTful principles, modern identity and access control infrastructure, and a lean, mean 5 minute install to get a device or application up and running - FAST!
4 Spheres
From a design perspective, the API operates within 3 functionality spheres, with an overarching Pantri ID to handle all user specific content robustly and independently.
Sphere Collections
The API can be best considered as a group of collections within these spheres, that can each independently be used as required for your specific use case.
ID
- Personal Data
- Delivery Address Data
- Payment Details Data
Device
- Activity Reporting
- alter inventory action
- Place an order action
UI
- Device Configuration
- Product
- Inventory
- Rules / Subscriptions
- Orders
- History
Fulfilment
- Retailer Inventory (Price, Product)
- Dispatch Data
- Delivery Completion Data
Maker Apliances
Are you a Maker/electronics enthusiast? Take a look at Maker Appliances www.makerappliances.com which has a range of ideas and kits that are built on the Pantri API.
A Few Examples
A Smart Fridge
Will principally report usage of items - such as 45% milk carton remaining, butter removed and not returned within 5 hours, etc. This data can be used to track inventory - with a specific report either altering inventory levels (as with Milk for example), or in the case of the butter - a binary reorder instruction.
A Smart Fridge With A Screen
If a smart fridge has a screen, then it could have a native Powered by Pantri application, that would also link into the identity and UI API's.
An App
Acts as the dashboard to configure all or part of the Pantri service. Perhaps its an app to go with a Pantri Connected Device - which would limit the functionality to the devices and products relevant to the brand, or it's a retailers online shopping portal - that links any device exclusively to their own retail endpoints.
In either case, the UI sphere enables he platforms to configure the platform, from configuring a users device to track and amend inventory, place orders, and look up account history.
A Retailer / Fulfiller
Finally, a retailer transacting orders from Pantri needs to connect to Pantri in a certain manner. It needs to share information about the products it stocks, recieve orders, and inform the user via Pantri that they've dispatched the item and it has subsequently been delivered (to update inventory where it is tracked).
DEVICE: 2 Ways To Talk
Our API and the way your device interacts with it can be generally boiled down into 2 use cases:
You want to trigger the re-ordering of a specific item
You want to alter the inventory level of a specific item that you are tracking the use of, relying on a low level trigger point that the user sets to re-order the specific item.
Below, we have explained how each use-case would interact with the API.
1. Re-ordering A Specific Item
This is the simplest use-case. The device or app simply needs to place an order on demand. Here are some example use-cases:
An IoT button, where a press needs to action the re-ordering of an item.
A detergent doser in a dishwasher or washing machine that has a low level sensor which when triggered needs to re-order a pre-defined item.
The application or device needs to perform a simple action to complete this process:
Setup
During the setup of the instruction between device or application with the pantri user account, the quantity to re-order of a specific product from a specific retailer is defined.
Once paired, the device or app can call the API to trigger the function.
SINGLE POST
The following submission to the API:
curl "mac_address=D5:6E:FB:B7:B8:C5" [Device Mac Address]
-H "device_id=tYV249c8NA8u" [Device ID supplied by the Powered by Pantri app the device is configured in]
-H "secret=my name is tom" [Set up by the Powered by Pantri app the device is configured in]
Returns the following:
[
// Success
{
"Status": 201,
"Message" : "Done"
}
// Error - Not All Fields Supplied
{
"Status": 400,
"Error" : "Please ensure that you are submitting mac_address, device_id and secret fields in your POST submission."
}
// Error - Incorrect Details In Submission
{
"Status": 401,
"Error" : "MAC Address, Device ID or Secret Key do not match the details set up in the application. Please check and try again."
}
]
Post Setup Trigger
Each time the device or app wants to place an order, the following flow takes place:
2. Altering The Inventory Level Of A Specific Item
Adding more complexity - we often use items incrementally. Lots of these items need to be re-ordered before we completely run out. Some example use-cases:
A storage jar that can read the stored quantity for the item that it stores. The user defines at what level they want the item to be re-ordered.
A dishwasher that runs a cycle, each time using a dishwasher tablet and therefore removing it from a known quantity of inventory. Again, the user defines at what level they want the system to re-order a pre-defined item.
If you're like us, you like the occasional cookie. You don't eat the whole pack in one go (or at least not that often)! So, if you are using a smart cookie jar, you want it to keep track of how many cookies you have left. Re-ordering some more when you drop down to the last 5... or maybe you need to place that order when theres 10 left!
Setup
Setting up inventory tracking is similar to re-ordering a specific item above.