{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"c29e94c1-0fbf-4e84-b3b7-9fc771c1a6ef","name":"Hubwatch API Documentation","description":"Welcome to Hubwatch API Documentation.\n\nUsing this API you can push your data to the blockchain in the form of [Assets](https://documenter.getpostman.com/view/19696378/UVknuGu6#8280ebad-011a-47fb-a88d-00d8f6610d7e) and [Events](https://documenter.getpostman.com/view/19696378/UVknuGu6#7cc1bb4f-8d06-4568-932d-223d2eaaa7df).\n\n# Authentication\n\nBefore you can start interacting with API you need to create an account. An account is a pair: address and private key. Using this key pair, a web3 token can be created to call the API. For more details jump to [Authentication - Token section](https://documenter.getpostman.com/view/19696378/UVknuGu6#f3db9ad1-8915-40e7-9c16-0303927306de)\n\n# Key points\n\n## API URL\n\nThe API is deployed as a part of the blockchain node, hence the URL changes dynamically in terms of IP address used. While implementing, the user must enter the IP address of the server on which the blockchain node is deployed, in order to successfully send data using the API. Highlighted in bold, below is the part which the user needs to replace with their own server IP.\n\nhttp://**13.40.34.231**/auth/getApiToken\n\nhttp://**13.40.34.231**/unova/api\n\n## Unique ID\n\nThis is the unique identifier of each asset in the system. It could be a barcode,GTIN number etc\n\n## Assets Referenced Or Added\n\nAn asset creation will have either of the three phases\n\n1. Commission\n2. Transformation\n3. Aggregation\n    \n\nIn case of Transformation and Aggregation, it is necessary to establish a link between the assets involved in the action, so as to offer complete traceability. 'Assets Referenced Or Added' help in establishing this link.It refers to the UniqueIDs of the parent asset, or UniqueIDs of assets that went into the formation of the current asset.\n\nThis field is not considered during the Commission phase as it is the first occurrence of the asset.\n\n## Internal Operations Flow Mapper (IOFM)\n\nThe purpose of the IOFM is to help you visualize, understand and create the events (or asset creations) that will occur inside your own company. This tool can also be considered as a settings page, that will be used in other aspects of the Hubwatch platform and impact the API. It is thus important to be attentive and mindful when mapping your internal flow, and be accurate with regards to the settings you select.\n\nIn short, the IOFM lets you select and configure asset creations and events in a chronological order to form a chain/flow.\n\nOnce you have added an event type (or asset creation type) to your flow, this will also be the place for testing, validating and visualizing the data you are creating (either via the API or via manual form input).\n\n## Supply Chain Grouping\n\nA single network to which any (global or domestic) supply chain stakeholder can join requires privacy-enabled data distribution clusters and cross-cluster distribution capabilities. Essentially this means that each participant within the network needs to be able to control which stakeholder will receive specific bundles of data. This creates a network within which there will be clusters of supply chain partners, but at the same time, each participant in such a cluster may still receive data from outside this specific cluster (making it cross-cluster). It accommodates supply chain stakeholders being part of multiple supply chains.  \nThe Unova privacy-enabled distribution protocol is specifically designed to attain the above goal.\n\n**Implementation :**\n\n1. The Hubwatch Onboarding platform hosts a partner module, in which the user can add partners to whom data will be distributed to.\n2. While adding a partner, group number(s) needs to be assigned to the partner. This group number is indicative of a set of partners in a single supply chain. This grouping allows the user to create a cluster of relevant partners, and distribute data to that cluster. If there is no group number assigned, group number 1 will be assigned by default.\n3. While creating an asset or an event, the request body contains a parameter ‘groupNumbers’. The user assigns the correct group number(s) to this parameter, specifying to which group(s) this asset/event needs to be distributed to, and creates the data. During data distribution, all the participants in the specified group(s) receive the data for the particular asset/event.\n    \n\nSupply chain grouping enables each participant to keep control over their data at a granular level and decide who they wish to share it with.\n\n# Success Response\n\nResponse consists of following blocks of information\n\n1. Asset/Event Metadata from Blockchain\n2. Bundle Metadata from Blockchain\n3. Contents of data request\n    \n\n# Errors\n\nThe majority of errors along to the error code provide additional information in body with following format  \n{  \n\"reason\": \"What happened\"  \n}\n\n# Immutability\n\nNote:  \nAll data is immutable, therefore, you will not find update or delete calls. However, things could change in a supply chain, which means in this case you may want to create another event in case an update of information is needed.\n\n# Hashing\n\nHashes are a very important part of proving the persistence and the immutability of the data. All hashes in the are computed using the ethereum standard hashMessage function as described in web3 docs. The underlying hash function is Keccak256.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"19696378","team":3137587,"collectionId":"c29e94c1-0fbf-4e84-b3b7-9fc771c1a6ef","publishedId":"2s8Z76vUaQ","public":true,"publicUrl":"https://documenter-api.postman.tech/view/19696378/2s8Z76vUaQ","privateUrl":"https://go.postman.co/documentation/19696378-c29e94c1-0fbf-4e84-b3b7-9fc771c1a6ef","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"399af2"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2023-01-10T09:26:37.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/d0a9e216b50fa8256a23da8bbc824d16a44985f1a903d1bc27efdf79aa5211cc","favicon":"https://res.cloudinary.com/postman/image/upload/v1673342060/team/irkhwmtcb5huuuc5ogkc.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s8Z76vUaQ"}