Smart-voucher API
Here is the documentation for developers, which introduces the methods of this API.
As a core platform has been used the Headless CMS Strapi.
API use protected HTTPS protocol for all endpoints.
Webshop requests
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.
GETGet all webshops
https://pumacy-vm2.westeurope.cloudapp.azure.com/webshops
Request type - GET
Returns an array of public information of available webshops.
Example Request
Get all webshops
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers
GETGet webshop data
https://pumacy-vm2.westeurope.cloudapp.azure.com/webshops/0x89ce9ec30e2e761ec2ceaae8dd54f3174b00901d
Request type - GET
Returns the publici data of the certain webshop:
:wallet
: Ethereum address of the certain webshop (required)
Example Request
Get webshop data
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers
POSTRegister webshop
https://pumacy-vm2.westeurope.cloudapp.azure.com/webshops
Request type - POST
For webshop registrations requester should provide:
wallet
: Ethereum address which should be used for interaction in the future (required)website
: The URL address of webshop (required)email
: As a main contact (required)
Bodyraw (json)
Example Request
Register webshop
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers
POSTAdd partners
https://pumacy-vm2.westeurope.cloudapp.azure.com/webshops/addPartners
Request type - POST
For adding partner the webshop should provide:
webshopAddr
: Ethereum address of initiator webshop (required)partners
: Array of ethereum addresses of selected partners (required)nonce
: Nonce of initiator webshop, it can be found on on Get webshop data response (required)signature
: Signed data done with initiator webshops' private key (required)
Bodyraw (json)
Example Request
Add partners
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers