Documentation for the Consys Web API endpoints.
{ "openapi": "3.0.0", "info": { "title": "Consys Web API", "description": "API documentation for Consys Web application", "version": "1.0.0", "contact": { "name": "Consys Support", "email": "support@consys.co.in" } }, "servers": [ { "url": "https://consystechnologies.com", "description": "Production server" } ], "tags": [ { "name": "auth", "description": "Authentication endpoints" }, { "name": "user", "description": "User management endpoints" }, { "name": "payment", "description": "Payment processing endpoints" }, { "name": "contact", "description": "Contact form endpoints" } ], "paths": { "/api/auth/[...nextauth]": { "post": { "tags": [ "auth" ], "summary": "Authenticate user", "description": "Authenticate a user with email/password, Google, or Facebook", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "User email" }, "password": { "type": "string", "format": "password", "description": "User password" }, "provider": { "type": "string", "enum": [ "credentials", "google", "facebook" ], "description": "Authentication provider" } } } } } }, "responses": { "200": { "description": "Authentication successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "email": { "type": "string" }, "image": { "type": "string" } } }, "session": { "type": "object", "properties": { "expires": { "type": "string", "format": "date-time" } } } } } } } }, "401": { "description": "Authentication failed" } } } }, "/api/contact": { "post": { "tags": [ "contact" ], "summary": "Submit contact form", "description": "Submit a contact form message", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Contact name" }, "email": { "type": "string", "format": "email", "description": "Contact email" }, "message": { "type": "string", "description": "Contact message" } }, "required": [ "name", "email", "message" ] } } } }, "responses": { "200": { "description": "Message sent successfully" }, "400": { "description": "Invalid input" }, "500": { "description": "Server error" } } } }, "/api/payment/create-order": { "post": { "tags": [ "payment" ], "summary": "Create payment order", "description": "Create a new payment order with Razorpay", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "amount": { "type": "number", "description": "Order amount in INR" }, "currency": { "type": "string", "enum": [ "INR" ], "description": "Currency code" }, "packageName": { "type": "string", "description": "Package name" } }, "required": [ "amount", "currency", "packageName" ] } } } }, "responses": { "200": { "description": "Order created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "orderId": { "type": "string" }, "amount": { "type": "number" }, "currency": { "type": "string" }, "key": { "type": "string" } } } } } }, "400": { "description": "Invalid input" }, "500": { "description": "Server error" } } } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "security": [ { "bearerAuth": [] } ] }
Authenticate a user with email/password, Google, or Facebook
Submit a contact form message
Create a new payment order with Razorpay