{"info":{"_postman_id":"f084b64e-9f82-4712-a92f-1c25851e4857","name":"Basic deal","description":"<html><head></head><body><p>The basic deal shows the siplest case of a transaction among nodes.</p>\n<p>The participant called Sender initiates deal at the first node. The second participant called Receiver detects deal initiating at the other node.  </p>\n<p>Transaction parties</p>\n<p>Sender, Receiver</p>\n<p>The script consists of the following sequential steps:</p>\n<ol>\n<li>At <code>Sender</code> node create a Deal with the parallel setting the <code>Created</code> state</li>\n<li>Make sure at <code>Receiver</code> node the Deal exists and status is equal to <code>Created</code></li>\n</ol>\n<p> Attention! Attention! In the call case the ID is replaced with (UID) - you need to replace it with your obtained ID when creating the Deal at Step 1.</p>\n<p> Attention! In queries in the heading ** CHANNEL **, ** AUHORIZATION ** you must use the personal identifier you received during registration. This will allow not to interfere with the simultaneous work of several users, as well as facilitate the work of the Technical Support service if you have any questions. The query examples use the personal identifier Demo.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"10819849","collectionId":"f084b64e-9f82-4712-a92f-1c25851e4857","publishedId":"SzYgPtzV","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-04-09T13:39:11.000Z"},"item":[{"name":"1.Basic deal creation (Sender node)","event":[{"listen":"test","script":{"id":"d3fd101e-ae4b-455a-9084-99e79b8117df","exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200]);","    ","    ","});","","var data  = JSON.parse(responseBody);","pm.collectionVariables.set(\"DealUID\", data);","","if(responseCode.code != 200 )","{","    postman.setNextRequest(null);","}","else","{","   setTimeout(()=>{}, 300000);","   postman.setNextRequest('2.Cheking for deal (Receiver node)');","}","//"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"69ed590d-266d-4e66-a712-c5a8f70c6f68","exec":[""],"type":"text/javascript"}}],"id":"42e51471-fad9-40ea-8c10-35b4493fe85d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"warning":"Key contains invalid whitespace characters.","key":"Channel","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"dealUid\": null,\r\n  \"kind\": \"FirstDeal\",\r\n  \"parties\": [\r\n    {\r\n      \"key\": \"CLIENT1\",\r\n      \"role\": \"Sender\"\r\n    },\r\n    {\r\n      \"key\": \"CLIENT2\",\r\n      \"role\": \"Reciever\"\r\n    }\r\n  ],\r\n  \"status\": \"Created\"\r\n}"},"url":"https://QRM1.kekker.com/api/deals","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":""},{"key":"password","value":""}]},"isInherited":true,"source":{"_postman_id":"f084b64e-9f82-4712-a92f-1c25851e4857","id":"f084b64e-9f82-4712-a92f-1c25851e4857","name":"Basic deal","type":"collection"}},"urlObject":{"protocol":"https","path":["api","deals"],"host":["QRM1","kekker","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"42e51471-fad9-40ea-8c10-35b4493fe85d"},{"name":"2.Cheking for deal (Receiver node)","event":[{"listen":"test","script":{"id":"682de9e1-b1ca-43a5-8dd4-ef950f762d87","exec":["pm.test(\"Successful Get request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200]);","});","","","pm.test(\"State equals Created\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.status).eq(\"Created\");","","});",""],"type":"text/javascript"}}],"id":"b826b435-a84d-45ab-aebd-18eb4024b787","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"accept":true}},"request":{"method":"GET","header":[{"key":"Channel","type":"text","value":""}],"url":"http://QRM2.kekker.com/api/deals/","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":""},{"key":"password","value":""}]},"isInherited":true,"source":{"_postman_id":"f084b64e-9f82-4712-a92f-1c25851e4857","id":"f084b64e-9f82-4712-a92f-1c25851e4857","name":"Basic deal","type":"collection"}},"urlObject":{"protocol":"http","path":["api","deals",""],"host":["QRM2","kekker","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"b826b435-a84d-45ab-aebd-18eb4024b787"}],"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":""},{"key":"password","value":""}]}},"event":[{"listen":"prerequest","script":{"id":"45113f31-909f-4e7b-bd78-a554939d0152","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b16ef510-062b-4887-8831-4939934bc08f","type":"text/javascript","exec":[""]}}],"variable":[{"key":"DealUID","value":""},{"key":"LOGIN","value":""},{"key":"PASSWORD","value":""},{"key":"CHANNEL_ID","value":""}]}