Make a REST API To Track Products

In this article, I make a simple REST API for tracking products using IOTA. This Tracking API will be used by products owner to record their products and all data they need about it(location,owner,modifications,time) then the API will push data to tangle then the API will response with the root address to track all products and array of addresses for each product. This array of addresses should be printed as QR code on each product for QR-code reader to update/read data. For the tangle part I used MAM restricted for communication and generate rout and addresses using it. You can found what I do in details here.

The sequence Diagram of the REST API:

API endpoints,Calls,controller and response

Creating Products Post Call

The client need to send all his products information like id,date,details…etc on JSON array:

You might also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

30000
×
×
Ava
IOTA AI
Hi! :-) Do you have any questions about IOTA?
 
AI-generated responses may be inaccurate. Not financial advice.