# Pearl of the Orient API Docs ## Quick Overview - API Version: `1.0.0` - Developer: `Kyle Andre Lim` - Base Path: `/api/v1` Comprehensive API documentation for authentication, users, members, branch services, and offices endpoints. Version: 1.0.0 License: Apache-2.0 ## Servers Version 1 API base path ``` /api/v1 ``` ## Security ### BearerAuth Provide access token as: Bearer <token> Type: http Scheme: bearer Bearer Format: JWT ### RefreshTokenCookie Type: apiKey In: cookie Name: refreshToken ## Download OpenAPI description [Pearl of the Orient API Docs](https://api-docs.pearlchaplaincy.org/_bundle/openapi.yaml) ## System Health and root metadata endpoints ### API root status - [GET /](https://api-docs.pearlchaplaincy.org/openapi/system/getapirootstatus.md) ## Auth Authentication and account recovery ### Register an admin/member user - [POST /auth/register](https://api-docs.pearlchaplaincy.org/openapi/auth/registeruser.md) ### Login (admin-only) - [POST /auth/login](https://api-docs.pearlchaplaincy.org/openapi/auth/loginuser.md) ### Logout current user - [DELETE /auth/logout](https://api-docs.pearlchaplaincy.org/openapi/auth/logoutuser.md) ### Refresh access token using refreshToken cookie - [GET /auth/refresh-token](https://api-docs.pearlchaplaincy.org/openapi/auth/refreshaccesstoken.md) ### Send password reset email (admin-only account) - [POST /auth/forgot-password](https://api-docs.pearlchaplaincy.org/openapi/auth/forgotpassword.md) ### Reset password using email token - [POST /auth/reset-password](https://api-docs.pearlchaplaincy.org/openapi/auth/resetpassword.md) ### Verify email by code - [POST /auth/verify-email](https://api-docs.pearlchaplaincy.org/openapi/auth/verifyemail.md) ### Resend email verification code - [POST /auth/resend-email-verification](https://api-docs.pearlchaplaincy.org/openapi/auth/resendemailverification.md) ## Users User profile and admin user management ### Get current authenticated user - [GET /users/current](https://api-docs.pearlchaplaincy.org/openapi/users/getcurrentuser.md) ### Update current authenticated user - [PUT /users/current](https://api-docs.pearlchaplaincy.org/openapi/users/updatecurrentuser.md) ### Delete current authenticated user - [DELETE /users/current](https://api-docs.pearlchaplaincy.org/openapi/users/deletecurrentuser.md) ### List users (admin only) - [GET /users](https://api-docs.pearlchaplaincy.org/openapi/users/getallusers.md) ### Get user by ID (admin only) - [GET /users/{userId}](https://api-docs.pearlchaplaincy.org/openapi/users/getuserbyid.md) ### Delete user by ID (admin only) - [DELETE /users/{userId}](https://api-docs.pearlchaplaincy.org/openapi/users/deleteuserbyid.md) ## Members Member application and management ### Apply as member - [POST /members/apply](https://api-docs.pearlchaplaincy.org/openapi/members/applymember.md) ### Approve or reject member application (admin only) - [PATCH /members/{id}/status](https://api-docs.pearlchaplaincy.org/openapi/members/updatememberstatus.md) ### Get pending member applications (admin only) - [GET /members/pending](https://api-docs.pearlchaplaincy.org/openapi/members/getpendingmembers.md) ### Get all members (admin only) - [GET /members](https://api-docs.pearlchaplaincy.org/openapi/members/getallmembers.md) ### Archive member (admin only) - [PATCH /members/{id}/archive](https://api-docs.pearlchaplaincy.org/openapi/members/archivemember.md) ### Retrieve archived member (admin only) - [PATCH /members/{id}/retrieve](https://api-docs.pearlchaplaincy.org/openapi/members/retrievemember.md) ## Branch Service Branch of service management ### Create branch service (admin only) - [POST /branch-service/create](https://api-docs.pearlchaplaincy.org/openapi/branch-service/createbranchservice.md) ### Get all branch services - [GET /branch-service](https://api-docs.pearlchaplaincy.org/openapi/branch-service/getallbranchservices.md) ### Get branch service by ID - [GET /branch-service/{id}](https://api-docs.pearlchaplaincy.org/openapi/branch-service/getbranchservicebyid.md) ### Update branch service (admin only) - [PUT /branch-service/{id}](https://api-docs.pearlchaplaincy.org/openapi/branch-service/updatebranchservice.md) ### Delete branch service (admin only) - [DELETE /branch-service/{id}](https://api-docs.pearlchaplaincy.org/openapi/branch-service/deletebranchservice.md) ## Offices Office title management ### Create office title (admin only) - [POST /offices/create](https://api-docs.pearlchaplaincy.org/openapi/offices/createofficetitle.md) ### Get all office titles - [GET /offices](https://api-docs.pearlchaplaincy.org/openapi/offices/getallofficetitles.md) ### Get office title by ID - [GET /offices/{id}](https://api-docs.pearlchaplaincy.org/openapi/offices/getofficetitlebyid.md) ### Update office title (admin only) - [PUT /offices/{id}](https://api-docs.pearlchaplaincy.org/openapi/offices/updateofficetitle.md) ### Delete office title (admin only) - [DELETE /offices/{id}](https://api-docs.pearlchaplaincy.org/openapi/offices/deleteofficetitle.md)