Webkit API (1.0.0)

Download OpenAPI specification:Download

Authentication

Resend Email Verification

Authentication

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).

Endpoint Description

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.

header Parameters
Accept
required
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Email verification sent",
  • "email": "jegramos.pa@gmail.com"
}

Create Access Token

Authentication

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).

Endpoint Description

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.

Query Parameters

Key Validation
?auth_type `sanctum` or `jwt`,
optional

Payload

Key Validation
email 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
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json
Request Body schema: application/json
email
required
string
password
required
string
client_name
required
string
with_user
required
boolean

Responses

Request samples

Content type
application/json
{
  • "email": "jegramos.admin@gmail.com",
  • "password": "Jeg123123",
  • "client_name": "Jeg's Macbook",
  • "with_user": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Register

Authentication

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).

Endpoint Description

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.

Query Parameters

Key Validation
?auth_type `sanctum` or `jwt`,
optional

Payload

key validation
email 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
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "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
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Request Forgot Password Link

Authentication

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).

Endpoint Description

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.

Request Body schema: application/json
email
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "jegramos.pa@gmail.com"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Password reset request sent",
  • "email": "test_email@example.com"
}

Reset password

Authentication

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).

Endpoint Description

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.

Payload

key validation
token string, required
email 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
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json
Request Body schema: application/json
token
required
string
email
required
string
password
required
string
password_confirmation
required
string

Responses

Request samples

Content type
application/json
{
  • "token": "dummy_token",
  • "email": "jegramos.pa@gmail.com",
  • "password": "Jeg123123!",
  • "password_confirmation": "Jeg123123!"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Password reset was successful"
}

Authentication/Sanctum

Invalidate Current Access Token

Authentication

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).

Authentication/Sanctum

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.

Endpoint Description

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.

Authorizations:
bearer
query Parameters
all
string
Example: all=1
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json

Responses

Get Access Tokens

Authentication

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).

Authentication/Sanctum

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.

Description

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.

Authorizations:
bearer
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ]
}

Invalidate Multiple Access Tokens

Authentication

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).

Authentication/Sanctum

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.

Endpoint Description

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.

Payload

key validation description
token_ids array array of token ids or "*" to purge everything

eg.
[1, 2, 3, 4] or ["\*"]
Authorizations:
bearer
header Parameters
Accept
required
string
Example: application/json
Request Body schema: text/plain
string

Responses

Request samples

Content type
text/plain
{
    "token_ids": [1, 2]
}

Profile

View Profile

Profile

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.

Endpoint Description

Get the profile information of the currently authenticated user

Authorizations:
bearer
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Update Profile

Profile

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.

Endpoint Description

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.

Payload

key validation
email 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
Authorizations:
bearer
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json
Request Body schema: 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

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Change Password

Profile

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.

Endpoint Description

This endpoint allows authenticated users to update their password. Users can submit a new password through this endpoint to enhance their account security.

Payload

key validation
old_password required, string
password required, string, mixed case + numbers

eg.
Password123
password_confirmation required, same as password
Authorizations:
bearer
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json
Request Body schema: application/json
old_password
required
string
password
required
string
password_confirmation
required
string

Responses

Request samples

Content type
application/json
{
  • "old_password": "Jeg123123!",
  • "password": "Jeg123123",
  • "password_confirmation": "Jeg123123"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Password changed successfully"
}

Upload Profile Picture

Profile

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.

Endpoint Description

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.

Payload

key validation
photo Maxed size of 5MB, required, image
Authorizations:
bearer
Request Body schema: multipart/form-data
photo
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {}
}

Users

Show User

Users

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.

Endpoint Description

Retrieve detailed information for a specific user by providing their unique identifier. Useful for viewing individual user profiles.

Route Parameters

key value
api/v1/users/:id ID of the user
Authorizations:
bearer
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Update User

Users

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.

Endpoint Description

Modify the profile information of existing users. This allows for managing user data or making updates on their behalf

Parameter

key value
api/v1/users/:id ID of the user to be updated

Payload

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
email 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
Authorizations:
bearer
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json
Request Body schema: application/json
first_name
required
string
last_name
required
string

Responses

Request samples

Content type
application/json
{
  • "first_name": "First Name",
  • "last_name": "Last Name"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Delete User

Users

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.

Endpoint Description

Deactivate user accounts through a soft deletion process. Soft-deleted users are no longer active but their data remains retrievable in the database.

Parameter

key value
api/v1/users/:id ID of the user to be deleted
Authorizations:
bearer

Responses

Response samples

Content type
application/json
{
  • "success": false,
  • "message": "A super user cannot be deleted.",
  • "error_code": "UNAUTHORIZED_ERROR"
}

Create User

Users

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.

Endpoint Description

Create new user accounts within the system. Crucial for user onboarding and system administration

Payload

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
email 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
Authorizations:
bearer
header Parameters
Accept
required
string
Example: application/json
Content-Type
string
Example: application/json
Request Body schema: 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

Responses

Request samples

Content type
application/json
{
  • "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": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Fetch Users

Users

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.

Endpoint Description

Obtain a paginated list of all users within the system. Pagination allows for efficient browsing of large user bases.

Query Parameters

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
email 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
Authorizations:
bearer

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ],
  • "pagination": {}
}

Upload Profile Picture

Users

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.

Endpoint Description

Replace the profile picture of any user with a new image. This functionality can be helpful for managing user profiles or branding purposes

Parameters

Key Description
/api/v1/users/:id ID of the user

Payload

Key Validation
photo Maxed size of 5MB, required, valid image format
Authorizations:
bearer
Request Body schema: multipart/form-data
photo
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {}
}

Search Users

Users

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.

Endpoint Description

Search for users based on their name or email address. This functionality facilitates efficient identification and management of users

Query Parameters

key description
query A string value that can be part of the user's name or email

Example:

?query=Lastname ?query=email-2
Authorizations:
bearer
query Parameters
query
required
string
Example: query=Ramos
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ],
  • "pagination": {}
}

Availabilities

Get email availability

Description

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
query Parameters
value
required
string
Example: value=test-email@gmail.com
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Get mobile number availability

Description

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
query Parameters
value
required
string
Example: value=%2B639064647295
header Parameters
Accept
required
string
Example: application/json
Content-Type
required
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Address

Fetch Regions

Address

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.

Description

Retrieve a list of all Philippine regions

Query Parameters

Key Value
code The code_correnpondence of the region

ex:
?code=123123123
query Parameters
code
required
string
Example: code=1600000000

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ]
}

Fetch Provinces

Address

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.

Endpoint Description

Retrieve a list of Philippine provinces. The region ID or code correspondence may be specified as query parameters.

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
query Parameters
region
required
string
Example: region=47

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ]
}

Fetch Cities

Address

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.

Endpoint Description

Retrieve a list of Philippine cities. The province ID or code correspondence may be specified as query parameters.

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
query Parameters
province
required
string
Example: province=234

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ]
}

Fetch Barangays

Address

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.

Endpoint Description

Retrieve a list of Philippine barangays. The city ID or code correspondence may be specified as query parameters.

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
query Parameters
city
required
string
Example: city=861

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ]
}

Roles and Permissions

Fetch All Roles

Roles and Permissions

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.

Endpoint Description

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.

Authorizations:
bearer

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ]
}

Fetch All Permissions

Roles and Permissions

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.

Endpoint Description

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.

Query Paramaters

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
Authorizations:
bearer

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ]
}

App Settings

Save App Settings

App Settings

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.

Endpoint Description

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.

Payload

key validation
theme required, `light` or `dark`
Authorizations:
bearer
Request Body schema: application/json
theme
required
string

Responses

Request samples

Content type
application/json
{
  • "theme": "does-not-exists"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ]
}

Fetch App Settings

Description

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.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ]
}

Webhooks

Fetch Test Resources

Description

This is a test webhook endpoint that demonstrate fetching resources via the X-API-KEY HTTP header

Authorizations:
apikey-header-X-API-KEY

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Create Test Resource

Webhooks

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

Endpoint Description

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.

Authorizations:
apikey-header-X-API-KEY

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Test Resource Created"
}