diff --git a/docs/order-management-app.postman_collection.json b/docs/order-management-app.postman_collection.json new file mode 100644 index 0000000..7bd65a5 --- /dev/null +++ b/docs/order-management-app.postman_collection.json @@ -0,0 +1,474 @@ +{ + "info": { + "_postman_id": "a5f26d75-5d09-4f28-97c2-a1f1e2279fc8", + "name": "order-management-app", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "22821650" + }, + "item": [ + { + "name": "Address", + "item": [ + { + "name": "Get all adresses", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/address", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "address" + ] + } + }, + "response": [] + }, + { + "name": "Create new address", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{ \r\n \"street\": \"Kulina bana 44\",\r\n \"zip_code\": \"75350\",\r\n \"city\": \"Srebrenik\",\r\n \"country\": \"Bosnia and Herzegovina\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/address", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "address" + ] + } + }, + "response": [] + }, + { + "name": "Get a address by ID", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/address/145", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "address", + "145" + ] + } + }, + "response": [] + }, + { + "name": "Delete address", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/address/145", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "address", + "145" + ] + } + }, + "response": [] + }, + { + "name": "Edit address", + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "{ \r\n \"street\": \"Gornji Moranjci Bb\",\r\n \"zip_code\": \"75350\",\r\n \"city\": \"Srebrenik\",\r\n \"country\": \"Bosnia and Herzegovina\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/address/145", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "address", + "145" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "User", + "item": [ + { + "name": "Get all users", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/users", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "users" + ] + } + }, + "response": [] + }, + { + "name": "Create new user", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"username\": \"string\",\r\n \"password\": \"string\",\r\n \"email\": \"string\",\r\n \"role\": \"string\",\r\n \"first_name\": \"string\",\r\n \"last_name\": \"string\",\r\n \"birth_date\": \"2024-03-22\",\r\n \"address\": { \r\n \"street\": \"string\",\r\n \"zip_code\": \"string\",\r\n \"city\": \"string\",\r\n \"country\": \"string\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/users", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "users" + ] + } + }, + "response": [] + }, + { + "name": "Get a user by ID", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/users/1", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "users", + "1" + ] + } + }, + "response": [] + }, + { + "name": "Delete user", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/users/1", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "users", + "1" + ] + } + }, + "response": [] + }, + { + "name": "Edit user", + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"username\": \"string\",\r\n \"password\": \"string\",\r\n \"email\": \"string\",\r\n \"role\": \"string\",\r\n \"first_name\": \"string\",\r\n \"last_name\": \"string\",\r\n \"birth_date\": \"2024-03-22\",\r\n \"address\": { \r\n \"street\": \"string\",\r\n \"zip_code\": \"string\",\r\n \"city\": \"string\",\r\n \"country\": \"string\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/users/1", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "users", + "1" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Order", + "item": [ + { + "name": "Get all orders", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/orders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "orders" + ] + } + }, + "response": [] + }, + { + "name": "Create new order", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"user_id\": 0,\r\n \"order_date\": \"2024-03-22\",\r\n \"total_amount\": 0,\r\n \"delivery_address\": { \r\n \"street\": \"string\",\r\n \"zip_code\": \"string\",\r\n \"city\": \"string\",\r\n \"country\": \"string\"\r\n },\r\n \"source_address\": { \r\n \"street\": \"string\",\r\n \"zip_code\": \"string\",\r\n \"city\": \"string\",\r\n \"country\": \"string\"\r\n },\r\n \"items\": [\r\n { \r\n \"product_id\": 0,\r\n \"quantity\": 0,\r\n \"item_price\": 0\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/orders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "orders" + ] + } + }, + "response": [] + }, + { + "name": "Get order by ID", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/orders/1", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "orders", + "1" + ] + } + }, + "response": [] + }, + { + "name": "Delete order", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/orders/1", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "orders", + "1" + ] + } + }, + "response": [] + }, + { + "name": "Edit order", + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"user_id\": 0,\r\n \"order_date\": \"2024-03-22\",\r\n \"total_amount\": 0,\r\n \"delivery_address\": { \r\n \"street\": \"string\",\r\n \"zip_code\": \"string\",\r\n \"city\": \"string\",\r\n \"country\": \"string\"\r\n },\r\n \"source_address\": { \r\n \"street\": \"string\",\r\n \"zip_code\": \"string\",\r\n \"city\": \"string\",\r\n \"country\": \"string\"\r\n },\r\n \"items\": [\r\n { \r\n \"product_id\": 0,\r\n \"quantity\": 0,\r\n \"item_price\": 0\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/orders/1", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "orders", + "1" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Product", + "item": [ + { + "name": "Get all products", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/product", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "product" + ] + } + }, + "response": [] + }, + { + "name": "Create new product", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{ \r\n \"product_name\": \"string\",\r\n \"price\": 0,\r\n \"available_from\": \"2024-03-22\",\r\n \"available_until\": \"2024-03-22\",\r\n \"available_quantity\": 0\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/product", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "product" + ] + } + }, + "response": [] + }, + { + "name": "Get a product by ID", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/product/1", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "product", + "1" + ] + } + }, + "response": [] + }, + { + "name": "Delete product", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/product/1", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "product", + "1" + ] + } + }, + "response": [] + }, + { + "name": "Edit product", + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "{ \r\n \"product_name\": \"string\",\r\n \"price\": 0,\r\n \"available_from\": \"2024-03-22\",\r\n \"available_until\": \"2024-03-22\",\r\n \"available_quantity\": 0\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/product/1", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "product", + "1" + ] + } + }, + "response": [] + } + ] + } + ] +} \ No newline at end of file