{"info":{"_postman_id":"03ab5ea1-3c15-40a5-a048-aa53194068f2","name":"Smart-voucher API","description":"<html><head></head><body><p>Here is the documentation for developers, which introduces the methods of this API. </p>\n<p>As a core platform has been used the Headless CMS Strapi.</p>\n<p>API use protected HTTPS protocol for all endpoints.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"6846240","collectionId":"03ab5ea1-3c15-40a5-a048-aa53194068f2","publishedId":"T1DjjK9k","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-07-17T18:51:17.000Z"},"item":[{"name":"Webshop requests","item":[{"name":"Get all webshops","id":"83c5ba35-a122-47e4-8a07-5d09e26a3077","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/webshops","description":"<p>Request type - <code>GET</code></p>\n<br />\n\n\n<p>Returns an array of public information of available webshops.</p>\n","urlObject":{"path":["webshops"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"83c5ba35-a122-47e4-8a07-5d09e26a3077"},{"name":"Get webshop data","id":"7ea65c20-c99e-41c7-88fa-61826718c50b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/webshops/0x89ce9ec30e2e761ec2ceaae8dd54f3174b00901d","description":"<p>Request type - <code>GET</code></p>\n<br />\n\n\n<p>Returns the publici data of the certain webshop:</p>\n<ul>\n<li><code>:wallet</code>: Ethereum address of the certain webshop (<em>required</em>)</li>\n</ul>\n","urlObject":{"path":["webshops","0x89ce9ec30e2e761ec2ceaae8dd54f3174b00901d"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"7ea65c20-c99e-41c7-88fa-61826718c50b"},{"name":"Register webshop","id":"9b4556ec-d8a7-4824-b603-e89c9189473c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"wallet\": \"0xa7DD6E42EF9728DBE4793481b9b8E0703542a786\",\n    \"website\": \"www.amazon.com\",\n    \"email\": \"support@amazon.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/webshops","description":"<p>Request type - <code>POST</code></p>\n<br />\n\n\n<p>For webshop registrations requester should provide:</p>\n<ul>\n<li><code>wallet</code>: Ethereum address which should be used for interaction in the future (<em>required</em>)</li>\n<li><code>website</code>: The URL address of webshop (<em>required</em>)</li>\n<li><code>email</code>: As a main contact (<em>required</em>)</li>\n</ul>\n","urlObject":{"path":["webshops"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"9b4556ec-d8a7-4824-b603-e89c9189473c"},{"name":"Add partners","id":"cd1bc504-1dea-4b47-9865-8630fbe92396","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"webshopAddr\": \"0xa7DD6E42EF9728DBE4793481b9b8E0703542a786\",\n    \"partners\": [\"0x73fE69895d372d202813da156E036fbecA9E920C\", \"0xCfFCFd807Cdb5d36484b97418a057a1544c26240\"],\n    \"nonce\": \"9\",\n    \"signature\": \"0x8ef3f4b52e77b7f736f27bb28e4a3e8ce29db40057c222496d66547554a435c66bac75b7f9cd01595f133a2fbce21f0d3fbd7fd54e7cc4d6a05176497658160f1b\"\n}\n\n","options":{"raw":{"language":"json"}}},"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/webshops/addPartners","description":"<p>Request type - <code>POST</code></p>\n<br />\n\n\n<p>For adding partner the webshop should provide:</p>\n<ul>\n<li><code>webshopAddr</code>: Ethereum address of initiator webshop (<em>required</em>)</li>\n<li><code>partners</code>: Array of ethereum addresses of selected partners (<em>required</em>)</li>\n<li><code>nonce</code>: Nonce of initiator webshop, it can be found on on <strong>Get webshop data</strong> response (<em>required</em>)</li>\n<li><code>signature</code>: Signed data done with initiator webshops' private key (<em>required</em>)</li>\n</ul>\n","urlObject":{"path":["webshops","addPartners"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"cd1bc504-1dea-4b47-9865-8630fbe92396"},{"name":"Remove partners","id":"8df7ab07-3928-4698-9c1d-d568073135d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"webshopAddr\": \"0xa7DD6E42EF9728DBE4793481b9b8E0703542a786\",\n    \"partnerAddr\": \"0x9C16c04bDA8904EC30a0D7045b276a3c66012Fd3\",\n    \"nonce\": \"10\",\n    \"signature\": \"0xe517b18286dd840c47b323eb56fc94f89de8dad0f4c4a167afa4245626a53d6d7ce9faa14139be3a4b20b2858291bf6a4788a1ec0f64b819102267888e0291981c\"\n}","options":{"raw":{"language":"json"}}},"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/webshops/removePartner","description":"<p>Request type - <code>POST</code></p>\n<br />\n\n\n<p>Similar to <strong>Add partner</strong> request, for removing partner the webshop should provide:</p>\n<ul>\n<li><code>webshopAddr</code>: Ethereum address of initiator webshop (<em>required</em>)</li>\n<li><code>partners</code>: Array of Ethereum address of selected partners (<em>required</em>)</li>\n<li><code>nonce</code>: Nonce of initiator webshop, it can be found on on <strong>Get webshop data</strong> response (<em>required</em>)</li>\n<li><code>signature</code>: Signed data done with initiator webshops' private key (<em>required</em>)</li>\n</ul>\n","urlObject":{"path":["webshops","removePartner"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"8df7ab07-3928-4698-9c1d-d568073135d0"}],"id":"cf3e9c3f-2f3b-4030-9f53-adac61065e5f","description":"<p>The /webshop endpoint created for webshops creation, adding and removing partners. The public methods allowed participants to create new webshops, add and remove partner from existing webshop, get a list of webshops or information about certain webshop.</p>\n","event":[{"listen":"prerequest","script":{"id":"6d83a711-eb53-47b9-84b7-b2e583453fb8","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"0df760d5-d31c-4060-bc02-377f33a4480b","type":"text/javascript","exec":[""]}}],"_postman_id":"cf3e9c3f-2f3b-4030-9f53-adac61065e5f"},{"name":"Voucher requests","item":[{"name":"Redeem voucher","id":"73759286-f0a0-4596-b4fc-8a14ef90473e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"webshopAddr\": \"0xa7DD6E42EF9728DBE4793481b9b8E0703542a786\",\n    \"amount\": \"50\",\n    \"voucherId\": \"7\",\n    \"nonce\": \"0\",\n    \"signature\": \"0x203d22a7a3e5ca0d88bcf2e02f2670f2bdc561dbf3c4bcd417d92fc70d6eaac370ac5161c16585da852f09f58eb3b1cc8817cf35c7ea4af669a7e787568ad7cc1b\"\n}","options":{"raw":{"language":"json"}}},"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/vouchers/redeem","description":"<p>Request type - <code>POST</code></p>\n<br />\n\n<p>For redeem voucher webshop should provide:</p>\n<ul>\n<li><code>webshopAddr</code>: Ethereum address of initiator webshop (<em>required</em>)</li>\n<li><code>amount</code>: Amount which should be redeemed (<em>required</em>)</li>\n<li><code>voucherId</code>: Numerical voucher ID (<em>required</em>)</li>\n<li><code>nonce</code>: Nonce of initiator webshop, it can be found on on <strong>Get webshop data</strong> response (<em>required</em>)</li>\n<li><code>signature</code>: Signed data done with initiator webshops' private key (<em>required</em>)</li>\n</ul>\n","urlObject":{"path":["vouchers","redeem"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"73759286-f0a0-4596-b4fc-8a14ef90473e"},{"name":"Create new voucher","id":"cbffee09-4428-4ef9-a2b6-da9e4fd3058f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"webshopAddr\": \"0xa7DD6E42EF9728DBE4793481b9b8E0703542a786\",\n    \"amount\": \"\",\n    \"nonce\": \"\",\n    \"signature\": \"0x8ef3f4b52e77b7f736f27bb28e4a3e8ce29db40057c222496d66547554a435c66bac75b7f9cd01595f133a2fbce21f0d3fbd7fd54e7cc4d6a05176497658160f1b\"\n}","options":{"raw":{"language":"json"}}},"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/vouchers","description":"<p>Request type - <code>POST</code></p>\n<br />\n\n<p>For creat new voucher webshop should provide:</p>\n<ul>\n<li><code>webshopAddr</code>: Ethereum address of initiator webshop (<em>required</em>)</li>\n<li><code>amount</code>: Amount of vouchere (<em>required</em>)</li>\n<li><code>nonce</code>: Nonce of initiator webshop, it can be found on on <strong>Get webshop data</strong> response (<em>required</em>)</li>\n<li><code>signature</code>: Signed data done with initiator webshops' private key (<em>required</em>)</li>\n</ul>\n","urlObject":{"path":["vouchers"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"cbffee09-4428-4ef9-a2b6-da9e4fd3058f"},{"name":"Validate voucher code","id":"f6aeef87-d60c-4c94-ac28-ee712a50d8d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"","value":"","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/vouchers/validateCode?voucherCode=6c8fabd938bbe61dd7e68453a7409975&webshopAddr=0xa7DD6E42EF9728DBE4793481b9b8E0703542a786","description":"<p>Request type - <code>GET</code></p>\n<br />\n\n<p>This method will be used for validate the voucher code (<em>encoded string</em>), and get the voucher ID (<em>numerical</em>). As a param requester should provide:</p>\n<ul>\n<li><code>voucherCode</code>: Encoded string of voucher (<em>required</em>)</li>\n<li><code>webshopAddr</code>: The address of webshop, where user want to redeem voucher (<em>required</em>)</li>\n</ul>\n<br />\n\n<p>As a response it provides:</p>\n<ul>\n<li><code>voucherId</code> and <code>numerical value</code></li>\n</ul>\n","urlObject":{"path":["vouchers","validateCode"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[{"key":"voucherCode","value":"6c8fabd938bbe61dd7e68453a7409975"},{"key":"webshopAddr","value":"0xa7DD6E42EF9728DBE4793481b9b8E0703542a786"}],"variable":[]}},"response":[],"_postman_id":"f6aeef87-d60c-4c94-ac28-ee712a50d8d7"},{"name":"Get voucher data","id":"fdd1c914-02f2-41ef-9573-f1767c08dc84","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/vouchers/12","urlObject":{"path":["vouchers","12"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"fdd1c914-02f2-41ef-9573-f1767c08dc84"}],"id":"c2d516ea-5402-4d31-a7e1-2e15090176b7","description":"<p>Voucher endpoint created for interacting with vouchers, create, redeem, and validate it. Each voucher has its own decoded value, which does not save anywhere after creation on the database. Voucher code can be validated only by the user and redeemed after successful validation.</p>\n","event":[{"listen":"prerequest","script":{"id":"0e7c5bf6-b2d2-4c54-a42a-272bcd098af7","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"77e29dc9-475a-4f8c-8bad-7cfa0f596992","type":"text/javascript","exec":[""]}}],"_postman_id":"c2d516ea-5402-4d31-a7e1-2e15090176b7"},{"name":"Demo data","item":[{"name":"Sign create voucher method","id":"1e756bf6-70e3-4ad7-a73c-8d6d0b0427f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"amount\": \"100\",\n    \"nonce\": \"0\",\n    \"privateKey\": \"0x520d755a6dfb95c5b69180b25fe94c72e0ab05b0a015d721fecf5d80c5fa5109\"\n}","options":{"raw":{"language":"json"}}},"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/demos/createVoucher?amount=43200&nonce=0&privateKey=0x35cec5d404dbc493255e7fe7e4fa65836cf9f11d8999eabf319f1068cac6579e","description":"<p>Request type - <code>GET</code></p>\n<br />\n\n<p>This method returns signed data from provided values. As a param requester should provide:</p>\n<ul>\n<li><code>amount</code>: Voucher amount (<em>required</em>)</li>\n<li><code>nonce</code>: Nonce value (<em>required</em>)</li>\n<li><code>privateKey</code>: Private key of webshop based Ethereum wallet (<em>required</em>)</li>\n</ul>\n<br />\n\n<p>As a response it provides:</p>\n<ul>\n<li><code>signature</code>: signed data (<em>string</em>)</li>\n</ul>\n","urlObject":{"path":["demos","createVoucher"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[{"key":"amount","value":"43200"},{"key":"nonce","value":"0"},{"key":"privateKey","value":"0x35cec5d404dbc493255e7fe7e4fa65836cf9f11d8999eabf319f1068cac6579e"}],"variable":[]}},"response":[],"_postman_id":"1e756bf6-70e3-4ad7-a73c-8d6d0b0427f5"},{"name":"Sign redeem voucher method","id":"f2f9e9a8-01bc-4079-85ca-e659888132db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/demos/redeemVoucher?amount=50&nonce=0&voucherId=7&privateKey=0x35cec5d404dbc493255e7fe7e4fa65836cf9f11d8999eabf319f1068cac6579e","description":"<p>Request type - <code>GET</code></p>\n<br />\n\n<p>This method returns signed data from provided values. As a param requester should provide:</p>\n<ul>\n<li><code>amount</code>: Voucher amount (<em>required</em>)</li>\n<li><code>nonce</code>: Nonce value (<em>required</em>)</li>\n<li><code>voucherId</code>: Numerical Id of selected voucher, not the voucher code (<em>required</em>)</li>\n<li><code>privateKey</code>: Private key of webshop based Ethereum wallet (<em>required</em>)</li>\n</ul>\n<br />\n\n<p>As a response it provides:</p>\n<ul>\n<li><code>signature</code>: signed data (<em>string</em>)</li>\n</ul>\n","urlObject":{"path":["demos","redeemVoucher"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[{"key":"amount","value":"50"},{"key":"nonce","value":"0"},{"key":"voucherId","value":"7"},{"key":"privateKey","value":"0x35cec5d404dbc493255e7fe7e4fa65836cf9f11d8999eabf319f1068cac6579e"}],"variable":[]}},"response":[],"_postman_id":"f2f9e9a8-01bc-4079-85ca-e659888132db"},{"name":"Sign toggle partner method","id":"6fec465e-d3a9-4ead-8b9f-54770a7ba84a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://pumacy-vm2.westeurope.cloudapp.azure.com/demos/togglePartner?partners=0xa7DD6E42EF9728DBE4793481b9b8E0703542a786&partners=0x73fE69895d372d202813da156E036fbecA9E920C&nonce=0&privateKey=0x5c265835f45f9825b424fa58e4cadeed6f5db681cb258e0f30f1c6ca576543d2","description":"<p>Request type - <code>GET</code></p>\n<br />\n\n<p>This method returns signed data from provided values. As a param requester should provide:</p>\n<ul>\n<li><code>partner</code>: Ethereum address of partner (<em>required</em>)</li>\n<li><code>nonce</code>: Nonce value (<em>required</em>)</li>\n<li><code>privateKey</code>: Private key of webshop based Ethereum wallet (<em>required</em>)</li>\n</ul>\n<br />\n\n<p>As a response it provides:</p>\n<ul>\n<li><code>signature</code>: signed data (<em>string</em>)</li>\n</ul>\n","urlObject":{"path":["demos","togglePartner"],"host":["https://pumacy-vm2.westeurope.cloudapp.azure.com"],"query":[{"key":"partners","value":"0xa7DD6E42EF9728DBE4793481b9b8E0703542a786"},{"key":"partners","value":"0x73fE69895d372d202813da156E036fbecA9E920C"},{"key":"nonce","value":"0"},{"key":"privateKey","value":"0x5c265835f45f9825b424fa58e4cadeed6f5db681cb258e0f30f1c6ca576543d2"}],"variable":[]}},"response":[],"_postman_id":"6fec465e-d3a9-4ead-8b9f-54770a7ba84a"}],"id":"57fb386f-dca0-4104-8504-32efa25420a2","description":"<p>Demo data is an experimental endpoint that should help to test until thee plugin development. It is done for data signing with provided values and nonce. It is extremely insecure for production because webshops should send their private keys via REST requests. After plugin development this endpoint should be removed.</p>\n","event":[{"listen":"prerequest","script":{"id":"f97dc5f0-53e8-4ed8-a737-eeca71739f17","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a7ee391b-08fc-415a-bcd5-0522333231f0","type":"text/javascript","exec":[""]}}],"_postman_id":"57fb386f-dca0-4104-8504-32efa25420a2"}],"event":[{"listen":"prerequest","script":{"id":"1766f084-9e99-4118-8d90-0eb6decdc72e","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"57b3836a-da62-44e6-bd2a-dbe8ddf1abba","type":"text/javascript","exec":[""]}}],"variable":[{"key":"host","value":"https://pumacy-vm2.westeurope.cloudapp.azure.com"}]}