{ "openapi": "3.1.0", "info": { "title": "Laravel", "version": "0.0.1" }, "servers": [ { "url": "https://cm.test/api" } ], "paths": { "/areas": { "get": { "operationId": "areas.index", "tags": [ "Area" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } } } } }, "/areas/{model}": { "get": { "operationId": "areas.show", "tags": [ "Area" ], "parameters": [ { "name": "model", "in": "path", "required": true, "description": "The model ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/login": { "post": { "operationId": "login", "description": "We are using bearer token auth system and you can get token by using this APIs.", "summary": "Login", "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" } }, "required": [ "email", "password" ] } } } }, "responses": { "200": { "description": "A user resource with Token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Data Retrieved Successfully" }, "data": { "type": "object", "properties": { "token": { "type": "string" } }, "required": [ "token" ] } }, "required": [ "status", "message", "data" ] } } } }, "400": { "description": "If User Not Found or Password Is Not Correct", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Username Or Password Is Not Correct" } }, "required": [ "status", "message" ] } } } }, "401": { "description": "A user resource.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Your account is not active yet" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/register": { "post": { "operationId": "register", "description": "You can create a new account by use this API.", "summary": "Register", "tags": [ "Auth" ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "phone": { "type": "string" }, "email": { "type": "string", "format": "email" }, "password": { "type": "string" }, "front_id": { "type": "string", "format": "binary" }, "back_id": { "type": "string", "format": "binary" }, "relation_type": { "type": [ "integer", "null" ] }, "parent_id": { "type": "integer" }, "password_confirmation": { "type": "string" } }, "required": [ "name", "phone", "email", "password", "front_id", "back_id", "password_confirmation" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "User registration success" }, "data": { "type": "object", "properties": { "token": { "type": "string" } }, "required": [ "token" ] } }, "required": [ "status", "message", "data" ] }, { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "An OTP Has been send to your email please check it" } }, "required": [ "status", "message" ] } ] } } } }, "400": { "description": "Registeration Success and we return Access Token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "User registration failed" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/reset": { "post": { "operationId": "reset", "description": "You can send reset password request by use this APIs.", "summary": "Reset Password", "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string" } }, "required": [ "email" ] } } } }, "responses": { "200": { "description": "OTP Send Success Using Service Provider.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "An OTP Has been send to your email please check it" } }, "required": [ "status", "message" ] } } } }, "404": { "description": "Sorry User Not Found!.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "user not found" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/resend": { "post": { "operationId": "resend", "description": "You can resend OTP by use this API.", "summary": "Resend OTP", "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string" } }, "required": [ "email" ] } } } }, "responses": { "200": { "description": "OTP Send Success Using Service Provider.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "An OTP Has been send to your email please check it" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/otp": { "post": { "operationId": "otp", "description": "You can check OTP is vaild by use this API and active the user if it's vaild.", "summary": "Check OTP & Active Account", "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string" }, "otp_code": { "type": "string" } }, "required": [ "email", "otp_code" ] } } } }, "responses": { "200": { "description": "OTP is vaild and the account has been activated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "your Account has been activated" } }, "required": [ "status", "message" ] } } } }, "400": { "description": "Sorry OTP is not vaild or expired you can generate new one by resend.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "sorry this code is not valid or expired" } }, "required": [ "status", "message" ] } } } }, "404": { "description": "There is not account releated to this email/phone.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "user not found" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/otp-check": { "post": { "operationId": "otp.check", "description": "You can check OTP is vaild by use this API.", "summary": "Check OTP", "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string" }, "otp_code": { "type": "string" } }, "required": [ "email", "otp_code" ] } } } }, "responses": { "200": { "description": "OTP is vaild and the account has been activated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "your Account has been activated" } }, "required": [ "status", "message" ] } } } }, "400": { "description": "Sorry OTP is not vaild or expired you can generate new one by resend.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "sorry this code is not valid or expired" } }, "required": [ "status", "message" ] } } } }, "404": { "description": "There is not account releated to this email/phone.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "user not found" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/password": { "post": { "operationId": "password", "description": "If the request of change password has been send success you can change the password with OTP form here.", "summary": "Change Password", "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "password": { "type": "string" }, "password_confirmation": { "type": "string" } }, "required": [ "password", "password_confirmation" ] } } } }, "responses": { "200": { "description": "OTP is vaild and the password has been changed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Password Updated" } }, "required": [ "status", "message" ] } } } }, "400": { "description": "OTP is not vaild or expired please resend it.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "sorry this code is not valid or expired" } }, "required": [ "status", "message" ] } } } }, "404": { "description": "Sorry User Not Found!.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "user not found" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/categories": { "get": { "operationId": "categories.index", "tags": [ "Category" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } } } } }, "/categories/{model}": { "get": { "operationId": "categories.show", "tags": [ "Category" ], "parameters": [ { "name": "model", "in": "path", "required": true, "description": "The model ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/cities": { "get": { "operationId": "cities.index", "tags": [ "City" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } } } } }, "/cities/{model}": { "get": { "operationId": "cities.show", "tags": [ "City" ], "parameters": [ { "name": "model", "in": "path", "required": true, "description": "The model ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/community-actions": { "get": { "operationId": "community.communityActionList", "tags": [ "CommunityActionList" ], "responses": { "200": { "description": "`CommunityActionListResource`", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/CommunityActionListResource" } }, "required": [ "data" ] } } } } } } }, "/community-events": { "get": { "operationId": "communityEventList.index", "tags": [ "CommunityEventList" ], "parameters": [ { "name": "unit_id", "in": "query", "schema": { "type": [ "integer", "null" ] } } ], "responses": { "200": { "description": "Array of `CommunityEventResource`", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/CommunityEventResource" } } }, "required": [ "data" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/community-events/tags": { "get": { "operationId": "communityEventTagList.index", "tags": [ "CommunityEventTagList" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/community-groups/post": { "post": { "operationId": "community.communityGroupCreatePost", "tags": [ "CommunityGroupCreatePost" ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "title": { "type": [ "string", "null" ] }, "description": { "type": "string" }, "group_id": { "type": "integer" }, "image": { "type": [ "string", "null" ], "format": "binary" } }, "required": [ "description", "group_id" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/community-groups/join": { "post": { "operationId": "community.communityGroupJoin", "tags": [ "CommunityGroupJoin" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "group_id": { "type": "integer" } }, "required": [ "group_id" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/community-groups": { "get": { "operationId": "communityGroupList.index", "tags": [ "CommunityGroupList" ], "responses": { "200": { "description": "Array of `CommunityGroupResource`", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/CommunityGroupResource" } } }, "required": [ "data" ] } } } } } } }, "/contact": { "post": { "operationId": "contact.store", "tags": [ "Contact" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "type_id": { "type": "integer" }, "status_id": { "type": "integer" }, "name": { "type": "string" }, "email": { "type": [ "string", "null" ], "format": "email" }, "phone": { "type": [ "string", "null" ] }, "subject": { "type": "string" }, "message": { "type": "string" }, "active": { "type": [ "string", "null" ] } }, "required": [ "type_id", "status_id", "name", "subject", "message" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object" } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/countires": { "get": { "operationId": "countires.index", "tags": [ "Country" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } } } } }, "/countires/{model}": { "get": { "operationId": "countires.show", "tags": [ "Country" ], "parameters": [ { "name": "model", "in": "path", "required": true, "description": "The model ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/forms": { "get": { "operationId": "forms.index", "description": "You Can Get All Forms.", "summary": "Form Index", "tags": [ "Form" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } } } } }, "/forms/{model}": { "get": { "operationId": "forms.show", "description": "Select From By ID and show fileds of it.", "summary": "Form Show", "tags": [ "Form" ], "parameters": [ { "name": "model", "in": "path", "required": true, "description": "The model ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/form-requests": { "get": { "operationId": "forms.requests", "description": "You Can View All Requests Come to Selected Form.", "summary": "Form Requests Index", "tags": [ "FormRequest" ], "parameters": [ { "name": "user_id", "in": "query", "schema": { "type": [ "string", "null" ] } }, { "name": "form_id", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "post": { "operationId": "forms.requests.store", "description": "You can use this endpoint to store the form requests.", "summary": "Form Requests Store", "tags": [ "FormRequest" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "form_id": { "type": "integer" }, "payload": { "type": [ "array", "null" ], "items": { "type": "string" } } }, "required": [ "form_id" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/form-requests/{model}": { "get": { "operationId": "forms.requests.show", "description": "You Can Show A Selected Request.", "summary": "Form Requests Show", "tags": [ "FormRequest" ], "parameters": [ { "name": "model", "in": "path", "required": true, "description": "The model ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/home": { "get": { "operationId": "home.index", "description": "Return Home Screen Data [Biils, QR, Categories]", "summary": "Home Screen", "tags": [ "General" ], "parameters": [ { "name": "unit_id", "in": "query", "schema": { "type": [ "integer", "null" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Data loaded success" }, "data": { "$ref": "#/components/schemas/HomeResource" } }, "required": [ "status", "message", "data" ] } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Sorry User do not have selected unites please assign unites to user" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/invitation/{model}": { "get": { "operationId": "invitation.show", "tags": [ "Invitation" ], "parameters": [ { "name": "model", "in": "path", "required": true, "description": "The model ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/invitation/list": { "get": { "operationId": "invitationApi.index", "tags": [ "InvitationApi" ], "responses": { "200": { "description": "Array of `InvitaitionResource`", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/InvitaitionResource" } } }, "required": [ "data" ] } } } } } } }, "/invitation": { "post": { "operationId": "invitation.store", "tags": [ "InvitationApi" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "property_id": { "type": "integer" }, "type_id": { "type": "integer" }, "name": { "type": "string" }, "invitation_date": { "type": "string" }, "invitation_time": { "type": [ "string", "null" ] } }, "required": [ "property_id", "type_id", "name", "invitation_date" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/locations": { "get": { "operationId": "locations.index", "tags": [ "Location" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } } } } }, "/locations/{model}": { "get": { "operationId": "locations.show", "tags": [ "Location" ], "parameters": [ { "name": "model", "in": "path", "required": true, "description": "The model ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/notifications": { "get": { "operationId": "notifications.index", "description": "Show All notifications of current login user by token", "summary": "Notifications List", "tags": [ "Notifications" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "string" } }, "required": [ "success", "message", "data" ] } } } } } } }, "/notifications/clear": { "post": { "operationId": "notifications.clear", "description": "Clear all notifications of current user.", "summary": "Clear Notifications", "tags": [ "Notifications" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "array", "items": { "type": "string" } } }, "required": [ "success", "message", "data" ] } } } } } } }, "/notifications/{id}/delete": { "delete": { "operationId": "notifications.destroy", "description": "Delete Selected notifications by ID", "summary": "Delete Notification", "tags": [ "Notifications" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "array", "items": { "type": "string" } } }, "required": [ "success", "message", "data" ] } } } } } } }, "/notifications/{id}/read": { "post": { "operationId": "notifications.markAsRead", "description": "You can make the selected notification by id flag to be is_read=true", "summary": "Make Notification as Read", "tags": [ "Notifications" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "array", "items": { "type": "string" } } }, "required": [ "success", "message", "data" ] } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "array", "items": { "type": "string" } } }, "required": [ "success", "message", "data" ] } } } } } } }, "/notifications/toggle": { "post": { "operationId": "notifications.setting", "description": "update notification token for FCM integration token", "summary": "Update Notification Token", "tags": [ "Notifications" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": [ "string", "null" ] } } } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "body": { "type": "array", "items": { "type": "string" } } }, "required": [ "success", "message", "body" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/pages": { "get": { "operationId": "pages.index", "description": "get all pages on the system", "summary": "List All Pages", "tags": [ "Page" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } } } } }, "/pages/{model}": { "get": { "operationId": "pages.show", "description": "you can select a page by slug to view it's content", "summary": "Get Page Content By Slug", "tags": [ "Page" ], "parameters": [ { "name": "model", "in": "path", "required": true, "description": "The model ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/community-groups/posts/{groupId}": { "get": { "operationId": "community.postsPerGroupList", "tags": [ "PostsPerGroupList" ], "parameters": [ { "name": "groupId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "string" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/PostResource" } } }, "required": [ "data" ] } ] } } } } } } }, "/profile": { "get": { "operationId": "profile.user", "description": "You Can Return user resource data from this APIs.", "summary": "User Profile", "tags": [ "Profile" ], "responses": { "200": { "description": "A user resource with Token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Profile Data Load" }, "data": { "type": "object" } }, "required": [ "status", "message", "data" ] } } } }, "404": { "description": "Sorry User Not Found!.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "user not found" } }, "required": [ "status", "message" ] } } } } } }, "post": { "operationId": "profile.update", "description": "You can update user data by use this APIs.⚠️Cannot generate request documentation: Undefined variable $user", "summary": "Update User Profile", "tags": [ "Profile" ], "responses": { "200": { "description": "A user resource with Token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Profile Data Update" }, "data": { "type": "object" } }, "required": [ "status", "message", "data" ] } } } }, "404": { "description": "Sorry User Not Found!.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "user not found" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/profile/password": { "post": { "operationId": "profile.password", "description": "You can update user password by use this APIs.", "summary": "Update User Password", "tags": [ "Profile" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "password": { "type": "string" }, "password_confirmation": { "type": "string" } }, "required": [ "password", "password_confirmation" ] } } } }, "responses": { "200": { "description": "If Your Has Token He Can change the password direct without OTP.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Password Updated" } }, "required": [ "status", "message" ] } } } }, "404": { "description": "Sorry User Not Found!.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "user not found" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/profile/destroy": { "delete": { "operationId": "profile.destroy", "description": "You can close your account by send this request, please note that all data for this user will be deleted and you can register again.", "summary": "Close Account", "tags": [ "Profile" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "200": { "description": "The account has been close you can register again", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Account Has Been Deleted" } }, "required": [ "status", "message" ] } } } } } } }, "/profile/logout": { "post": { "operationId": "profile.logout", "description": "You can logout the user by destory tokens and session by use this API.", "summary": "Logout User", "tags": [ "Profile" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "200": { "description": "The user logout success and the tokens destoried.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Logout Success" } }, "required": [ "status", "message" ] } } } } } } }, "/faq": { "get": { "operationId": "faq.index", "description": "You can show all questions or filter by type_id", "summary": "FAQ List", "tags": [ "Question" ], "parameters": [ { "name": "type_id", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/service-categories": { "get": { "operationId": "serviceCategory.index", "description": "Service Category List merged with Services", "summary": "Service Category Index", "tags": [ "ServiceCategory" ], "parameters": [ { "name": "parent_id", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/service-providers": { "get": { "operationId": "serviceProvider.index", "tags": [ "ServiceProvider" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } } } } }, "/service-providers/nearest": { "get": { "operationId": "serviceProvider.nearest", "tags": [ "ServiceProvider" ], "parameters": [ { "name": "lat", "in": "query", "required": true, "schema": { "type": "number" } }, { "name": "lng", "in": "query", "required": true, "schema": { "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets": { "get": { "operationId": "tickets.index", "description": "List of tickets that created by the user", "summary": "List Of My Tickets", "tags": [ "Ticket" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } } } }, "post": { "operationId": "tickets.store", "description": "You Can Open a New ticket with this API", "summary": "Open New Ticket", "tags": [ "Ticket" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] }, "subject": { "type": "string" }, "message": { "type": [ "string", "null" ] } }, "required": [ "subject" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets/{model}": { "get": { "operationId": "tickets.show", "description": "You Can View Ticket with Comments with this API", "summary": "Show Ticket Details", "tags": [ "Ticket" ], "parameters": [ { "name": "model", "in": "path", "required": true, "description": "The model ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } }, "post": { "operationId": "tickets.send", "description": "You can Send A comment on the ticket by use this API", "summary": "Send Ticket Comment", "tags": [ "Ticket" ], "parameters": [ { "name": "model", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "string" } }, "required": [ "response" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "string" }, { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Comment has been sent" } }, "required": [ "status", "message" ] }, { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Ticket is closed" } }, "required": [ "status", "message" ] } ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/types": { "get": { "operationId": "types.index", "tags": [ "Type" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } } } } }, "/types/{model}": { "get": { "operationId": "types.show", "tags": [ "Type" ], "parameters": [ { "name": "model", "in": "path", "required": true, "description": "The model ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "object" } ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/invitation/types": { "get": { "operationId": "tomatoCategory.type", "tags": [ "Type" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/unites": { "get": { "operationId": "unites.index", "description": "You will get unites of current user if he is owner of it or sub owner or tenant", "summary": "List Of Unites For Current User", "tags": [ "Unites" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Unites loaded success" }, "data": { "type": "string" } }, "required": [ "status", "message", "data" ] } } } } } } }, "/unites/{unit}": { "get": { "operationId": "unites.show", "description": "You can access this unite if you are owner or sub owner or tenant", "summary": "Show Unite Details", "tags": [ "Unites" ], "parameters": [ { "name": "unit", "in": "path", "required": true, "description": "The unit ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Unite loaded success" }, "data": { "type": "array", "items": { "type": "string" } } }, "required": [ "status", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/unites/{unit}/wallet-settings": { "get": { "operationId": "unites.wallet.settings", "description": "Show the limits of wallet and manage access", "summary": "Show Wallet Settings", "tags": [ "Unites" ], "parameters": [ { "name": "unit", "in": "path", "required": true, "description": "The unit ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Wallet Setting updated successfully" }, "data": { "type": "string" } }, "required": [ "status", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } }, "post": { "operationId": "unites.wallet.settings.update", "description": "You can update the wallet limits for selected unites", "summary": "Update Wallet Limits", "tags": [ "Unites" ], "parameters": [ { "name": "unit", "in": "path", "required": true, "description": "The unit ID", "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "can_used_by_member": { "type": "boolean" }, "can_used_by_tenant": { "type": "boolean" }, "is_limit": { "type": "boolean" }, "limit_amount": { "type": [ "string", "null" ] }, "limit_period": { "type": "boolean" }, "limit_interval": { "type": [ "string", "null" ] } } } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Wallet Setting updated successfully" } }, "required": [ "status", "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/unites/{unit}/sub-owners": { "get": { "operationId": "unites.subowners", "description": "You can list all Sub Owners or Tenants of this unite", "summary": "List of Sub Owners or Tenants", "tags": [ "Unites" ], "parameters": [ { "name": "unit", "in": "path", "required": true, "description": "The unit ID", "schema": { "type": "integer" } }, { "name": "type", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "sub_owner", "tenant" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Users Loaded successfully" }, "data": { "type": "string" } }, "required": [ "status", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "post": { "operationId": "unites.subowners.store", "description": "You can create new sub owner or tenant for this unite", "summary": "Create Sub Owner or Tenant", "tags": [ "Unites" ], "parameters": [ { "name": "unit", "in": "path", "required": true, "description": "The unit ID", "schema": { "type": "integer" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "sub_owner", "tenant" ] }, "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "phone": { "type": "string" }, "password": { "type": "string" }, "relation_type": { "type": "string" }, "is_active": { "type": "string" }, "access_to_wallet": { "type": "string" }, "front_id": { "type": "string", "format": "binary" }, "back_id": { "type": "string", "format": "binary" }, "start_date": { "type": "string" }, "end_date": { "type": "string" }, "password_confirmation": { "type": "string" } }, "required": [ "type", "name", "email", "phone", "password", "relation_type", "is_active", "access_to_wallet", "front_id", "back_id", "start_date", "end_date", "password_confirmation" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Sub Owner Added Success" } }, "required": [ "status", "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/wallet/deposit": { "post": { "operationId": "wallet.deposit", "tags": [ "Wallet" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "amount": { "type": "number", "minimum": 1 }, "payment_method": { "type": "string", "enum": [ "cash", "paymob" ] } }, "required": [ "amount", "payment_method" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Deposit successfully" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/wallet/transactions": { "get": { "operationId": "wallet.transactions", "tags": [ "Wallet" ], "parameters": [ { "name": "type", "in": "query", "schema": { "type": [ "string", "null" ], "enum": [ "deposit", "withdraw", "transfer" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Transactions loaded successfully" }, "data": { "type": "string" } }, "required": [ "status", "message", "data" ] } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string", "example": "Sorry User Don't Have Any Transactions" } }, "required": [ "status", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } } }, "components": { "schemas": { "BillResource": { "type": "object", "properties": { "id": { "type": "string" }, "account_id": { "type": "string" }, "compound_id": { "type": "string" }, "property_id": { "type": "string" }, "bill_type_id": { "type": "string" }, "amount": { "type": "string" }, "bill_date": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "is_paid": { "type": "boolean" } }, "required": [ "id", "account_id", "compound_id", "property_id", "bill_type_id", "amount", "bill_date", "created_at", "updated_at", "is_paid" ], "title": "BillResource" }, "CommunityActionListResource": { "type": "object", "properties": { "posts": { "type": "array", "items": { "$ref": "#/components/schemas/PostResource" } }, "events": { "type": "array", "items": { "$ref": "#/components/schemas/CommunityEventResource" } }, "groups": { "type": "array", "items": { "$ref": "#/components/schemas/CommunityGroupResource" } } }, "required": [ "posts", "events", "groups" ], "title": "CommunityActionListResource" }, "CommunityEventResource": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "host": { "type": "string" }, "tags": { "type": "string" }, "event_date": { "type": "string" }, "end_at": { "type": "string" }, "lat": { "type": "string" }, "lng": { "type": "string" }, "image": { "$ref": "#/components/schemas/MediaResource" }, "images": { "type": "array", "items": { "$ref": "#/components/schemas/MediaResource" } } }, "required": [ "id", "name", "description", "host", "tags", "event_date", "end_at", "lat", "lng", "image", "images" ], "title": "CommunityEventResource" }, "CommunityGroupResource": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "image": { "$ref": "#/components/schemas/MediaResource" }, "last_week_posts": { "type": "string" }, "members_count": { "type": "string" }, "is_member": { "type": "string" } }, "required": [ "id", "name", "image", "last_week_posts", "members_count", "is_member" ], "title": "CommunityGroupResource" }, "HomeResource": { "type": "object", "properties": { "categories": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceCategoryResource" } }, "qr": { "type": "string" }, "current_unit": { "$ref": "#/components/schemas/UnitResource" }, "bills": { "type": "array", "items": { "$ref": "#/components/schemas/BillResource" } } }, "required": [ "categories", "qr", "current_unit", "bills" ], "title": "HomeResource" }, "InvitaitionResource": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "invitation_date": { "type": "string" } }, "required": [ "id", "name", "type", "invitation_date" ], "title": "InvitaitionResource" }, "MediaResource": { "type": "object", "properties": { "url": { "type": "string" } }, "required": [ "url" ], "title": "MediaResource" }, "PostResource": { "type": "object", "properties": { "id": { "type": "string" }, "group": { "$ref": "#/components/schemas/CommunityGroupResource" }, "title": { "type": "string" }, "description": { "type": "string" }, "posted_at": { "type": "string" } }, "required": [ "id", "group", "title", "description", "posted_at" ], "title": "PostResource" }, "ServiceCategoryResource": { "type": "object", "properties": { "id": { "type": "string" }, "parent": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "name": { "type": "string" }, "description": { "type": "string" }, "type": { "type": "string" }, "price": { "type": "string" }, "form": { "type": "string" }, "icon": { "type": "string" } }, "required": [ "id", "parent", "name", "description", "type", "price", "form", "icon" ], "title": "ServiceCategoryResource" }, "UnitResource": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "code": { "type": "string" }, "property_type_id": { "type": "string" }, "compound_id": { "type": "string" }, "developer_id": { "type": "string" }, "owner_id": { "type": "string" } }, "required": [ "id", "name", "code", "property_type_id", "compound_id", "developer_id", "owner_id" ], "title": "UnitResource" } }, "responses": { "ModelNotFoundException": { "description": "Not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Error overview." } }, "required": [ "message" ] } } } }, "ValidationException": { "description": "Validation error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Errors overview." }, "errors": { "type": "object", "description": "A detailed description of each field that failed validation.", "additionalProperties": { "type": "array", "items": { "type": "string" } } } }, "required": [ "message", "errors" ] } } } } } } }