Introduction
This documentation provides all the essential information you need to effectively work with the AleosApp API.
This improved version aligns more closely with AleosApp, making it specific and user-focused. Let me know if you'd like further refinements!
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Authorization
This endpoint allows a user to log in by providing valid credentials. It also returns the user's settings, role, and permissions to facilitate frontend access.
Log in a user and return a token.
Example request:
curl --request POST \
"https://apialeosapp.xioagency.com/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"login\": \"aleos.administrator@aleosapp.com\",
\"password\": \"aleos123456789\"
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"login": "aleos.administrator@aleosapp.com",
"password": "aleos123456789"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"user": {
"id": 1,
"name": "John Doe",
"email": "aleos.administrator@aleosapp.com",
"created_at": "2025-01-10T12:00:00.000000Z",
"updated_at": "2025-01-10T12:00:00.000000Z"
},
"settings": [
{
"id": 1,
"parent_id": 1,
"language": "en",
"colors": {
"primary": "#000000",
"secondary": "#FFFFFF"
},
"icons": "default",
"url": "https://example.com",
"setting": {
"notifications": true
},
"setting_backup": {
"notifications": false
},
"created_at": "2025-01-10T12:00:00.000000Z",
"updated_at": "2025-01-10T12:00:00.000000Z"
}
],
"role": "administrator",
"permissions": [
"administrative.dashboard.index",
"administrative.settings.index"
],
"token": "1|abcd1234efgh5678"
}
Example response (200):
{
"user": {
"id": 2,
"name": "Jane Doe",
"email": "aleos.administrator@aleosapp.com",
"created_at": "2025-01-10T12:00:00.000000Z",
"updated_at": "2025-01-10T12:00:00.000000Z"
},
"settings": [
{
"id": 2,
"parent_id": 2,
"language": "en",
"colors": {
"primary": "#111111",
"secondary": "#222222"
},
"icons": "minimal",
"url": "https://example.com/coach",
"setting": {
"notifications": true
},
"setting_backup": {
"notifications": false
},
"created_at": "2025-01-10T12:00:00.000000Z",
"updated_at": "2025-01-10T12:00:00.000000Z"
}
],
"role": "coach",
"permissions": [
"administrative.dashboard.index"
],
"token": "1|efgh5678abcd1234"
}
Example response (401):
{
"message": "Invalid credentials"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Send a password reset link to the user's email.
Example request:
curl --request POST \
"https://apialeosapp.xioagency.com/api/password/forgot" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"johndoe@example.com\"
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/password/forgot"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "johndoe@example.com"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Password reset link sent successfully."
}
Example response (404):
{
"message": "We couldn't find a user with that email address."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reset the user's password.
Example request:
curl --request POST \
"https://apialeosapp.xioagency.com/api/password/reset" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"johndoe@example.com\",
\"token\": \"abc123\",
\"password\": \"newpassword123\",
\"password_confirmation\": \"newpassword123\"
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/password/reset"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "johndoe@example.com",
"token": "abc123",
"password": "newpassword123",
"password_confirmation": "newpassword123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Password reset successfully."
}
Example response (400):
{
"message": "Invalid token or email."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
GET api/user
Example request:
curl --request GET \
--get "https://apialeosapp.xioagency.com/api/user" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/user"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
access-control-expose-headers: *
access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS
access-control-allow-headers: Content-Type, Authorization, X-Requested-With
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Setting
This endpoint retrieves the template field for the module associated with the settings of the authenticated user.
Get the template for the current user's settings.
requires authentication
Example request:
curl --request GET \
--get "https://apialeosapp.xioagency.com/api/setting" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"template": {
"layout": "settings",
"fields": [
{
"name": "site_name",
"type": "text"
},
{
"name": "email",
"type": "email"
}
]
}
}
Example response (404):
{
"message": "Template for the current setting not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Profile - Store or Update Profile
requires authentication
This endpoint allows the authenticated user to create or update their profile. Additionally, users can add custom fields to store personalized information.
Example request:
curl --request POST \
"https://apialeosapp.xioagency.com/api/setting/profile" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "first_name=John"\
--form "last_name=Doe"\
--form "gender=male"\
--form "date_birth=1990-01-01"\
--form "id_number=123456789"\
--form "language=en"\
--form "billing_phone_number=+1234567890"\
--form "billing_country=United States"\
--form "billing_email=john.doe@example.com"\
--form "billing_state=California"\
--form "billing_address=123 Main Street"\
--form "billing_zip_code=90210"\
--form "image=@/tmp/phptwgMem" const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/profile"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('gender', 'male');
body.append('date_birth', '1990-01-01');
body.append('id_number', '123456789');
body.append('language', 'en');
body.append('billing_phone_number', '+1234567890');
body.append('billing_country', 'United States');
body.append('billing_email', 'john.doe@example.com');
body.append('billing_state', 'California');
body.append('billing_address', '123 Main Street');
body.append('billing_zip_code', '90210');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"message": "Profile updated successfully",
"profile": {
"id": 1,
"user_id": 1,
"first_name": "John",
"last_name": "Doe",
"gender": "male",
"date_birth": "1990-01-01",
"id_number": "123456789",
"language": "en",
"billing_phone_number": "+1234567890",
"billing_country": "United States",
"billing_email": "john.doe@example.com",
"billing_state": "California",
"billing_address": "123 Main Street",
"billing_zip_code": "90210",
"image_url": "https://s3.amazonaws.com/bucket-name/profile-images/image.jpg",
"created_at": "2025-01-16T00:00:00.000000Z",
"updated_at": "2025-01-16T00:00:00.000000Z"
},
"custom_fields": [
{
"slug": "father_name",
"value": "Oscar Perez"
},
{
"slug": "hobby",
"value": "Fútbol"
}
]
}
Example response (201):
{
"message": "Profile created successfully",
"profile": {
"id": 1,
"user_id": 1,
"first_name": "John",
"last_name": "Doe",
"gender": "male",
"date_birth": "1990-01-01",
"id_number": "123456789",
"language": "en",
"billing_phone_number": "+1234567890",
"billing_country": "United States",
"billing_email": "john.doe@example.com",
"billing_state": "California",
"billing_address": "123 Main Street",
"billing_zip_code": "90210",
"image_url": "https://s3.amazonaws.com/bucket-name/profile-images/image.jpg",
"created_at": "2025-01-16T00:00:00.000000Z",
"updated_at": "2025-01-16T00:00:00.000000Z"
},
"custom_fields": [
{
"slug": "father_name",
"value": "Oscar Perez"
},
{
"slug": "hobby",
"value": "soccer"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Profile - Change Password
requires authentication
This endpoint allows the authenticated user to change their password.
Example request:
curl --request POST \
"https://apialeosapp.xioagency.com/api/setting/change-password" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"current_password\": \"currentPassword123\",
\"new_password\": \"NewPassword123\",
\"new_password_confirmation\": \"NewPassword123\"
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/change-password"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"current_password": "currentPassword123",
"new_password": "NewPassword123",
"new_password_confirmation": "NewPassword123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Password changed successfully."
}
Example response (400):
{
"message": "Current password does not match."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
School - List All Schools for Administrative User
requires authentication
This endpoint returns a list of schools associated with the authenticated administrative user.
Usage
- Use the
filtersparameter to apply dynamic filters in JSON format. - Use the
searchparameter to perform a global search across all columns.
How to Send Parameters
filters: JSON string to apply dynamic filters. Example:{ "status": "active", "created_at": { "from": "2023-01-01", "to": "2023-12-31" }, "nickname": "Wildcats" }When encoded in the URL, it should look like this:
filters={"status":"active","created_at":{"from":"2023-01-01","to":"2023-12-31"},"nickname":"Wildcats"}search: String for global search. Example:search=Wildcats
Example request:
curl --request GET \
--get "https://apialeosapp.xioagency.com/api/setting/schools?only_archived=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/schools"
);
const params = {
"only_archived": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"schools": {
"data": [
{
"id": 1,
"nickname": "Wildcats",
"address": "123 Main St",
"status": "archived",
"created_at": "2023-01-15T00:00:00.000000Z",
"updated_at": "2023-06-10T00:00:00.000000Z",
"administrative": {
"id": 1,
"name": "John Doe"
},
"creator": {
"id": 2,
"name": "Jane Smith"
},
"school_sites": [
{
"id": 1,
"name": "Main Campus",
"locations": [
{
"id": 1,
"name": "Field A",
"description": "Main soccer field"
}
]
}
]
}
],
"links": {
"first": "http://example.com/api/setting/schools?page=1",
"last": "http://example.com/api/setting/schools?page=10",
"prev": null,
"next": "http://example.com/api/setting/schools?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 10,
"path": "http://example.com/api/setting/schools",
"per_page": 10,
"to": 10,
"total": 100
}
},
"metadata": {
"columns": [
"id",
"nickname",
"address",
"status",
"created_at",
"updated_at",
"administrative.name",
"creator.name"
],
"defaultColumns": [
"id",
"nickname",
"address",
"description"
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
School - Create a New School
requires authentication
This endpoint allows the authenticated user to create a new school, including its associated school sites and locations. Additionally, the school's photo is managed using a polymorphic relationship.
Example request:
curl --request POST \
"https://apialeosapp.xioagency.com/api/setting/schools" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "nickname=Wildcats"\
--form "address=123 Main St"\
--form "sport=Soccer"\
--form "description=A leading sports school."\
--form "status=active"\
--form "name_representative=John"\
--form "last_name_representative=Doe"\
--form "id_number_representative=123456789"\
--form "phone_number_representative=+1234567890"\
--form "email_representative=john.doe@example.com"\
--form "school_sites[][locations][][name]=tnpwck"\
--form "school_sites[][locations][][description]=Dolores sint illo sit dolorem."\
--form "photo=@/tmp/phpPtzC35" const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/schools"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('nickname', 'Wildcats');
body.append('address', '123 Main St');
body.append('sport', 'Soccer');
body.append('description', 'A leading sports school.');
body.append('status', 'active');
body.append('name_representative', 'John');
body.append('last_name_representative', 'Doe');
body.append('id_number_representative', '123456789');
body.append('phone_number_representative', '+1234567890');
body.append('email_representative', 'john.doe@example.com');
body.append('school_sites[][locations][][name]', 'tnpwck');
body.append('school_sites[][locations][][description]', 'Dolores sint illo sit dolorem.');
body.append('photo', document.querySelector('input[name="photo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (201):
{
"message": "School created successfully",
"school": {
"id": 1,
"nickname": "Wildcats",
"address": "123 Main St",
"school_sites": [
{
"id": 1,
"name": "Main Campus",
"phone": "123456",
"address": "123 Main St",
"email": "campus@example.com",
"locations": [
{
"id": 1,
"name": "Field A",
"description": "Main soccer field"
}
]
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
School - View Details of a Specific School
requires authentication
This endpoint retrieves the details of a specific school, including its associated school sites and locations. Only the administrator who owns the school can view it.
Example request:
curl --request GET \
--get "https://apialeosapp.xioagency.com/api/setting/schools/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/schools/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"message": "School retrieved successfully",
"school": {
"id": 1,
"nickname": "Wildcats",
"address": "123 Main St",
"sport": "Soccer",
"status": "active",
"name_representative": "John",
"last_name_representative": "Doe",
"id_number_representative": "123456789",
"phone_number_representative": "+1234567890",
"email_representative": "john.doe@example.com",
"photo_url": "https://s3.amazonaws.com/bucket-name/schools/photos/photo.jpg",
"school_sites": [
{
"id": 1,
"name": "Main Campus",
"phone": "123456",
"address": "123 Main St",
"email": "campus@example.com",
"locations": [
{
"id": 1,
"name": "Field A",
"description": "Main soccer field",
"state": "active"
}
]
}
]
}
}
Example response (404):
{
"message": "School not found or unauthorized."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
School - Update an Existing School
requires authentication
This endpoint allows the authenticated user to update an existing school, including its associated school sites and locations. Additionally, the school's photo can be updated using a polymorphic relationship. If new sites or locations are provided, they will be created. Existing sites and locations will be updated if their IDs are included.
Example request:
curl --request PUT \
"https://apialeosapp.xioagency.com/api/setting/schools/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "nickname=Wildcats"\
--form "address=123 Main St"\
--form "sport=Soccer"\
--form "description=A leading sports school."\
--form "status=active"\
--form "name_representative=John"\
--form "last_name_representative=Doe"\
--form "id_number_representative=123456789"\
--form "phone_number_representative=+1234567890"\
--form "email_representative=john.doe@example.com"\
--form "school_sites[][locations][][name]=aw"\
--form "school_sites[][locations][][description]=Voluptas ut non eligendi doloribus ducimus."\
--form "photo=@/tmp/phpdkzT6o" const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/schools/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('nickname', 'Wildcats');
body.append('address', '123 Main St');
body.append('sport', 'Soccer');
body.append('description', 'A leading sports school.');
body.append('status', 'active');
body.append('name_representative', 'John');
body.append('last_name_representative', 'Doe');
body.append('id_number_representative', '123456789');
body.append('phone_number_representative', '+1234567890');
body.append('email_representative', 'john.doe@example.com');
body.append('school_sites[][locations][][name]', 'aw');
body.append('school_sites[][locations][][description]', 'Voluptas ut non eligendi doloribus ducimus.');
body.append('photo', document.querySelector('input[name="photo"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());Example response (200):
{
"message": "School updated successfully",
"school": {
"id": 1,
"nickname": "Wildcats",
"address": "123 Main St",
"sport": "Soccer",
"status": "active",
"name_representative": "John",
"last_name_representative": "Doe",
"id_number_representative": "123456789",
"phone_number_representative": "+1234567890",
"email_representative": "john.doe@example.com",
"photo_url": "https://s3.amazonaws.com/bucket-name/schools/photos/photo.jpg",
"school_sites": [
{
"id": 1,
"name": "Main Campus",
"phone": "123456",
"address": "123 Main St",
"email": "campus@example.com",
"locations": [
{
"id": 1,
"name": "Field A",
"description": "Main soccer field",
"state": "active"
}
]
}
]
}
}
Example response (404):
{
"message": "School not found or unauthorized."
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"nickname": [
"The nickname field must be a string."
],
"school_sites.*.name": [
"The name field is required when updating a school site."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
School - Archive a Specific School
requires authentication
This endpoint allows the authenticated administrator to archive a specific school by changing its status to "archived". This action does not delete the school from the database.
Example request:
curl --request DELETE \
"https://apialeosapp.xioagency.com/api/setting/schools/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/schools/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "School archived successfully."
}
Example response (404):
{
"message": "School not found or unauthorized."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Division Categories - All Categories for Administrative Schools
requires authentication
This endpoint retrieves all division categories associated with the authenticated
administrative user's schools. Optionally, archived categories can be retrieved using the only_archived parameter.
Usage
- Use the
filtersparameter to apply dynamic filters in JSON format. - Use the
searchparameter to perform a global search across all columns.
How to Send Parameters
filters: JSON string to apply dynamic filters. Example:{ "status": "active", "created_at": { "from": "2023-01-01", "to": "2023-12-31" }, "nickname": "Wildcats" }When encoded in the URL, it should look like this:
filters={"status":"active","created_at":{"from":"2023-01-01","to":"2023-12-31"},"nickname":"Wildcats"}search: String for global search. Example:search=Wildcats
Example request:
curl --request GET \
--get "https://apialeosapp.xioagency.com/api/setting/level/division-categories?per_page=15&only_archived=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/division-categories"
);
const params = {
"per_page": "15",
"only_archived": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"nickname": "Primary Division",
"description": "This is the primary division category.",
"status": "archived",
"school": {
"id": 1,
"nickname": "Wildcats",
"address": "123 Main St"
},
"created_at": "2025-01-17T12:00:00.000000Z",
"updated_at": "2025-01-17T12:00:00.000000Z"
}
],
"links": {
"first": "http://example.com/api/setting/level/division-categories?page=1",
"last": "http://example.com/api/setting/level/division-categories?page=5",
"prev": null,
"next": "http://example.com/api/setting/level/division-categories?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 5,
"path": "http://example.com/api/setting/level/division-categories",
"per_page": 10,
"to": 10,
"total": 50
}
}
Example response (404):
{
"message": "No schools associated with this user."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Division Categories - Create a New Category
requires authentication
This endpoint allows the authenticated administrative user to create a new division category associated with a specific school. The school must belong to the authenticated user.
Example request:
curl --request POST \
"https://apialeosapp.xioagency.com/api/setting/level/division-categories" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"nickname\": \"Primary Division\",
\"description\": \"This is the primary division category.\",
\"status\": \"active\",
\"school_id\": 1
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/division-categories"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nickname": "Primary Division",
"description": "This is the primary division category.",
"status": "active",
"school_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "Division category created successfully",
"category": {
"id": 1,
"nickname": "Primary Division",
"description": "This is the primary division category.",
"status": "active",
"school_id": 1,
"creator_id": 5,
"created_at": "2025-01-17T12:00:00.000000Z",
"updated_at": "2025-01-17T12:00:00.000000Z"
}
}
Example response (404):
{
"message": "School not found or unauthorized."
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"nickname": [
"The nickname field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Division Categories - Show a Specific Category
requires authentication
This endpoint allows the authenticated administrative user to retrieve the details of a specific division category, including its associated school. The user must be the administrator of the associated school.
Example request:
curl --request GET \
--get "https://apialeosapp.xioagency.com/api/setting/level/division-categories/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/division-categories/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"nickname": "Primary Division",
"description": "This is the primary division category.",
"status": "active",
"school": {
"id": 1,
"nickname": "Wildcats",
"address": "123 Main St"
},
"created_at": "2025-01-17T12:00:00.000000Z",
"updated_at": "2025-01-17T12:00:00.000000Z"
}
Example response (404):
{
"message": "Division category not found or unauthorized."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Division Categories - Update a Category
requires authentication
This endpoint allows the authenticated administrative user to update the details of a specific division category. The user must be the administrator of the associated school. Partial updates are allowed.
Example request:
curl --request PUT \
"https://apialeosapp.xioagency.com/api/setting/level/division-categories/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"nickname\": \"Primary Division\",
\"description\": \"Updated description.\",
\"status\": \"inactive\",
\"school_id\": 2
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/division-categories/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nickname": "Primary Division",
"description": "Updated description.",
"status": "inactive",
"school_id": 2
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Division category updated successfully",
"category": {
"id": 1,
"nickname": "Primary Division",
"description": "Updated description.",
"status": "inactive",
"school_id": 2,
"creator_id": 5,
"created_at": "2025-01-17T12:00:00.000000Z",
"updated_at": "2025-01-17T12:30:00.000000Z"
}
}
Example response (403):
{
"message": "The selected school is not authorized."
}
Example response (404):
{
"message": "Division category not found or unauthorized."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Division Categories - Archive a Category
requires authentication
This endpoint allows the authenticated administrator to archive a division category by changing its status to "archived". This action does not delete the category from the database.
Example request:
curl --request DELETE \
"https://apialeosapp.xioagency.com/api/setting/level/division-categories/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/division-categories/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Division category archived successfully."
}
Example response (404):
{
"message": "Division category not found or unauthorized."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Learning Stages - All Stages for Administrative Schools
requires authentication
This endpoint retrieves all learning stages associated with the authenticated
administrative user's schools. Optionally, archived stages can be retrieved using the only_archived parameter.
Usage
- Use the
filtersparameter to apply dynamic filters in JSON format. - Use the
searchparameter to perform a global search across all columns.
How to Send Parameters
filters: JSON string to apply dynamic filters. Example:{ "status": "active", "created_at": { "from": "2023-01-01", "to": "2023-12-31" }, "nickname": "Wildcats" }When encoded in the URL, it should look like this:
filters={"status":"active","created_at":{"from":"2023-01-01","to":"2023-12-31"},"nickname":"Wildcats"}search: String for global search. Example:search=Wildcats
Example request:
curl --request GET \
--get "https://apialeosapp.xioagency.com/api/setting/level/learning-stages?per_page=15&only_archived=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/learning-stages"
);
const params = {
"per_page": "15",
"only_archived": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"nickname": "Kindergarten",
"description": "Learning stage for children aged 3-5.",
"status": "archived",
"school": {
"id": 1,
"nickname": "Wildcats",
"address": "123 Main St"
},
"created_at": "2025-01-17T12:00:00.000000Z",
"updated_at": "2025-01-17T12:00:00.000000Z"
}
],
"links": {
"first": "http://example.com/api/setting/level/learning-stages?page=1",
"last": "http://example.com/api/setting/level/learning-stages?page=5",
"prev": null,
"next": "http://example.com/api/setting/level/learning-stages?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 5,
"path": "http://example.com/api/setting/level/learning-stages",
"per_page": 10,
"to": 10,
"total": 50
}
}
Example response (404):
{
"message": "No schools associated with this user."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Learning Stages - Create a New Stage
requires authentication
This endpoint allows the authenticated administrative user to create a new learning stage associated with a specific school. The school must belong to the authenticated user.
Example request:
curl --request POST \
"https://apialeosapp.xioagency.com/api/setting/level/learning-stages" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"nickname\": \"Kindergarten\",
\"description\": \"Stage for children aged 3-5.\",
\"status\": \"active\",
\"school_id\": 1
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/learning-stages"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nickname": "Kindergarten",
"description": "Stage for children aged 3-5.",
"status": "active",
"school_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "Learning stage created successfully",
"learning_stage": {
"id": 1,
"nickname": "Kindergarten",
"description": "Stage for children aged 3-5.",
"status": "active",
"school_id": 1,
"creator_id": 5,
"created_at": "2025-01-17T12:00:00.000000Z",
"updated_at": "2025-01-17T12:00:00.000000Z"
}
}
Example response (404):
{
"message": "School not found or unauthorized."
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"nickname": [
"The nickname field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Learning Stages - Show a Specific Stage
requires authentication
This endpoint allows the authenticated administrative user to retrieve the details of a specific learning stage. The user must be the administrator of the associated school.
Example request:
curl --request GET \
--get "https://apialeosapp.xioagency.com/api/setting/level/learning-stages/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/learning-stages/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"nickname": "Kindergarten",
"description": "Stage for children aged 3-5.",
"status": "active",
"school": {
"id": 1,
"nickname": "Wildcats",
"address": "123 Main St"
},
"created_at": "2025-01-17T12:00:00.000000Z",
"updated_at": "2025-01-17T12:00:00.000000Z"
}
Example response (404):
{
"message": "Learning stage not found or unauthorized."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Learning Stages - Update a Specific Stage
requires authentication
This endpoint allows the authenticated administrative user to update the details of a specific learning stage. Partial updates are allowed, and the user must be the administrator of the associated school.
Example request:
curl --request PUT \
"https://apialeosapp.xioagency.com/api/setting/level/learning-stages/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"nickname\": \"Kindergarten\",
\"description\": \"Updated description.\",
\"status\": \"inactive\",
\"school_id\": 2
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/learning-stages/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nickname": "Kindergarten",
"description": "Updated description.",
"status": "inactive",
"school_id": 2
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Learning stage updated successfully",
"learning_stage": {
"id": 1,
"nickname": "Updated Kindergarten",
"description": "Updated description for the learning stage.",
"status": "inactive",
"school_id": 2,
"creator_id": 5,
"created_at": "2025-01-17T12:00:00.000000Z",
"updated_at": "2025-01-17T12:30:00.000000Z"
}
}
Example response (403):
{
"message": "The selected school is not authorized."
}
Example response (404):
{
"message": "Learning stage not found or unauthorized."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Learning Stages - Archive a Learning Stage
requires authentication
This endpoint allows the authenticated administrator to archive a learning stage by changing its status to "archived". This action does not delete the stage from the database.
Example request:
curl --request DELETE \
"https://apialeosapp.xioagency.com/api/setting/level/learning-stages/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/learning-stages/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Learning stage archived successfully."
}
Example response (404):
{
"message": "Learning stage not found or unauthorized."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Level - List All Levels for Administrative Schools
requires authentication
This endpoint retrieves all levels associated with any school managed by the authenticated
administrative user. Each level includes its related learning stage, division category, and school.
Optionally, archived levels can be retrieved using the only_archived parameter.
Usage
- Use the
filtersparameter to apply dynamic filters in JSON format. - Use the
searchparameter to perform a global search across all columns.
How to Send Parameters
filters: JSON string to apply dynamic filters. Example:{ "status": "active", "created_at": { "from": "2023-01-01", "to": "2023-12-31" }, "nickname": "Wildcats" }When encoded in the URL, it should look like this:
filters={"status":"active","created_at":{"from":"2023-01-01","to":"2023-12-31"},"nickname":"Wildcats"}search: String for global search. Example:search=Wildcats
Example request:
curl --request GET \
--get "https://apialeosapp.xioagency.com/api/setting/level/levels?per_page=15&only_archived=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/levels"
);
const params = {
"per_page": "15",
"only_archived": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"nickname": "Level A",
"name": "First Level",
"description": "The first level of the learning stage.",
"status": "archived",
"learning_stage": {
"id": 1,
"nickname": "Kindergarten",
"description": "Stage for children aged 3-5."
},
"division_category": {
"id": 1,
"nickname": "Primary Division",
"description": "This is the primary division category."
},
"school": {
"id": 1,
"nickname": "Wildcats",
"address": "123 Main St"
},
"created_at": "2025-01-17T12:00:00.000000Z",
"updated_at": "2025-01-17T12:00:00.000000Z"
}
],
"links": {
"first": "http://example.com/api/setting/level/levels?page=1",
"last": "http://example.com/api/setting/level/levels?page=5",
"prev": null,
"next": "http://example.com/api/setting/level/levels?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 5,
"path": "http://example.com/api/setting/level/levels",
"per_page": 10,
"to": 10,
"total": 50
}
}
Example response (404):
{
"message": "No schools associated with this user."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Level - Create a New Level
requires authentication
This endpoint allows the authenticated administrator to create a new level associated with a specific learning stage, division category, and school. It validates that the school belongs to the administrator.
Example request:
curl --request POST \
"https://apialeosapp.xioagency.com/api/setting/level/levels" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"nickname\": \"Beginner\",
\"name\": \"Level 1\",
\"description\": \"Entry-level stage for new students.\",
\"learning_stage_id\": 1,
\"division_category_id\": 2,
\"school_id\": 3,
\"status\": \"active\"
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/levels"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nickname": "Beginner",
"name": "Level 1",
"description": "Entry-level stage for new students.",
"learning_stage_id": 1,
"division_category_id": 2,
"school_id": 3,
"status": "active"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "Level created successfully.",
"level": { ... }
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"school_id": [
"The selected school does not belong to the authenticated user."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Level - Show Specific Level
requires authentication
This endpoint allows the authenticated administrator to retrieve the details of a specific level. The level must be associated with a school managed by the administrator.
Example request:
curl --request GET \
--get "https://apialeosapp.xioagency.com/api/setting/level/levels/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/levels/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"nickname": "Beginner",
"name": "Level 1",
"description": "Entry-level stage for new students.",
"learning_stage": {
"id": 1,
"nickname": "Kindergarten"
},
"division_category": {
"id": 2,
"nickname": "Primary Division"
},
"school": {
"id": 3,
"nickname": "Wildcats"
},
"status": "active",
"created_at": "2025-01-17T12:00:00.000000Z",
"updated_at": "2025-01-17T12:00:00.000000Z"
}
Example response (404):
{
"message": "Level not found or unauthorized."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Level - Update a Specific Level
requires authentication
This endpoint allows the authenticated administrator to update the details of a specific level. It validates that the level belongs to a school managed by the administrator.
Example request:
curl --request PUT \
"https://apialeosapp.xioagency.com/api/setting/level/levels/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"nickname\": \"Advanced\",
\"name\": \"Level 2\",
\"description\": \"Intermediate-level stage for students.\",
\"learning_stage_id\": 1,
\"division_category_id\": 2,
\"school_id\": 3,
\"status\": \"active\"
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/levels/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nickname": "Advanced",
"name": "Level 2",
"description": "Intermediate-level stage for students.",
"learning_stage_id": 1,
"division_category_id": 2,
"school_id": 3,
"status": "active"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Level updated successfully.",
"level": { ... }
}
Example response (404):
{
"message": "Level not found or unauthorized."
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"nickname": [
"The nickname field is required."
],
"school_id": [
"The selected school does not belong to the authenticated user."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Level - Level - Archive a Level
requires authentication
This endpoint allows the authenticated administrator to archive a level by changing its status to "archived". This action does not delete the level from the database.
Example request:
curl --request DELETE \
"https://apialeosapp.xioagency.com/api/setting/level/levels/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/level/levels/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Level archived successfully."
}
Example response (404):
{
"message": "Level not found or unauthorized."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Configuration - Show the template for a specific setting by slug.
requires authentication
Example request:
curl --request GET \
--get "https://apialeosapp.xioagency.com/api/setting/configuration/setting" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/configuration/setting"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"template": {
"layout": "settings",
"fields": [
{
"name": "site_name",
"type": "text"
},
{
"name": "email",
"type": "email"
}
]
}
}
Example response (404):
{
"message": "Template not found for the provided slug."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Configuration - Update or reset color settings for the authenticated user.
requires authentication
Example request:
curl --request PUT \
"https://apialeosapp.xioagency.com/api/setting/configuration/colors" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"changes\": [
{
\"name\": \"menus\",
\"color\": \"#FF5733\"
},
{
\"name\": \"header\",
\"color\": \"#000000\"
}
],
\"reset\": true
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/configuration/colors"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"changes": [
{
"name": "menus",
"color": "#FF5733"
},
{
"name": "header",
"color": "#000000"
}
],
"reset": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"response": {
"menus": "#FF5733",
"header": "#000000",
"background": "#f8f7fa",
"typography": "#1F1F1F"
},
"status": "success",
"message": "Colors updated successfully."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Configuration - Update a module's configuration.
requires authentication
Example request:
curl --request PUT \
"https://apialeosapp.xioagency.com/api/setting/configuration" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"module\": \"\\\"1\\\"\",
\"plural_name\": \"\\\"Users\\\"\",
\"singular_name\": \"\\\"User\\\"\",
\"plural_name_es\": \"\\\"Usuarios\\\"\",
\"singular_name_es\": \"\\\"Usuario\\\"\",
\"section\": \"\\\"general\\\"\",
\"form\": \"\\\"profile_form\\\"\",
\"subsection\": \"\\\"details\\\"\",
\"form_section\": \"\\\"address_section\\\"\",
\"fields\": [
{
\"label_en\": \"First Name\",
\"label_es\": \"Nombre\"
}
],
\"custom_fields\": [
{
\"label_en\": \"Gender\",
\"label_es\": \"GΓ©nero\",
\"type\": \"select\",
\"options\": [
{
\"name_en\": \"Male\",
\"name_es\": \"Hombre\"
},
{
\"name_en\": \"Female\",
\"name_es\": \"Mujer\"
}
]
}
]
}"
const url = new URL(
"https://apialeosapp.xioagency.com/api/setting/configuration"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"module": "\"1\"",
"plural_name": "\"Users\"",
"singular_name": "\"User\"",
"plural_name_es": "\"Usuarios\"",
"singular_name_es": "\"Usuario\"",
"section": "\"general\"",
"form": "\"profile_form\"",
"subsection": "\"details\"",
"form_section": "\"address_section\"",
"fields": [
{
"label_en": "First Name",
"label_es": "Nombre"
}
],
"custom_fields": [
{
"label_en": "Gender",
"label_es": "GΓ©nero",
"type": "select",
"options": [
{
"name_en": "Male",
"name_es": "Hombre"
},
{
"name_en": "Female",
"name_es": "Mujer"
}
]
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"response": {
"id": 1,
"parent_id": 1,
"language": "en",
"colors": {
"primary": "#000000",
"secondary": "#FFFFFF"
},
"icons": "default",
"url": "https://example.com",
"setting": {
"modules": [
{
"id": "1",
"plural_name": "Users",
"singular_name": "User",
"plural_name_es": "Usuarios",
"singular_name_es": "Usuario",
"sections": [
{
"default_name": "general",
"forms": [
{
"default_name": "profile_form",
"fields": [
{
"label_en": "First Name",
"label_es": "Nombre"
}
],
"custom_fields": [
{
"name": "gender",
"type": "select",
"label_en": "Gender",
"label_es": "Género",
"options": [
{
"name_en": "Male",
"name_es": "Hombre",
"value": "Male"
},
{
"name_en": "Female",
"name_es": "Mujer",
"value": "Female"
}
]
}
]
}
]
}
]
}
]
},
"created_at": "2025-01-10T12:00:00.000000Z",
"updated_at": "2025-01-10T12:00:00.000000Z"
},
"status": "success",
"message": "The configuration was updated correctly! To see the changes, please reload the page."
}
Example response (404):
{
"message": "Module not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.