{"info":{"_postman_id":"616416db-73b8-41d7-a3ab-0a9becd37cde","name":"voucher pool","description":"<html><head></head><body><p>The Voucher pool app was built with laravel and Vuejs.</p>\n<p>Usage:</p>\n<ol>\n<li>create a \".env\" in the root of the application</li>\n<li>Run \"php artisan key:generate\" in the cmd terminal opened in the root of the application.</li>\n<li>Add the db_database name, db_username and db_password to the .env file.</li>\n<li>Run \"composer update\" from the terminal opened in the root directory</li>\n<li>start the laravel app by running \"php artisan serve --port 4040\".</li>\n<li>change endpoint to \"localhost:4040/api\"</li>\n<li>Add Users with the api</li>\n<li>Create a Voucher code and special offer</li>\n</ol>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"2640876","collectionId":"616416db-73b8-41d7-a3ab-0a9becd37cde","publishedId":"RWMLKmUk","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-07-29T18:09:59.000Z"},"item":[{"name":"localhost:4040/api/vouchers","id":"a119262e-14f9-45c1-b9eb-ebb91073d37a","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"localhost:4040/api/vouchers","description":"<p>This gives a list of all vouchers in the application. </p>\n","urlObject":{"port":"4040","path":["api","vouchers"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a119262e-14f9-45c1-b9eb-ebb91073d37a"},{"name":"localhost:4040/api/voucher/redeem","id":"24f75d77-c7d7-4ccb-ac8e-33ae225d6ef6","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"email","value":"abbigail.barrows@example.com","type":"text"},{"key":"voucher_code","value":"66FC0AA7B44C3FE572","type":"text"}]},"url":"localhost:4040/api/voucher/redeem","description":"<p>This api is used to redeem vouchers in the application. It takes in the eamil and the voucher_code. If the code is valid, it sets the usage to 1 and the usage_date as well.</p>\n","urlObject":{"port":"4040","path":["api","voucher","redeem"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"24f75d77-c7d7-4ccb-ac8e-33ae225d6ef6"},{"name":"localhost:4040/api/email","id":"c98819e0-a944-4940-9aa0-2fbf75bdcc03","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"email","value":"abelardo.lockman@example.com","type":"text"}]},"url":"localhost:4040/api/email","description":"<p>It takes in a valid email as parameter and returns details of the valid voucher codes and the special offer it belongs to</p>\n","urlObject":{"port":"4040","path":["api","email"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c98819e0-a944-4940-9aa0-2fbf75bdcc03"},{"name":"localhost:4040/api/user/add","id":"546f7ffa-6d45-4d6c-aa35-6dae234c48fc","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"email","value":"helloworld2@yahoo.com","type":"text"},{"key":"name","value":"Taiwo","type":"text"}]},"url":"localhost:4040/api/user/add","description":"<p>This endpoint takes in the name and the email to create a new user and return the user object</p>\n","urlObject":{"port":"4040","path":["api","user","add"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"546f7ffa-6d45-4d6c-aa35-6dae234c48fc"},{"name":"localhost:4040/api/voucher/create","id":"51706383-5d3d-42df-8d42-a5225ea0387d","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"percentage_discount","value":"40","type":"text"},{"key":"special_offer_name","value":"Sunday Promo","type":"text"},{"key":"expiry_date","value":"2018-09-29 12:00:00","type":"text"}]},"url":"localhost:4040/api/voucher/create","description":"<p>This code returns a newly created special offer and also returns a newly generated voucher code. \nIt takes in  percentage_discount, expiry_date and special_offer_name</p>\n","urlObject":{"port":"4040","path":["api","voucher","create"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"51706383-5d3d-42df-8d42-a5225ea0387d"}]}