Download OpenAPI specification:Download
This collection documents API endpoints for user authentication using tokens. The system supports both JSON Web Tokens (JWT), the industry standard for self-contained and verifiable authorization tokens, and Sanctum Opaque Tokens, Laravel's built-in lightweight solution. Both token types require a Bearer token format placed within the Authorization header of requests (format: Authorization: Bearer xyz).
This endpoint initiates the process of resending a verification email to a user's registered email address. The verification process is asynchronous, meaning the email delivery and user confirmation may take some time. Note: A successful response from this endpoint only guarantees the email resend request being queued, not immediate delivery.
| Accept required | string Example: application/json |
{- "success": true,
- "message": "Email verification sent",
- "email": "jegramos.pa@gmail.com"
}This collection documents API endpoints for user authentication using tokens. The system supports both JSON Web Tokens (JWT), the industry standard for self-contained and verifiable authorization tokens, and Sanctum Opaque Tokens, Laravel's built-in lightweight solution. Both token types require a Bearer token format placed within the Authorization header of requests (format: Authorization: Bearer xyz).
Request an Access Token (Login). The type of access token will depend on the route query paramater auth_type
This endpoint issues access tokens for API authorization. The token type (opaque or JWT) depends on the optional auth_type query parameter. By default (or if auth_type is missing), an opaque token using Sanctum is generated. The successful response includes the access token itself, its type, the expiration time, and the optionally the user's details.
| Key | Validation |
|---|---|
| ?auth_type | `sanctum` or `jwt`, optional |
| Key | Validation |
|---|---|
required if mobile_number is not provided unique, valid email format |
|
| mobile_number | required if email is not provided unique, valid PH mobile format (ex: +639064748992) |
| client_name | optional, string |
| with_user | optional, boolean |
If Multi-Factor Authentication is enabled, this endpoint will return mfa_token, mfa_token_expires_at, and mfa_steps data values instead of auth tokens. Only by completing the activated MFA steps will the auth token be returned
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
| email required | string |
| password required | string |
| client_name required | string |
| with_user required | boolean |
{- "email": "jegramos.admin@gmail.com",
- "password": "Jeg123123",
- "client_name": "Jeg's Macbook",
- "with_user": true
}{- "success": true,
- "data": {
- "token": "<sanctum_opaque_token>",
- "token_name": "Jeg's Macbook",
- "expires_at": "2024-03-21T15:13:27.361778Z",
- "user": {
- "id": 1,
- "email": "jegramos.admin@gmail.com",
- "active": true,
- "email_verified_at": "2024-03-19T05:30:12.000000Z",
- "created_at": "2024-03-19T13:30:12.000000Z",
- "updated_at": "2024-03-19T13:30:12.000000Z",
- "deleted_at": null,
- "roles": [
- {
- "id": 2,
- "name": "admin",
- "pivot": {
- "model_type": "App\\Models\\User",
- "model_id": 1,
- "role_id": 2
}
}
], - "user_profile": {
- "first_name": "jeg",
- "last_name": "ramos",
- "middle_name": null,
- "ext_name": null,
- "mobile_number": null,
- "telephone_number": null,
- "sex": null,
- "birthday": null,
- "created_at": "2024-03-19T13:30:12.000000Z",
- "updated_at": "2024-03-19T13:30:12.000000Z",
- "deleted_at": null,
- "full_name": "jeg ramos",
- "profile_picture_url": null,
- "address": {
- "home_address": null,
- "barangay_id": null,
- "city_id": null,
- "province_id": null,
- "region_id": null,
- "postal_code": null,
- "created_at": "2024-03-19T13:30:12.000000Z",
- "updated_at": "2024-03-19T13:30:12.000000Z",
- "city": null,
- "province": null,
- "region": null,
- "barangay": null
}
}
}
}
}This collection documents API endpoints for user authentication using tokens. The system supports both JSON Web Tokens (JWT), the industry standard for self-contained and verifiable authorization tokens, and Sanctum Opaque Tokens, Laravel's built-in lightweight solution. Both token types require a Bearer token format placed within the Authorization header of requests (format: Authorization: Bearer xyz).
This endpoint allows users to register for a new account. The type of access token issued upon successful registration depends on the optional auth_type query parameter. By default (or if auth_type is missing), an opaque token using Sanctum is generated. Alternatively, specifying auth_type=jwt in the request will result in a JSON Web Token (JWT) being issued.
| Key | Validation |
|---|---|
| ?auth_type | `sanctum` or `jwt`, optional |
| key | validation |
|---|---|
| unique, valid email format | |
| password | string, required |
| password_confirmation | string, required |
| first_name | string, required, max length of 255 |
| last_name | string, required, max length of 255 |
| ext_name | string, optional, max length of 255 |
| middle_name | string, optional, max length of 255 |
| mobile_number | unique, optional, valid PH mobile number format (ex. +63 906 474 8221) |
| telephone_number | optional, valid PH landline format (ex. +63 223 124 245) |
| sex | optional, `male` or `female` |
| birthday | optional, Y-m-d format (ex. 1997-01-04), value must be greater than the current date |
| home_address | optional, string, max lenght of 65,535 |
| city_id | optional, valid ID |
| province_id | optional, valid ID |
| barangay_id | optional, valid ID |
| region_id | optional, valid ID |
| postal_code | optional, 4 digits |
| client_name | string, optional |
| email required | string |
| password required | string |
| password_confirmation required | string |
| first_name required | string |
| last_name required | string |
| client_name required | string |
| mobile_number required | string |
| barangay_id required | integer |
| city_id required | integer |
| province_id required | integer |
| region_id required | integer |
{- "email": "test@example.com",
- "password": "Test_password1!",
- "password_confirmation": "Test_password1!",
- "first_name": "Jego Carlo",
- "last_name": "Apple",
- "client_name": "Mac Web",
- "mobile_number": "+639064677212",
- "barangay_id": 1,
- "city_id": 3,
- "province_id": 6,
- "region_id": 2
}{- "success": true,
- "data": {
- "token": "<sanctum_auth_token>",
- "token_name": "Mac Web",
- "expires_at": "2023-06-05T12:14:22.470692Z",
- "user": {
- "id": 2,
- "email": "jed23.pa@gmail.com",
- "active": true,
- "email_verified_at": null,
- "created_at": "2023-06-05T00:14:22.000000Z",
- "updated_at": "2023-06-05T00:14:22.000000Z",
- "deleted_at": null,
- "roles": [
- {
- "id": 1,
- "name": "standard_user",
- "pivot": {
- "model_id": 2,
- "role_id": 1,
- "model_type": "App\\Models\\User"
}
}
], - "user_profile": {
- "first_name": "Jego Carlo",
- "last_name": "CApple",
- "middle_name": null,
- "mobile_number": null,
- "telephone_number": null,
- "sex": null,
- "birthday": null,
- "created_at": "2023-06-05T00:14:22.000000Z",
- "updated_at": "2023-06-05T00:14:22.000000Z",
- "deleted_at": null,
- "full_name": "Jego Carlo CApple",
- "profile_picture_url": null,
- "address": {
- "home_address": null,
- "barangay": null,
- "city_id": null,
- "province_id": null,
- "region_id": null,
- "postal_code": null,
- "created_at": "2023-06-05T00:14:22.000000Z",
- "updated_at": "2023-06-05T00:14:22.000000Z",
- "city": null,
- "province": null,
- "region": null
}
}
}
}
}This collection documents API endpoints for user authentication using tokens. The system supports both JSON Web Tokens (JWT), the industry standard for self-contained and verifiable authorization tokens, and Sanctum Opaque Tokens, Laravel's built-in lightweight solution. Both token types require a Bearer token format placed within the Authorization header of requests (format: Authorization: Bearer xyz).
This endpoint triggers the asynchronous process of sending a password reset email to the user's registered email address. Note: A successful response only confirms the email resend request being queued, not immediate delivery. The email will contain instructions for resetting the password.
| email required | string |
{- "email": "jegramos.pa@gmail.com"
}{- "success": true,
- "message": "Password reset request sent",
- "email": "test_email@example.com"
}This collection documents API endpoints for user authentication using tokens. The system supports both JSON Web Tokens (JWT), the industry standard for self-contained and verifiable authorization tokens, and Sanctum Opaque Tokens, Laravel's built-in lightweight solution. Both token types require a Bearer token format placed within the Authorization header of requests (format: Authorization: Bearer xyz).
This endpoint allows authenticated users to update their password. Users can submit a new password through this endpoint to enhance their account security. The URL, which includes the required token query paramater, is specified in the email the users will recieve after invoking the Forgot Password endpoint.
| key | validation |
|---|---|
| token | string, required |
| string, required, valid email format | |
| password | string, required, mixed case + numbers, min of 8, max 100, string |
| password_confirmation | string, required, matches the password field |
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
| token required | string |
| email required | string |
| password required | string |
| password_confirmation required | string |
{- "token": "dummy_token",
- "email": "jegramos.pa@gmail.com",
- "password": "Jeg123123!",
- "password_confirmation": "Jeg123123!"
}{- "success": true,
- "message": "Password reset was successful"
}This collection documents API endpoints for user authentication using tokens. The system supports both JSON Web Tokens (JWT), the industry standard for self-contained and verifiable authorization tokens, and Sanctum Opaque Tokens, Laravel's built-in lightweight solution. Both token types require a Bearer token format placed within the Authorization header of requests (format: Authorization: Bearer xyz).
This sub-collection focuses on functionalities specific to Laravel's Sanctum for token-based authentication. It allows secure token invalidation (revoking user access) and introspection (retrieving a list of currently active tokens for a user). These features enhance security and provide users with granular control over their active login mechanisms.
This endpoint allows users with valid Sanctum access tokens to revoke their current token, effectively logging them out. This functionality is currently limited to Sanctum tokens; JSON Web Tokens do not currently support individual token invalidation.
| all | string Example: all=1 |
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
This collection documents API endpoints for user authentication using tokens. The system supports both JSON Web Tokens (JWT), the industry standard for self-contained and verifiable authorization tokens, and Sanctum Opaque Tokens, Laravel's built-in lightweight solution. Both token types require a Bearer token format placed within the Authorization header of requests (format: Authorization: Bearer xyz).
This sub-collection focuses on functionalities specific to Laravel's Sanctum for token-based authorization. It allows secure token invalidation (revoking user access) and introspection (retrieving a list of currently active tokens for a user). These features enhance security and provide users with granular control over their active login mechanisms.
This endpoint allows authorized users to retrieve a list of access tokens currently issued to them. These tokens represent granted access to the system. Users can then manage these tokens (e.g., revoke access) using the "Revoke Access Tokens" endpoint (limited to Sanctum tokens). Note: Users can only see and manage their own tokens.
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
{- "success": true,
- "data": [
- {
- "id": 2,
- "name": "Jeg's Macbook",
- "expires_at": "2023-06-05T11:46:44.000000Z",
- "last_used_at": null,
- "created_at": "2023-06-04T23:46:44.000000Z"
}, - {
- "id": 3,
- "name": "Jeg's iPhone",
- "expires_at": "2023-06-05T11:57:43.000000Z",
- "last_used_at": "2023-06-04T23:57:59.000000Z",
- "created_at": "2023-06-04T23:57:43.000000Z"
}, - {
- "id": 4,
- "name": "Jeg's Smart TV",
- "expires_at": "2023-06-05T11:57:55.000000Z",
- "last_used_at": null,
- "created_at": "2023-06-04T23:57:55.000000Z"
}
]
}This collection documents API endpoints for user authentication using tokens. The system supports both JSON Web Tokens (JWT), the industry standard for self-contained and verifiable authorization tokens, and Sanctum Opaque Tokens, Laravel's built-in lightweight solution. Both token types require a Bearer token format placed within the Authorization header of requests (format: Authorization: Bearer xyz).
This sub-collection focuses on functionalities specific to Laravel's Sanctum for token-based authentication. It allows secure token invalidation (revoking user access) and introspection (retrieving a list of currently active tokens for a user). These features enhance security and provide users with granular control over their active login mechanisms.
This endpoint allows authenticated users to revoke access tokens, but only for tokens they themselves own. This functionality is currently limited to Sanctum tokens; JSON Web Tokens tokens do not support individual token invalidation.
| key | validation | description |
|---|---|---|
| token_ids | array | array of token ids or "*" to purge everything eg. [1, 2, 3, 4] or ["*"] |
| Accept required | string Example: application/json |
{ "token_ids": [1, 2] }
This collection provides API endpoints for authenticated users to access and manage their own profile information. Users can retrieve their profile data, update specific details, change their password, and update their profile picture.
Get the profile information of the currently authenticated user
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
{- "success": true,
- "data": {
- "id": 1,
- "email": "test_email@example.com",
- "active": true,
- "email_verified_at": "2023-06-04T14:17:57.000000Z",
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-05T00:13:57.000000Z",
- "deleted_at": null,
- "roles": [
- {
- "id": 2,
- "name": "admin",
- "pivot": {
- "model_id": 1,
- "role_id": 2,
- "model_type": "App\\Models\\User"
}
}
], - "user_profile": {
- "first_name": "Jego Carlo",
- "last_name": "Ramos",
- "middle_name": null,
- "mobile_number": null,
- "telephone_number": null,
- "sex": null,
- "birthday": null,
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-04T14:19:21.000000Z",
- "deleted_at": null,
- "full_name": "Jego Carlo Ramos",
- "address": {
- "home_address": null,
- "barangay": null,
- "city_id": null,
- "province_id": null,
- "region_id": null,
- "postal_code": null,
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-04T14:19:21.000000Z",
- "city": null,
- "province": null,
- "region": null
}
}
}
}This collection provides API endpoints for users to access and manage their own profile information. Users can retrieve their profile data, update specific details, change their password, and update their profile picture.
This endpoint allows authenticated users to modify their own profile information. Users can submit changes through this endpoint to update their profile data within the system.
| key | validation |
|---|---|
| optional, unique, valid email format | |
| first_name | optional, string, max length of 255 |
| last_name | optional, string, max length of 255 |
| middle_name | optional, string, max length of 255 |
| ext_name | optional, string, max length of 255 |
| mobile_number | optional, mobile, internaltional format ex. +639064647223 |
| telephone_number | optional, fixedLine, international format ex. +63272839123 |
| sex | optional, `male` or `female` |
| birthday | optional, Y-m-d, date must be before or equal today ex. 1997-01-04 |
| home_address | optional, string, max length of 65,535 |
| barangay_id | optional, valid ID |
| city_id | optional, valid ID |
| province_id | optional, valid ID |
| region_id | optional, valid ID |
| postal_code | optional, 4 digits |
| profile_picture_path | optional, valid URL, max length 255 |
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
| first_name required | string |
| middle_name required | string |
| last_name required | string |
| sex required | string |
| birthday required | string |
| region_id required | integer |
| mobile_number required | string |
{- "first_name": "Jego Carlo edited",
- "middle_name": "Bucu edited",
- "last_name": "Ramos edited",
- "sex": "male",
- "birthday": "1997-12-29",
- "region_id": 2,
- "mobile_number": "+639064647295"
}{- "success": true,
- "data": {
- "id": 1,
- "email": "jegramos.pa@gmail.com",
- "active": true,
- "email_verified_at": "2023-06-04T14:17:57.000000Z",
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-05T00:13:57.000000Z",
- "deleted_at": null,
- "roles": [
- {
- "id": 2,
- "name": "admin",
- "pivot": {
- "model_id": 1,
- "role_id": 2,
- "model_type": "App\\Models\\User"
}
}
], - "user_profile": {
- "first_name": "First Name",
- "last_name": "Last Name",
- "middle_name": "Middle Name",
- "mobile_number": null,
- "telephone_number": null,
- "sex": "male",
- "birthday": "1997-12-29",
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-05T03:16:32.000000Z",
- "deleted_at": null,
- "full_name": "Jego Carlo Bucu Ramos",
- "address": {
- "home_address": null,
- "barangay": null,
- "city_id": null,
- "province_id": null,
- "region_id": null,
- "postal_code": null,
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-05T03:16:32.000000Z",
- "city": null,
- "province": null,
- "region": null
}
}
}
}This collection provides API endpoints for users to access and manage their own profile information. Users can retrieve their profile data, update specific details, change their password, and update their profile picture.
This endpoint allows authenticated users to update their password. Users can submit a new password through this endpoint to enhance their account security.
| key | validation |
|---|---|
| old_password | required, string |
| password | required, string, mixed case + numbers eg. Password123 |
| password_confirmation | required, same as password |
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
| old_password required | string |
| password required | string |
| password_confirmation required | string |
{- "old_password": "Jeg123123!",
- "password": "Jeg123123",
- "password_confirmation": "Jeg123123"
}{- "success": true,
- "message": "Password changed successfully"
}This collection provides API endpoints for users to access and manage their own profile information. Users can retrieve their profile data, update specific details, change their password, and update their profile picture.
This endpoint allows authenticated users to replace their current profile picture with a new image. Users can upload a new image through this endpoint to personalize their profile's visual representation.
| key | validation |
|---|---|
| photo | Maxed size of 5MB, required, image |
| photo required | string <binary> |
{- "success": true,
- "data": {
- "owner_id": 1,
- "path": "images/1/profile-pictures/test_1.png",
}
}This collection provides functionalities for authorized administrators and super users to manage user data within the system. These functionalities include retrieving detailed information about specific users, updating user profiles, creating new user accounts, and soft-deleting users (deactivating accounts while preserving data). Additionally, administrators and super users can search for users by name or email and retrieve paginated user lists for efficient browsing of large datasets.
Retrieve detailed information for a specific user by providing their unique identifier. Useful for viewing individual user profiles.
| key | value |
|---|---|
| api/v1/users/:id | ID of the user |
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
{- "success": true,
- "data": {
- "id": 1,
- "email": "test_user.com",
- "active": true,
- "email_verified_at": "2023-06-04T14:17:57.000000Z",
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-05T03:18:20.000000Z",
- "deleted_at": null,
- "roles": [
- {
- "id": 2,
- "name": "admin",
- "pivot": {
- "model_id": 1,
- "role_id": 2,
- "model_type": "App\\Models\\User"
}
}
], - "user_profile": {
- "first_name": "Test",
- "last_name": "Name",
- "middle_name": "User",
- "mobile_number": null,
- "telephone_number": null,
- "sex": "male",
- "birthday": "1997-12-29",
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-05T03:20:11.000000Z",
- "deleted_at": null,
- "full_name": "Jego Carlo Bucu Ramos",
- "address": {
- "home_address": null,
- "barangay": null,
- "city_id": null,
- "province_id": null,
- "region_id": null,
- "postal_code": null,
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-05T03:20:11.000000Z",
- "city": null,
- "province": null,
- "region": null
}
}
}
}This collection provides functionalities for authorized administrators and super users to manage user data within the system. These functionalities include retrieving detailed information about specific users, updating user profiles, creating new user accounts, and soft-deleting users (deactivating accounts while preserving data). Additionally, administrators and super users can search for users by name or email and retrieve paginated user lists for efficient browsing of large datasets.
Modify the profile information of existing users. This allows for managing user data or making updates on their behalf
| key | value |
|---|---|
| api/v1/users/:id | ID of the user to be updated |
| key | validations |
|---|---|
| first_name | optional, string, max length of 255 |
| last_name | optional, string, max length of 255 |
| middle_name | optional, string, max length of 255 |
| ext_name | optional, string, max length of 255 |
| optional, valid email format, unique | |
| mobile_number | optional, mobile, international format ex. ++639064748223 |
| telephone_number | optional, fixedLine, international format ex. +63272839123 |
| sex | optional, `male` or `female` |
| birthday | optional, Y-m-d, not greater than today ex. 1997-12-20 |
| home_address | optional, string, max length of 65,535 |
| barangay_id | optional, valid ID |
| city_id | optional, valid ID |
| province_id | optional, valid ID |
| region_id | optional, valid ID |
| profile_picture_path | optional, valid URL format, max length of 255 |
| active | optional, boolean |
| email_verified | optional, boolean |
| roles | optional, array of Role IDsex. [1, 2, 3] |
| password | optional, mixed case + numbers, min of 8, max 100, string |
| password_confirmation | same as password |
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
| first_name required | string |
| last_name required | string |
{- "first_name": "First Name",
- "last_name": "Last Name"
}{- "success": true,
- "data": {
- "id": 1,
- "email": "test_email@example.com",
- "active": true,
- "email_verified_at": "2023-06-04T14:17:57.000000Z",
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-05T03:18:20.000000Z",
- "deleted_at": null,
- "roles": [
- {
- "id": 2,
- "name": "admin",
- "pivot": {
- "model_id": 1,
- "role_id": 2,
- "model_type": "App\\Models\\User"
}
}
], - "user_profile": {
- "first_name": "First Name",
- "last_name": "Last Name",
- "middle_name": "Middle Name",
- "mobile_number": null,
- "telephone_number": null,
- "sex": "male",
- "birthday": "1997-12-29",
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-05T03:37:44.000000Z",
- "deleted_at": null,
- "full_name": "Edited first name Bucu Ramos",
- "address": {
- "home_address": null,
- "barangay": null,
- "city_id": null,
- "province_id": null,
- "region_id": null,
- "postal_code": null,
- "created_at": "2023-06-04T14:17:57.000000Z",
- "updated_at": "2023-06-05T03:37:44.000000Z",
- "city": null,
- "province": null,
- "region": null
}
}
}
}This collection provides functionalities for authorized administrators and super users to manage user data within the system. These functionalities include retrieving detailed information about specific users, updating user profiles, creating new user accounts, and soft-deleting users (deactivating accounts while preserving data). Additionally, administrators and super users can search for users by name or email and retrieve paginated user lists for efficient browsing of large datasets.
Deactivate user accounts through a soft deletion process. Soft-deleted users are no longer active but their data remains retrievable in the database.
| key | value |
|---|---|
| api/v1/users/:id | ID of the user to be deleted |
{- "success": false,
- "message": "A super user cannot be deleted.",
- "error_code": "UNAUTHORIZED_ERROR"
}This collection provides functionalities for authorized administrators and super users to manage user data within the system. These functionalities include retrieving detailed information about specific users, updating user profiles, creating new user accounts, and soft-deleting users (deactivating accounts while preserving data). Additionally, administrators and super users can search for users by name or email and retrieve paginated user lists for efficient browsing of large datasets.
Create new user accounts within the system. Crucial for user onboarding and system administration
| key | validations |
|---|---|
| first_name | required, string, max length of 255 |
| last_name | required, string, max length of 255 |
| middle_name | optional, string, max length of 255 |
| ext_name | optional, string, max length of 255 |
| required, valid email format | |
| mobile_number | optional, mobile, international format ex. +639064748223 |
| telephone_number | optional, fixedLine, international format ex. +63272839123 |
| sex | optional, `male` or `female` |
| birthday | optional, Y-m-d, not greater than today ex. 1997-12-20 |
| home_address | optional, string, max length of 65,535 |
| barangay_id | optional, valid ID |
| city_id | optional, valid ID |
| province_id | optional, valid ID |
| region_id | optional, valid ID |
| profile_picture_path | optional, valid URL, max length of 65,535 |
| active | optional, boolean |
| email_verified | optional, boolean |
| roles | required, array of Role IDsex. [1, 2, 3] |
| password | required, mixed case + numbers, min of 8, max 100, string |
| password_confirmation | required, same as password |
| Accept required | string Example: application/json |
| Content-Type | string Example: application/json |
| email required | string |
| password required | string |
| active required | boolean |
| password_confirmation required | string |
| first_name required | string |
| last_name required | string |
| ext_name required | string |
| sex required | string |
| birthday required | string |
| mobile_number required | string |
| barangay_id required | integer |
| city_id required | integer |
| province_id required | integer |
| region_id required | integer |
| email_verified required | boolean |
| roles required | Array of integers |
{- "email": "jegramos.test@gmail.com",
- "password": "Jeg123123",
- "active": true,
- "password_confirmation": "Jeg123123",
- "first_name": "Me",
- "last_name": "Yo",
- "ext_name": "III",
- "sex": "male",
- "birthday": "1900-01-04",
- "mobile_number": "+639064647229",
- "barangay_id": 1,
- "city_id": 3,
- "province_id": 6,
- "region_id": 2,
- "email_verified": false,
- "roles": [
- 1
]
}{- "success": true,
- "data": {
- "id": 4,
- "email": "test_email@example.com",
- "active": true,
- "email_verified_at": null,
- "created_at": "2023-06-05T03:39:59.000000Z",
- "updated_at": "2023-06-05T03:39:59.000000Z",
- "deleted_at": null,
- "roles": [
- {
- "id": 1,
- "name": "standard_user",
- "pivot": {
- "model_id": 4,
- "role_id": 1,
- "model_type": "App\\Models\\User"
}
}
], - "user_profile": {
- "first_name": "First Name",
- "last_name": "Last Name",
- "middle_name": null,
- "mobile_number": "+639064647112",
- "telephone_number": "+63279434285",
- "sex": "male",
- "birthday": "1900-01-04",
- "created_at": "2023-06-05T03:39:59.000000Z",
- "updated_at": "2023-06-05T03:39:59.000000Z",
- "deleted_at": null,
- "full_name": "eg CApple",
- "profile_picture_url": null,
- "address": {
- "home_address": null,
- "barangay": null,
- "city_id": null,
- "province_id": null,
- "region_id": null,
- "postal_code": null,
- "created_at": "2023-06-05T03:39:59.000000Z",
- "updated_at": "2023-06-05T03:39:59.000000Z",
- "city": null,
- "province": null,
- "region": null
}
}
}
}This collection provides functionalities for authorized administrators and super users to manage user data within the system. These functionalities include retrieving detailed information about specific users, updating user profiles, creating new user accounts, and soft-deleting users (deactivating accounts while preserving data). Additionally, administrators and super users can search for users by name or email and retrieve paginated user lists for efficient browsing of large datasets.
Obtain a paginated list of all users within the system. Pagination allows for efficient browsing of large user bases.
| key | description |
|---|---|
| sort_by | The field that the user list should be sorted by Example: ?sort_by=email or ?sort_by=user_profile.last_name |
| sort | Set the sort order. Example: ?sort=asc or ?sort=desc |
| limit | The maximum amount of users that should be displayed per page Example: ?limit=10 |
| page | The current offset of the pagination Example: ?page=1 |
| role | Return users with the specified roles. The value of the query parameter should be the Role ID Example: ?role=1 |
| verified | Filter users via their verification status. Example: ?verified=1 - ruturnes verified users ?verified=2- returns unverfied users |
| Filter users via the specific email provided. Note that you need to encode the email value to be URL safe Example: ?email=te@example.com |
{- "success": true,
- "data": [
- {
- "id": 1,
- "email": "test_email@example.com",
- "active": true,
- "email_verified_at": "2024-03-19T05:30:12.000000Z",
- "created_at": "2024-03-19T13:30:12.000000Z",
- "updated_at": "2024-03-19T13:30:12.000000Z",
- "deleted_at": null,
- "roles": [
- {
- "id": 2,
- "name": "admin",
- "pivot": {
- "model_type": "App\\Models\\User",
- "model_id": 1,
- "role_id": 2
}
}
], - "user_profile": {
- "first_name": "First Name",
- "last_name": "Last Name",
- "middle_name": null,
- "ext_name": null,
- "mobile_number": null,
- "telephone_number": null,
- "sex": null,
- "birthday": null,
- "created_at": "2024-03-19T13:30:12.000000Z",
- "updated_at": "2024-03-19T13:30:12.000000Z",
- "deleted_at": null,
- "full_name": "jeg ramos",
- "profile_picture_url": null,
- "address": {
- "home_address": null,
- "barangay_id": null,
- "city_id": null,
- "province_id": null,
- "region_id": null,
- "postal_code": null,
- "created_at": "2024-03-19T13:30:12.000000Z",
- "updated_at": "2024-03-19T13:30:12.000000Z",
- "city": null,
- "province": null,
- "region": null,
- "barangay": null
}
}
}
], - "pagination": {
- "current_page": 1,
- "last_page": 1,
- "next_page_url": null,
- "prev_page_url": null,
- "from": 1,
- "to": 1,
- "per_page": 15,
- "total": 1,
}
}This collection provides functionalities for authorized administrators and super users to manage user data within the system. These functionalities include retrieving detailed information about specific users, updating user profiles, creating new user accounts, and soft-deleting users (deactivating accounts while preserving data). Additionally, administrators and super users can search for users by name or email and retrieve paginated user lists for efficient browsing of large datasets.
Replace the profile picture of any user with a new image. This functionality can be helpful for managing user profiles or branding purposes
| Key | Description |
|---|---|
| /api/v1/users/:id | ID of the user |
| Key | Validation |
|---|---|
| photo | Maxed size of 5MB, required, valid image format |
| photo required | string <binary> |
{- "success": true,
- "data": {
- "owner_id": "7",
- "path": "images/7/profile-pictures/test.png",
}
}This collection provides functionalities for authorized administrators and super users to manage user data within the system. These functionalities include retrieving detailed information about specific users, updating user profiles, creating new user accounts, and soft-deleting users (deactivating accounts while preserving data). Additionally, administrators and super users can search for users by name or email and retrieve paginated user lists for efficient browsing of large datasets.
Search for users based on their name or email address. This functionality facilitates efficient identification and management of users
| key | description |
|---|---|
| query | A string value that can be part of the user's name or email Example: ?query=Lastname ?query=email-2 |
| query required | string Example: query=Ramos |
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
{- "success": true,
- "data": [
- {
- "id": 1,
- "email": "test_email@example.com",
- "active": true,
- "email_verified_at": "2024-03-19T05:30:12.000000Z",
- "created_at": "2024-03-19T13:30:12.000000Z",
- "updated_at": "2024-03-21T10:53:53.000000Z",
- "deleted_at": null,
- "user_id": 1,
- "first_name": "First Name",
- "last_name": "Last Name",
- "middle_name": null,
- "ext_name": null,
- "mobile_number": null,
- "telephone_number": null,
- "sex": null,
- "birthday": null,
- "profile_picture_path": "images/1/profile-pictures/test.png",
- "roles": [
- {
- "id": 2,
- "name": "admin",
- "pivot": {
- "model_type": "App\\Models\\User",
- "model_id": 1,
- "role_id": 2
}
}
], - "user_profile": {
- "first_name": "jeg",
- "last_name": "ramos",
- "middle_name": null,
- "ext_name": null,
- "mobile_number": null,
- "telephone_number": null,
- "sex": null,
- "birthday": null,
- "created_at": "2024-03-19T13:30:12.000000Z",
- "updated_at": "2024-03-21T10:53:53.000000Z",
- "deleted_at": null,
- "full_name": "jeg ramos",
- "address": {
- "home_address": null,
- "barangay_id": null,
- "city_id": null,
- "province_id": null,
- "region_id": null,
- "postal_code": null,
- "created_at": "2024-03-19T13:30:12.000000Z",
- "updated_at": "2024-03-21T10:53:53.000000Z",
- "city": null,
- "province": null,
- "region": null,
- "barangay": null
}
}
}
], - "pagination": {
- "current_page": 1,
- "last_page": 1,
- "next_page_url": null,
- "prev_page_url": null,
- "from": 1,
- "to": 1,
- "per_page": 15,
- "total": 1,
}
}This collection provides functionalities for authorized administrators and super users to manage user data within the system. These functionalities include retrieving detailed information about specific users, updating user profiles, creating new user accounts, and soft-deleting users (deactivating accounts while preserving data). Additionally, administrators and super users can search for users by name or email and retrieve paginated user lists for efficient browsing of large datasets.
This endpoint allows you to activate a user account. Once activated, the user can access any authenticated endpoint within the system, provided they have the appropriate permissions assigned to their role.
| key | value |
|---|---|
| api/v1/users/:id/activate | ID of the user |
{ }This collection provides functionalities for authorized administrators and super users to manage user data within the system. These functionalities include retrieving detailed information about specific users, updating user profiles, creating new user accounts, and soft-deleting users (deactivating accounts while preserving data). Additionally, administrators and super users can search for users by name or email and retrieve paginated user lists for efficient browsing of large datasets.
This endpoint allows you to deactivate a user account. A deactivated user will no longer be able to access any authenticated endpoints within the system, including logging in.
| key | value |
|---|---|
| api/v1/users/:id/deactivate | ID of the user |
{ }This public endpoint allows verification of email address availability before registration, user creation/update by authorized admins, and user profile updates. This functionality helps prevent duplicate registrations and ensures data integrity within the system. Users can leverage this endpoint to avoid registration errors, while authorized admins can validate information during user management tasks.
Query Parameters
| value | description |
|---|---|
| value | URL-safe email string |
| excluded_id | optional, valid User ID |
| value required | string Example: value=test-email@gmail.com |
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
{- "success": true,
- "data": {
- "is_available": false
}
}This public endpoint allows verification of mobile number availability before registration, user creation/update by authorized admins, and user profile updates. This functionality helps prevent duplicate registrations and ensures data integrity within the system. Users can leverage this endpoint to avoid registration errors, while authorized admins can validate information during user management tasks.
Query Parameters
| value | description |
|---|---|
| value | URL-safe mobile number |
| excluded_id | optional, valid User ID |
| value required | string Example: value=%2B639064647295 |
| Accept required | string Example: application/json |
| Content-Type required | string Example: application/json |
{- "success": true,
- "data": {
- "is_available": true
}
}This collection offers public API endpoints for verifying the availability of email addresses and mobile numbers. These checks can be performed during user registration to avoid duplicates, by authorized admins during user creation or update for data integrity, and by users themselves when updating their profiles. This functionality helps prevent duplicate registrations and ensures unique user data within the system.
Retrieve a list of all Philippine regions
| Key | Value |
|---|---|
| code | The code_correnpondence of the region ex: ?code=123123123 |
| code required | string Example: code=1600000000 |
{- "success": true,
- "data": [
- {
- "id": 17,
- "code": "150000000",
- "name": "Autonomous Region In Muslim Mindanao",
- "alt_name": "ARMM",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 8,
- "code": "050000000",
- "name": "Bicol Region",
- "alt_name": "Region V",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 4,
- "code": "020000000",
- "name": "Cagayan Valley",
- "alt_name": "Region II",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 6,
- "code": "040000000",
- "name": "CALABARZON",
- "alt_name": "Region IV-A",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 16,
- "code": "160000000",
- "name": "CARAGA",
- "alt_name": "Region XIII",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 5,
- "code": "030000000",
- "name": "Central Luzon",
- "alt_name": "Region III",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 10,
- "code": "070000000",
- "name": "Central Visayas",
- "alt_name": "Region VII",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 2,
- "code": "140000000",
- "name": "Cordillera Administrative Region",
- "alt_name": "CAR",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 14,
- "code": "110000000",
- "name": "Davao Region",
- "alt_name": "Region XI",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 11,
- "code": "080000000",
- "name": "Eastern Visayas",
- "alt_name": "Region VIII",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 3,
- "code": "010000000",
- "name": "Ilocos Region",
- "alt_name": "Region I",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 7,
- "code": "170000000",
- "name": "Mimaropa Region",
- "alt_name": "MIMAROPA",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 1,
- "code": "130000000",
- "name": "National Capital Region",
- "alt_name": "NCR",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 13,
- "code": "100000000",
- "name": "Northern Mindanao",
- "alt_name": "Region X",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 15,
- "code": "120000000",
- "name": "SOCCSKSARGEN",
- "alt_name": "Region XII",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 9,
- "code": "060000000",
- "name": "Western Visayas",
- "alt_name": "Region VI",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 12,
- "code": "090000000",
- "name": "Zamboanga Peninsula",
- "alt_name": "Region IX",
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}
]
}This collection offers public API endpoints for verifying the availability of email addresses and mobile numbers. These checks can be performed during user registration to avoid duplicates, by authorized admins during user creation or update for data integrity, and by users themselves when updating their profiles. This functionality helps prevent duplicate registrations and ensures unique user data within the system.
Retrieve a list of Philippine provinces. The region ID or code correspondence may be specified as query parameters.
| value | description |
|---|---|
| region | Region IDAdd this query param if you need to filter by region ex: ?region=12 |
| code | The code_correnpondence of the province ex: ?code=123123123 |
| region required | string Example: region=47 |
{- "success": true,
- "data": [
- {
- "id": 56,
- "region_id": 12,
- "code": "097200000",
- "name": "Zamboanga Del Norte",
- "alt_name": null,
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 57,
- "region_id": 12,
- "code": "097300000",
- "name": "Zamboanga Del Sur",
- "alt_name": null,
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}, - {
- "id": 58,
- "region_id": 12,
- "code": "098300000",
- "name": "Zamboanga Sibugay",
- "alt_name": null,
- "created_at": "2023-06-04T13:14:15.000000Z",
- "updated_at": "2023-06-04T13:14:15.000000Z"
}
]
}This collection offers public API endpoints for verifying the availability of email addresses and mobile numbers. These checks can be performed during user registration to avoid duplicates, by authorized admins during user creation or update for data integrity, and by users themselves when updating their profiles. This functionality helps prevent duplicate registrations and ensures unique user data within the system.
Retrieve a list of Philippine cities. The province ID or code correspondence may be specified as query parameters.
| value | description |
|---|---|
| province | Province IDAdd this query param if you need to filter by province ex: ?province=28 |
| code | The code_correnpondence of the city ex: ?code=123123123 |
| classification | Filter by municipal or city ex: ?classification=city |
| province required | string Example: province=234 |
{- "success": true,
- "data": [
- {
- "id": 572,
- "province_id": 28,
- "code": "045801000",
- "name": "Angono",
- "full_name": "Angono",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 571,
- "province_id": 28,
- "code": "045802000",
- "name": "Antipolo City",
- "full_name": "City Of Antipolo",
- "alt_name": null,
- "classification": "city",
- "is_capital": true,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 573,
- "province_id": 28,
- "code": "045803000",
- "name": "Baras",
- "full_name": "Baras",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 574,
- "province_id": 28,
- "code": "045804000",
- "name": "Binangonan",
- "full_name": "Binangonan",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 575,
- "province_id": 28,
- "code": "045805000",
- "name": "Cainta",
- "full_name": "Cainta",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 576,
- "province_id": 28,
- "code": "045806000",
- "name": "Cardona",
- "full_name": "Cardona",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 577,
- "province_id": 28,
- "code": "045807000",
- "name": "Jala Jala",
- "full_name": "Jala Jala",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 579,
- "province_id": 28,
- "code": "045809000",
- "name": "Morong",
- "full_name": "Morong",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 580,
- "province_id": 28,
- "code": "045810000",
- "name": "Pililla",
- "full_name": "Pililla",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 578,
- "province_id": 28,
- "code": "045808000",
- "name": "Rodriguez",
- "full_name": "Rodriguez Montalban",
- "alt_name": "Montalban",
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 581,
- "province_id": 28,
- "code": "045811000",
- "name": "San Mateo",
- "full_name": "San Mateo",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 582,
- "province_id": 28,
- "code": "045812000",
- "name": "Tanay",
- "full_name": "Tanay",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 583,
- "province_id": 28,
- "code": "045813000",
- "name": "Taytay",
- "full_name": "Taytay",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 584,
- "province_id": 28,
- "code": "045814000",
- "name": "Teresa",
- "full_name": "Teresa",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}
]
}This collection offers public API endpoints for verifying the availability of email addresses and mobile numbers. These checks can be performed during user registration to avoid duplicates, by authorized admins during user creation or update for data integrity, and by users themselves when updating their profiles. This functionality helps prevent duplicate registrations and ensures unique user data within the system.
Retrieve a list of Philippine barangays. The city ID or code correspondence may be specified as query parameters.
| value | description |
|---|---|
| city | City IDAdd this query param if you need to filter by province ex: ?city=28 |
| code | The code_correnpondence of the barangay ex: ?code=123123123 |
| classification | Filter by rural or urban ex: ?classification=rural |
| city required | string Example: city=861 |
{- "success": true,
- "data": [
- {
- "id": 572,
- "province_id": 28,
- "code": "045801000",
- "name": "Angono",
- "full_name": "Angono",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 571,
- "province_id": 28,
- "code": "045802000",
- "name": "Antipolo City",
- "full_name": "City Of Antipolo",
- "alt_name": null,
- "classification": "city",
- "is_capital": true,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 573,
- "province_id": 28,
- "code": "045803000",
- "name": "Baras",
- "full_name": "Baras",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 574,
- "province_id": 28,
- "code": "045804000",
- "name": "Binangonan",
- "full_name": "Binangonan",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 575,
- "province_id": 28,
- "code": "045805000",
- "name": "Cainta",
- "full_name": "Cainta",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 576,
- "province_id": 28,
- "code": "045806000",
- "name": "Cardona",
- "full_name": "Cardona",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 577,
- "province_id": 28,
- "code": "045807000",
- "name": "Jala Jala",
- "full_name": "Jala Jala",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 579,
- "province_id": 28,
- "code": "045809000",
- "name": "Morong",
- "full_name": "Morong",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 580,
- "province_id": 28,
- "code": "045810000",
- "name": "Pililla",
- "full_name": "Pililla",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 578,
- "province_id": 28,
- "code": "045808000",
- "name": "Rodriguez",
- "full_name": "Rodriguez Montalban",
- "alt_name": "Montalban",
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 581,
- "province_id": 28,
- "code": "045811000",
- "name": "San Mateo",
- "full_name": "San Mateo",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 582,
- "province_id": 28,
- "code": "045812000",
- "name": "Tanay",
- "full_name": "Tanay",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 583,
- "province_id": 28,
- "code": "045813000",
- "name": "Taytay",
- "full_name": "Taytay",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}, - {
- "id": 584,
- "province_id": 28,
- "code": "045814000",
- "name": "Teresa",
- "full_name": "Teresa",
- "alt_name": null,
- "classification": "municipality",
- "is_capital": false,
- "created_at": "2023-06-04T13:14:16.000000Z",
- "updated_at": "2023-06-04T13:14:16.000000Z"
}
]
}Exclusively for authorized admins and super users, this collection provides functionalities for managing roles and permissions within the system. It offers endpoints for retrieving a list of all available user roles and all permissions assignable to both users and API keys. This functionality empowers authorized users to control user access and system behavior.
This endpoint allows authorized admins and super users to retrieve a list of all user roles available within the system. User roles define the level of access and permissions assigned to different user types.
{- "success": true,
- "data": [
- {
- "id": 1,
- "name": "standard_user",
- "guard_name": "sanctum",
- "created_at": "2023-06-05T09:30:22.000000Z",
- "updated_at": "2023-06-05T09:30:22.000000Z"
}, - {
- "id": 2,
- "name": "admin",
- "guard_name": "sanctum",
- "created_at": "2023-06-05T09:30:22.000000Z",
- "updated_at": "2023-06-05T09:30:22.000000Z"
}, - {
- "id": 3,
- "name": "system_support",
- "guard_name": "sanctum",
- "created_at": "2023-06-05T09:30:22.000000Z",
- "updated_at": "2023-06-05T09:30:22.000000Z"
}, - {
- "id": 4,
- "name": "super_user",
- "guard_name": "sanctum",
- "created_at": "2023-06-05T09:30:22.000000Z",
- "updated_at": "2023-06-05T09:30:22.000000Z"
}
]
}Exclusively for authorized admins and super users, this collection provides functionalities for managing roles and permissions within the system. It offers endpoints for retrieving a list of all available user roles and all permissions assignable to both users and API keys. This functionality empowers authorized users to control user access and system behavior.
This endpoint allows authorized admins and super users to retrieve a list of all permissions that can be assigned to both users and API keys. Permissions define granular access controls within the system, determining what actions users or API keys can perform.
| key | value |
|---|---|
| type | The type of permissions attachable to an entity Example ?type=users - View all user permissions (default) ?type=api_keys - View all API Key permssions ?type=all - View all permissions |
{- "success": true,
- "data": [
- {
- "id": 1,
- "name": "standard_user",
- "guard_name": "sanctum",
- "created_at": "2023-06-05T09:30:22.000000Z",
- "updated_at": "2023-06-05T09:30:22.000000Z"
}, - {
- "id": 2,
- "name": "admin",
- "guard_name": "sanctum",
- "created_at": "2023-06-05T09:30:22.000000Z",
- "updated_at": "2023-06-05T09:30:22.000000Z"
}, - {
- "id": 3,
- "name": "system_support",
- "guard_name": "sanctum",
- "created_at": "2023-06-05T09:30:22.000000Z",
- "updated_at": "2023-06-05T09:30:22.000000Z"
}, - {
- "id": 4,
- "name": "super_user",
- "guard_name": "sanctum",
- "created_at": "2023-06-05T09:30:22.000000Z",
- "updated_at": "2023-06-05T09:30:22.000000Z"
}
]
}This collection manages system-wide configuration options. Currently, the only implemented setting is the application theme, which defines the visual appearance of the client application.
Authorized admins and super users can leverage this endpoint to modify application settings, just the theme for now. This functionality allows for customization of the user interface experience.
| key | validation |
|---|---|
| theme | required, `light` or `dark` |
| theme required | string |
{- "theme": "does-not-exists"
}{- "success": true,
- "data": [
- {
- "id": 1,
- "name": "theme",
- "value": "light",
- "created_at": "2023-06-08T02:48:20.000000Z",
- "updated_at": "2023-06-08T02:48:20.000000Z"
}
]
}This public endpoint retrieves the current application settings, specifically (for the current implementation) the theme configuration. This information helps the client application render the appropriate visual style.
{- "success": true,
- "data": [
- {
- "id": 1,
- "name": "theme",
- "value": "light",
- "created_at": "2023-06-08T02:48:20.000000Z",
- "updated_at": "2023-06-08T02:48:20.000000Z"
}
]
}This is a test webhook endpoint that demonstrate fetching resources via the X-API-KEY HTTP header
{- "success": true,
- "data": {
- "name": "Test 1",
- "description": "Test Description"
}
}This collection serves as a demonstration of API key authentication and authorization within the system, specifically focusing on webhooks. It utilizes a sample implementation, but the core functionalities can be adapted for various webhook-based integrations. Developers can leverage this example as a foundation to build upon and customize webhook functionalities based on their specific requirements.
Authentication: This collection utilizes API key authentication. Requests to these endpoints must include a custom header named X-API-KEY containing your valid API key.
Note: The only way to create an API Key is via the console command, there are currently no endpoints exposed for API key management
This endpoint serves as an example for creating test resources. A custom implementation could utilize this concept to create actual data or trigger specific actions upon receiving webhooks.
{- "success": true,
- "message": "Test Resource Created"
}These endpoints handle Multi-Factor Authentication (MFA) using both app-based and delivery-based methods. This means that users can configure and utilize MFA through authentication apps on their devices or receive verification codes via SMS, email, or other delivery options.
This endpoint allows users to verify the one-time passcode (OTP) received during the current multi-factor authentication (MFA) step.
| key | value |
|---|---|
| code | required, string, valid OTP code |
| token | required, valid MFA token |
| token required | string |
| code required | integer |
{- "token": "4|FC3712F8-ECFC-4BD0-84BF-1E860FC4C559",
- "code": 1232
}{- "success": true,
- "data": {
- "message": "MFA code validation success",
- "current_step": "email_channel",
- "next_step": "google_authenticator"
}
}These endpoints handle Multi-Factor Authentication (MFA) using both app-based and delivery-based methods. This means that users can configure and utilize MFA through authentication apps on their devices or receive verification codes via SMS, email, or other delivery options.
This endpoint allows users to send a One-Time-Password to the current delivery-based MFA step. Please note: A successful response only confirms the OTP request being queued, not immediate delivery.
| key | value |
|---|---|
| token | required, valid MFA token |
{- "success": true,
- "message": "OTP sent successfully",
- "current_step": "email_channel"
}These endpoints handle Multi-Factor Authentication (MFA) using both app-based and delivery-based methods. This means that users can configure and utilize MFA through authentication apps on their devices or receive verification codes via SMS, email, or other delivery options.
This endpoint allows users to generate a QR code (along with the backup codes and secret key) for the current app-based MFA step
| key | value |
|---|---|
| token | required, valid MFA token |
{- "success": true,
- "data": {
- "qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSU-long-text-base64-sample",
- "current_step": "google_authenticator",
- "backup_codes": [
- "sample-1",
- "sample-2",
- "sample-3",
- "sample-4",
- "sample-5",
- "sample-6",
- "sample-7",
- "sample-8",
- "sample-9",
- "sample-10"
], - "secret_key": "<secret>"
}
}These endpoints handle Multi-Factor Authentication (MFA) using both app-based and delivery-based methods. This means that users can configure and utilize MFA through authentication apps on their devices or receive verification codes via SMS, email, or other delivery options.
This endpoint allows users to use a back-up code for the current app-based MFA step to re-generate the QR code (with secret key)
| key | value |
|---|---|
| token | required, valid MFA token |
| code | required, valid Back-up code, one time use |
{ }{- "success": true,
- "data": {
- "message": "Backup code validation success. New QR code generated.",
- "current_step": "google_authenticator",
- "qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA-long-text-base64",
- "secret_key": "<secret_key>"
}
}These endpoints handle Multi-Factor Authentication (MFA) using both app-based and delivery-based methods. This means that users can configure and utilize MFA through authentication apps on their devices or receive verification codes via SMS, email, or other delivery options.
This endpoint enables users to fetch all the currently available MFA Methods.
{- "success": true,
- "data": [
- {
- "name": "email_channel",
- "enabled": false,
- "type": "delivery"
}, - {
- "name": "google_authenticator",
- "enabled": true,
- "type": "app"
}
]
}These endpoints handle Multi-Factor Authentication (MFA) using both app-based and delivery-based methods. This means that users can configure and utilize MFA through authentication apps on their devices or receive verification codes via SMS, email, or other delivery options.
This endpoint allows admins and super users to un-enroll a user from an MFA method. This is useful when the user loses their primary MFA device and all their backup codes. When the user logs in again, they will be presented with the app-based MFA QR code that they can re-scan
| key | value |
|---|---|
| mfa_step | required, valid MFA step (email_channel, google_authenticator) |
{- "success": true,
- "message": "User successfully un-enrolled"
}