Created
November 10, 2021 17:22
-
-
Save ignaciocassi/8e9830d1101e3161a405c7ddcd4c1872 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "2d511e4f-a1fa-45d2-9d30-de69a368d981", | |
"name": "Marketify", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "Register", | |
"request": { | |
"auth": { | |
"type": "noauth" | |
}, | |
"method": "POST", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "{\r\n \"username\" : \"Ingrese su nombre de usuario\",\r\n \"password\" : \"Ingrese su contraseña\"\r\n}", | |
"options": { | |
"raw": { | |
"language": "json" | |
} | |
} | |
}, | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/auth/register", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"auth", | |
"register" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Login", | |
"request": { | |
"auth": { | |
"type": "noauth" | |
}, | |
"method": "POST", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "{\r\n \"username\" : \"Ingrese su nombre de usuario\",\r\n \"password\" : \"Ingrese su contraseña\"\r\n}", | |
"options": { | |
"raw": { | |
"language": "json" | |
} | |
} | |
}, | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/auth/login", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"auth", | |
"login" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Guardar un producto", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "POST", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "{\r\n \"name\": \"Atun\",\r\n \"categoryId\": 1,\r\n \"price\": 2000.0,\r\n \"stock\": 105,\r\n \"active\": true\r\n}", | |
"options": { | |
"raw": { | |
"language": "json" | |
} | |
} | |
}, | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/products/save", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"products", | |
"save" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Obtener todos los productos", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/products/all", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"products", | |
"all" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Obtener producto por su ID", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/products/{id}", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"products", | |
"{id}" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Buscar productos por nombre", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/products/name/{nombre}", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"products", | |
"name", | |
"{nombre}" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Obtener todos los productos de una categoria mediante su ID", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/categories/1", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"categories", | |
"1" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Obtener productos escasos dada una cantidad", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/products/scarce/{cantidad}", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"products", | |
"scarce", | |
"{cantidad}" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Borrar un producto", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "DELETE", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/products/delete/", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"products", | |
"delete", | |
"" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Obtener una categoría por su ID", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/categories/{id}", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"categories", | |
"{id}" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Guardar una compra", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "POST", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "{\r\n \"clientId\": \"4546221\",\r\n \"date\": \"2021-08-10T17:30:00\",\r\n \"paymentMethod\": \"T\",\r\n \"comment\": \"\",\r\n \"status\": \"P\",\r\n \"items\": [\r\n {\r\n \"productId\": 1,\r\n \"quantity\": 10,\r\n \"total\": 3000,\r\n \"active\": true\r\n },\r\n {\r\n \"productId\": 24,\r\n \"quantity\": 1,\r\n \"total\": 4000,\r\n \"active\": true\r\n },\r\n {\r\n \"productId\": 27,\r\n \"quantity\": 1,\r\n \"total\": 9000,\r\n \"active\": true\r\n },\r\n {\r\n \"productId\": 36,\r\n \"quantity\": 1,\r\n \"total\": 40000,\r\n \"active\": true\r\n },\r\n {\r\n \"productId\": 49,\r\n \"quantity\": 2,\r\n \"total\": 16400,\r\n \"active\": true\r\n }\r\n ]\r\n}", | |
"options": { | |
"raw": { | |
"language": "json" | |
} | |
} | |
}, | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/purchases/save", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"purchases", | |
"save" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Obtener todas las categorías", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/categories/all", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"categories", | |
"all" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Obtener una categoría por su ID", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/categories/{id}", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"categories", | |
"{id}" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Buscar categorías por nombre", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/categories/name/{nombre}", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"categories", | |
"name", | |
"{nombre}" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Guardar una categoría", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "POST", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "", | |
"options": { | |
"raw": { | |
"language": "json" | |
} | |
} | |
}, | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/categories/save", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"categories", | |
"save" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Cambiar el estado de una categoría", | |
"request": { | |
"auth": { | |
"type": "noauth" | |
}, | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Authorization", | |
"value": "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJOYWNob0Nhc3NpIiwiaWF0IjoxNjM2Mzg4NjQ1LCJleHAiOjE2MzY0MjQ2NDV9.2RRlayGPNiilyqbJb9rpF8EdR_TKXAZqGgbgNjGVHqU", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/categories/togglestatus/1", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"categories", | |
"togglestatus", | |
"1" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Borrar una categoría", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "DELETE", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/categories/delete/{id}", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"categories", | |
"delete", | |
"{id}" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Obtener todas las compras", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/purchases/all", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"purchases", | |
"all" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Obtener todas las compras de un cliente por su ID", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/purchases/client/2552243", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"purchases", | |
"client", | |
"2552243" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Guardar una compra", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "POST", | |
"header": [], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/purchases/save", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"purchases", | |
"save" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Obtener un cliente.", | |
"request": { | |
"auth": { | |
"type": "noauth" | |
}, | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Authorization", | |
"value": "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJOYWNob0Nhc3NpIiwiaWF0IjoxNjM2Mzk0NjkwLCJleHAiOjE2MzY0MzA2OTB9.spn87v-wCPm41BAh5LmtHxSSfy1L8mKtmlLCwtfWvXY", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/clients/40454481", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"clients", | |
"40454481" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Guardar un cliente", | |
"request": { | |
"auth": { | |
"type": "noauth" | |
}, | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Authorization", | |
"value": "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJOYWNob0Nhc3NpIiwiaWF0IjoxNjM2Mzk0ODA5LCJleHAiOjE2MzY0MzA4MDl9.KxlNFaQeidCjPmjVgJoN2J5kTPCwmgep2R8agE2Jt-g", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\r\n \"id\": 40454481,\r\n \"name\": \"Daniel Ignacio\",\r\n \"surname\": \"Cassi\",\r\n \"phonenumber\": 2342513671,\r\n \"address\": \"12 de Octubre 1632\",\r\n \"email\": \"nacho.cassi97@gmail.com\"\r\n}", | |
"options": { | |
"raw": { | |
"language": "json" | |
} | |
} | |
}, | |
"url": { | |
"raw": "https://ignaciocassi-marketify.herokuapp.com/marketapi/api/clients/save", | |
"protocol": "https", | |
"host": [ | |
"ignaciocassi-marketify", | |
"herokuapp", | |
"com" | |
], | |
"path": [ | |
"marketapi", | |
"api", | |
"clients", | |
"save" | |
] | |
} | |
}, | |
"response": [] | |
} | |
], | |
"auth": { | |
"type": "basic", | |
"basic": [ | |
{ | |
"key": "username", | |
"value": "<Basic Auth Username>", | |
"type": "string" | |
}, | |
{ | |
"key": "password", | |
"value": "<Basic Auth Password>", | |
"type": "string" | |
} | |
] | |
}, | |
"variable": [ | |
{ | |
"key": "baseUrl", | |
"value": "localhost:3000" | |
}, | |
{ | |
"key": "JWT TOKEN", | |
"value": "eyJzdWIiOiJOYWNob0Nhc3NpIiwiaWF0IjoxNjM2MzgzNDE3LCJleHAiOjE2MzY0MTk0MTd9" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment