NAV Navbar
shell ruby python javascript

<< Back to main site

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.





Maker Apliances

Are you a Maker/electronics enthusiast? Take a look at Maker Appliances 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:

  1. You want to trigger the re-ordering of a specific item

  2. 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:

The application or device needs to perform a simple action to complete this process:


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.


      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:

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!


Setting up inventory tracking is similar to re-ordering a specific item above.