openapi: 3.0.3
info:
  title: AleosApp
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://apialeosapp.xioagency.com'
paths:
  /api/login:
    post:
      summary: 'Log in a user and return a token.'
      operationId: logInAUserAndReturnAToken
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: ''
                    type: object
                    example:
                      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
                    properties:
                      user:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: 'John Doe'
                          email:
                            type: string
                            example: aleos.administrator@aleosapp.com
                          created_at:
                            type: string
                            example: '2025-01-10T12:00:00.000000Z'
                          updated_at:
                            type: string
                            example: '2025-01-10T12:00:00.000000Z'
                      settings:
                        type: array
                        example:
                          -
                            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'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            parent_id:
                              type: integer
                              example: 1
                            language:
                              type: string
                              example: en
                            colors:
                              type: object
                              properties:
                                primary:
                                  type: string
                                  example: '#000000'
                                secondary:
                                  type: string
                                  example: '#FFFFFF'
                            icons:
                              type: string
                              example: default
                            url:
                              type: string
                              example: 'https://example.com'
                            setting:
                              type: object
                              properties:
                                notifications:
                                  type: boolean
                                  example: true
                            setting_backup:
                              type: object
                              properties:
                                notifications:
                                  type: boolean
                                  example: false
                            created_at:
                              type: string
                              example: '2025-01-10T12:00:00.000000Z'
                            updated_at:
                              type: string
                              example: '2025-01-10T12:00:00.000000Z'
                      role:
                        type: string
                        example: administrator
                      permissions:
                        type: array
                        example:
                          - administrative.dashboard.index
                          - administrative.settings.index
                        items:
                          type: string
                      token:
                        type: string
                        example: 1|abcd1234efgh5678
                  -
                    description: ''
                    type: object
                    example:
                      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
                    properties:
                      user:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 2
                          name:
                            type: string
                            example: 'Jane Doe'
                          email:
                            type: string
                            example: aleos.administrator@aleosapp.com
                          created_at:
                            type: string
                            example: '2025-01-10T12:00:00.000000Z'
                          updated_at:
                            type: string
                            example: '2025-01-10T12:00:00.000000Z'
                      settings:
                        type: array
                        example:
                          -
                            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'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 2
                            parent_id:
                              type: integer
                              example: 2
                            language:
                              type: string
                              example: en
                            colors:
                              type: object
                              properties:
                                primary:
                                  type: string
                                  example: '#111111'
                                secondary:
                                  type: string
                                  example: '#222222'
                            icons:
                              type: string
                              example: minimal
                            url:
                              type: string
                              example: 'https://example.com/coach'
                            setting:
                              type: object
                              properties:
                                notifications:
                                  type: boolean
                                  example: true
                            setting_backup:
                              type: object
                              properties:
                                notifications:
                                  type: boolean
                                  example: false
                            created_at:
                              type: string
                              example: '2025-01-10T12:00:00.000000Z'
                            updated_at:
                              type: string
                              example: '2025-01-10T12:00:00.000000Z'
                      role:
                        type: string
                        example: coach
                      permissions:
                        type: array
                        example:
                          - administrative.dashboard.index
                        items:
                          type: string
                      token:
                        type: string
                        example: 1|efgh5678abcd1234
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invalid credentials'
                properties:
                  message:
                    type: string
                    example: 'Invalid credentials'
      tags:
        - Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                login:
                  type: string
                  description: "The user's email or username."
                  example: aleos.administrator@aleosapp.com
                  nullable: false
                password:
                  type: string
                  description: "The user's password."
                  example: aleos123456789
                  nullable: false
              required:
                - login
                - password
      security: []
  /api/password/forgot:
    post:
      summary: "Send a password reset link to the user's email."
      operationId: sendAPasswordResetLinkToTheUsersEmail
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Password reset link sent successfully.'
                properties:
                  message:
                    type: string
                    example: 'Password reset link sent successfully.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: "We couldn't find a user with that email address."
                properties:
                  message:
                    type: string
                    example: "We couldn't find a user with that email address."
      tags:
        - Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'The email of the user requesting the password reset.'
                  example: johndoe@example.com
                  nullable: false
              required:
                - email
      security: []
  /api/password/reset:
    post:
      summary: "Reset the user's password."
      operationId: resetTheUsersPassword
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Password reset successfully.'
                properties:
                  message:
                    type: string
                    example: 'Password reset successfully.'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invalid token or email.'
                properties:
                  message:
                    type: string
                    example: 'Invalid token or email.'
      tags:
        - Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'The email of the user.'
                  example: johndoe@example.com
                  nullable: false
                token:
                  type: string
                  description: 'The password reset token.'
                  example: abc123
                  nullable: false
                password:
                  type: string
                  description: 'The new password.'
                  example: newpassword123
                  nullable: false
                password_confirmation:
                  type: string
                  description: 'Confirmation of the new password.'
                  example: newpassword123
                  nullable: false
              required:
                - email
                - token
                - password
                - password_confirmation
      security: []
  /api/user:
    get:
      summary: ''
      operationId: getApiUser
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
  /api/setting:
    get:
      summary: "Get the template for the current user's settings."
      operationId: getTheTemplateForTheCurrentUsersSettings
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  template:
                    layout: settings
                    fields:
                      -
                        name: site_name
                        type: text
                      -
                        name: email
                        type: email
                properties:
                  template:
                    type: object
                    properties:
                      layout:
                        type: string
                        example: settings
                      fields:
                        type: array
                        example:
                          -
                            name: site_name
                            type: text
                          -
                            name: email
                            type: email
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              example: site_name
                            type:
                              type: string
                              example: text
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Template for the current setting not found.'
                properties:
                  message:
                    type: string
                    example: 'Template for the current setting not found.'
      tags:
        - Setting
  /api/setting/profile:
    post:
      summary: 'Profile - Store or Update Profile'
      operationId: profileStoreOrUpdateProfile
      description: "This endpoint allows the authenticated user to create or update their profile.\nAdditionally, users can add custom fields to store personalized information."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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
                properties:
                  message:
                    type: string
                    example: 'Profile updated successfully'
                  profile:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      user_id:
                        type: integer
                        example: 1
                      first_name:
                        type: string
                        example: John
                      last_name:
                        type: string
                        example: Doe
                      gender:
                        type: string
                        example: male
                      date_birth:
                        type: string
                        example: '1990-01-01'
                      id_number:
                        type: string
                        example: '123456789'
                      language:
                        type: string
                        example: en
                      billing_phone_number:
                        type: string
                        example: '+1234567890'
                      billing_country:
                        type: string
                        example: 'United States'
                      billing_email:
                        type: string
                        example: john.doe@example.com
                      billing_state:
                        type: string
                        example: California
                      billing_address:
                        type: string
                        example: '123 Main Street'
                      billing_zip_code:
                        type: string
                        example: '90210'
                      image_url:
                        type: string
                        example: 'https://s3.amazonaws.com/bucket-name/profile-images/image.jpg'
                      created_at:
                        type: string
                        example: '2025-01-16T00:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-01-16T00:00:00.000000Z'
                  custom_fields:
                    type: array
                    example:
                      -
                        slug: father_name
                        value: 'Oscar Perez'
                      -
                        slug: hobby
                        value: Fútbol
                    items:
                      type: object
                      properties:
                        slug:
                          type: string
                          example: father_name
                        value:
                          type: string
                          example: 'Oscar Perez'
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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
                properties:
                  message:
                    type: string
                    example: 'Profile created successfully'
                  profile:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      user_id:
                        type: integer
                        example: 1
                      first_name:
                        type: string
                        example: John
                      last_name:
                        type: string
                        example: Doe
                      gender:
                        type: string
                        example: male
                      date_birth:
                        type: string
                        example: '1990-01-01'
                      id_number:
                        type: string
                        example: '123456789'
                      language:
                        type: string
                        example: en
                      billing_phone_number:
                        type: string
                        example: '+1234567890'
                      billing_country:
                        type: string
                        example: 'United States'
                      billing_email:
                        type: string
                        example: john.doe@example.com
                      billing_state:
                        type: string
                        example: California
                      billing_address:
                        type: string
                        example: '123 Main Street'
                      billing_zip_code:
                        type: string
                        example: '90210'
                      image_url:
                        type: string
                        example: 'https://s3.amazonaws.com/bucket-name/profile-images/image.jpg'
                      created_at:
                        type: string
                        example: '2025-01-16T00:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-01-16T00:00:00.000000Z'
                  custom_fields:
                    type: array
                    example:
                      -
                        slug: father_name
                        value: 'Oscar Perez'
                      -
                        slug: hobby
                        value: soccer
                    items:
                      type: object
                      properties:
                        slug:
                          type: string
                          example: father_name
                        value:
                          type: string
                          example: 'Oscar Perez'
      tags:
        - Setting
      requestBody:
        required: false
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  description: "optional The user's first name."
                  example: John
                  nullable: true
                last_name:
                  type: string
                  description: "optional The user's last name."
                  example: Doe
                  nullable: true
                gender:
                  type: string
                  description: "optional The user's gender (male, female, other)."
                  example: male
                  nullable: true
                date_birth:
                  type: date
                  description: "optional The user's date of birth in the format YYYY-MM-DD."
                  example: '1990-01-01'
                  nullable: true
                id_number:
                  type: string
                  description: 'optional A unique identification number for the user.'
                  example: '123456789'
                  nullable: true
                language:
                  type: string
                  description: "optional The user's preferred language."
                  example: en
                  nullable: true
                billing_phone_number:
                  type: string
                  description: 'optional The phone number used for billing purposes.'
                  example: '+1234567890'
                  nullable: true
                billing_country:
                  type: string
                  description: 'optional The country used for billing purposes.'
                  example: 'United States'
                  nullable: true
                billing_email:
                  type: string
                  description: 'optional The email address used for billing purposes.'
                  example: john.doe@example.com
                  nullable: true
                billing_state:
                  type: string
                  description: 'optional The state or province used for billing purposes.'
                  example: California
                  nullable: true
                billing_address:
                  type: string
                  description: 'optional The address used for billing purposes.'
                  example: '123 Main Street'
                  nullable: true
                billing_zip_code:
                  type: string
                  description: 'optional The ZIP code used for billing purposes.'
                  example: '90210'
                  nullable: true
                image:
                  type: string
                  format: binary
                  description: "optional A profile image to upload. Must be a valid image file.\n\n---\n### **How to send `custom_fields`**\nThe `custom_fields` parameter should be sent as an **array of objects**, each containing:\n- `slug` (string, required): A unique identifier for the field.\n- `value` (string, required): The value associated with the slug.\n\n#### **Example of how to send `custom_fields`:**\n```\n{\n   \"first_name\":\"John\"...\n   \"custom_fields\": [\n       {\n           \"slug\": \"hobby\",\n           \"value\": \"soccer\"\n       },\n       {\n           \"slug\": \"favorite_food\",\n           \"value\": \"pizza\"\n       }\n   ]\n}\n```\n**Notes:**\n- The `slug` must be unique within the user's profile.\n- The `value` can be a string, number, or any other valid JSON data type."
                  nullable: false
  /api/setting/change-password:
    post:
      summary: 'Profile - Change Password'
      operationId: profileChangePassword
      description: 'This endpoint allows the authenticated user to change their password.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Password changed successfully.'
                properties:
                  message:
                    type: string
                    example: 'Password changed successfully.'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Current password does not match.'
                properties:
                  message:
                    type: string
                    example: 'Current password does not match.'
      tags:
        - Setting
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                current_password:
                  type: string
                  description: 'The current password of the user.'
                  example: currentPassword123
                  nullable: false
                new_password:
                  type: string
                  description: 'The new password to set.'
                  example: NewPassword123
                  nullable: false
                new_password_confirmation:
                  type: string
                  description: 'The confirmation for the new password.'
                  example: NewPassword123
                  nullable: false
              required:
                - current_password
                - new_password
                - new_password_confirmation
  /api/setting/schools:
    get:
      summary: 'School - List All Schools for Administrative User'
      operationId: schoolListAllSchoolsForAdministrativeUser
      description: "This endpoint returns a list of schools associated with the authenticated administrative user.\n\n### Usage\n- Use the `filters` parameter to apply dynamic filters in JSON format.\n- Use the `search` parameter to perform a global search across all columns.\n\n### How to Send Parameters\n- `filters`: JSON string to apply dynamic filters. Example:\n  ```json\n  {\n      \"status\": \"active\",\n      \"created_at\": {\n          \"from\": \"2023-01-01\",\n          \"to\": \"2023-12-31\"\n      },\n      \"nickname\": \"Wildcats\"\n  }\n  ```\n  When encoded in the URL, it should look like this:\n  ```\n  filters={\"status\":\"active\",\"created_at\":{\"from\":\"2023-01-01\",\"to\":\"2023-12-31\"},\"nickname\":\"Wildcats\"}\n  ```\n- `search`: String for global search. Example:\n  ```\n  search=Wildcats\n  ```"
      parameters:
        -
          in: query
          name: only_archived
          description: 'optional If true, retrieves only archived categories. Default is false.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'optional If true, retrieves only archived categories. Default is false.'
            example: true
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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
                properties:
                  schools:
                    type: object
                    properties:
                      data:
                        type: array
                        example:
                          -
                            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'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            nickname:
                              type: string
                              example: Wildcats
                            address:
                              type: string
                              example: '123 Main St'
                            status:
                              type: string
                              example: archived
                            created_at:
                              type: string
                              example: '2023-01-15T00:00:00.000000Z'
                            updated_at:
                              type: string
                              example: '2023-06-10T00:00:00.000000Z'
                            administrative:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type: string
                                  example: 'John Doe'
                            creator:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                name:
                                  type: string
                                  example: 'Jane Smith'
                            school_sites:
                              type: array
                              example:
                                -
                                  id: 1
                                  name: 'Main Campus'
                                  locations:
                                    -
                                      id: 1
                                      name: 'Field A'
                                      description: 'Main soccer field'
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  name:
                                    type: string
                                    example: 'Main Campus'
                                  locations:
                                    type: array
                                    example:
                                      - { id: 1, name: 'Field A', description: 'Main soccer field' }
                                    items:
                                      type: object
                                      properties: { id: { type: integer, example: 1 }, name: { type: string, example: 'Field A' }, description: { type: string, example: 'Main soccer field' } }
                      links:
                        type: object
                        properties:
                          first:
                            type: string
                            example: 'http://example.com/api/setting/schools?page=1'
                          last:
                            type: string
                            example: 'http://example.com/api/setting/schools?page=10'
                          prev:
                            type: string
                            example: null
                          next:
                            type: string
                            example: 'http://example.com/api/setting/schools?page=2'
                      meta:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          from:
                            type: integer
                            example: 1
                          last_page:
                            type: integer
                            example: 10
                          path:
                            type: string
                            example: 'http://example.com/api/setting/schools'
                          per_page:
                            type: integer
                            example: 10
                          to:
                            type: integer
                            example: 10
                          total:
                            type: integer
                            example: 100
                  metadata:
                    type: object
                    properties:
                      columns:
                        type: array
                        example:
                          - id
                          - nickname
                          - address
                          - status
                          - created_at
                          - updated_at
                          - administrative.name
                          - creator.name
                        items:
                          type: string
                      defaultColumns:
                        type: array
                        example:
                          - id
                          - nickname
                          - address
                          - description
                        items:
                          type: string
      tags:
        - Setting
    post:
      summary: 'School - Create a New School'
      operationId: schoolCreateANewSchool
      description: "This endpoint allows the authenticated user to create a new school, including its associated\nschool sites and locations. Additionally, the school's photo is managed using a polymorphic\nrelationship."
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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'
                properties:
                  message:
                    type: string
                    example: 'School created successfully'
                  school:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      nickname:
                        type: string
                        example: Wildcats
                      address:
                        type: string
                        example: '123 Main St'
                      school_sites:
                        type: array
                        example:
                          -
                            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'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Main Campus'
                            phone:
                              type: string
                              example: '123456'
                            address:
                              type: string
                              example: '123 Main St'
                            email:
                              type: string
                              example: campus@example.com
                            locations:
                              type: array
                              example:
                                -
                                  id: 1
                                  name: 'Field A'
                                  description: 'Main soccer field'
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  name:
                                    type: string
                                    example: 'Field A'
                                  description:
                                    type: string
                                    example: 'Main soccer field'
      tags:
        - Setting
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                nickname:
                  type: string
                  description: "The school's nickname."
                  example: Wildcats
                  nullable: false
                address:
                  type: string
                  description: "The school's address."
                  example: '123 Main St'
                  nullable: false
                photo:
                  type: string
                  format: binary
                  description: "optional The school's photo. Must be a valid image file (jpg, png, etc.)."
                  nullable: true
                sport:
                  type: string
                  description: "optional The school's main sport."
                  example: Soccer
                  nullable: true
                description:
                  type: string
                  description: "optional The school's description."
                  example: 'A leading sports school.'
                  nullable: true
                status:
                  type: string
                  description: "optional The school's status. Must be one of 'active' or 'inactive'. Default is 'active'."
                  example: active
                  nullable: true
                name_representative:
                  type: string
                  description: "The representative's first name."
                  example: John
                  nullable: false
                last_name_representative:
                  type: string
                  description: "The representative's last name."
                  example: Doe
                  nullable: false
                id_number_representative:
                  type: string
                  description: "The representative's ID number."
                  example: '123456789'
                  nullable: true
                phone_number_representative:
                  type: string
                  description: "The representative's phone number."
                  example: '+1234567890'
                  nullable: false
                email_representative:
                  type: string
                  description: "The representative's email."
                  example: john.doe@example.com
                  nullable: false
                school_sites:
                  type: array
                  description: 'optional Array of school sites. Each site must include name, phone, address, and email. Each site can optionally include locations.'
                  example:
                    -
                      name: 'Main Campus'
                      phone: '123456'
                      address: '123 Main St'
                      email: campus@example.com
                      locations:
                        -
                          name: 'Field A'
                          description: 'Main soccer field'
                  items:
                    type: string
                    nullable: true
              required:
                - nickname
                - address
                - name_representative
                - last_name_representative
                - id_number_representative
                - phone_number_representative
                - email_representative
    parameters:
      -
        in: path
        name: per_page
        description: 'Optional parameter. optional Number of records per page. Default is 10.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 15
  '/api/setting/schools/{id}':
    get:
      summary: 'School - View Details of a Specific School'
      operationId: schoolViewDetailsOfASpecificSchool
      description: "This endpoint retrieves the details of a specific school, including its associated\nschool sites and locations. Only the administrator who owns the school can view it."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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
                properties:
                  message:
                    type: string
                    example: 'School retrieved successfully'
                  school:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      nickname:
                        type: string
                        example: Wildcats
                      address:
                        type: string
                        example: '123 Main St'
                      sport:
                        type: string
                        example: Soccer
                      status:
                        type: string
                        example: active
                      name_representative:
                        type: string
                        example: John
                      last_name_representative:
                        type: string
                        example: Doe
                      id_number_representative:
                        type: string
                        example: '123456789'
                      phone_number_representative:
                        type: string
                        example: '+1234567890'
                      email_representative:
                        type: string
                        example: john.doe@example.com
                      photo_url:
                        type: string
                        example: 'https://s3.amazonaws.com/bucket-name/schools/photos/photo.jpg'
                      school_sites:
                        type: array
                        example:
                          -
                            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
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Main Campus'
                            phone:
                              type: string
                              example: '123456'
                            address:
                              type: string
                              example: '123 Main St'
                            email:
                              type: string
                              example: campus@example.com
                            locations:
                              type: array
                              example:
                                -
                                  id: 1
                                  name: 'Field A'
                                  description: 'Main soccer field'
                                  state: active
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  name:
                                    type: string
                                    example: 'Field A'
                                  description:
                                    type: string
                                    example: 'Main soccer field'
                                  state:
                                    type: string
                                    example: active
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'School not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'School not found or unauthorized.'
      tags:
        - Setting
    put:
      summary: 'School - Update an Existing School'
      operationId: schoolUpdateAnExistingSchool
      description: "This endpoint allows the authenticated user to update an existing school, including its associated\nschool sites and locations. Additionally, the school's photo can be updated using a polymorphic\nrelationship. If new sites or locations are provided, they will be created. Existing sites and\nlocations will be updated if their IDs are included."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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
                properties:
                  message:
                    type: string
                    example: 'School updated successfully'
                  school:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      nickname:
                        type: string
                        example: Wildcats
                      address:
                        type: string
                        example: '123 Main St'
                      sport:
                        type: string
                        example: Soccer
                      status:
                        type: string
                        example: active
                      name_representative:
                        type: string
                        example: John
                      last_name_representative:
                        type: string
                        example: Doe
                      id_number_representative:
                        type: string
                        example: '123456789'
                      phone_number_representative:
                        type: string
                        example: '+1234567890'
                      email_representative:
                        type: string
                        example: john.doe@example.com
                      photo_url:
                        type: string
                        example: 'https://s3.amazonaws.com/bucket-name/schools/photos/photo.jpg'
                      school_sites:
                        type: array
                        example:
                          -
                            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
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Main Campus'
                            phone:
                              type: string
                              example: '123456'
                            address:
                              type: string
                              example: '123 Main St'
                            email:
                              type: string
                              example: campus@example.com
                            locations:
                              type: array
                              example:
                                -
                                  id: 1
                                  name: 'Field A'
                                  description: 'Main soccer field'
                                  state: active
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  name:
                                    type: string
                                    example: 'Field A'
                                  description:
                                    type: string
                                    example: 'Main soccer field'
                                  state:
                                    type: string
                                    example: active
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'School not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'School not found or unauthorized.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      nickname:
                        type: array
                        example:
                          - 'The nickname field must be a string.'
                        items:
                          type: string
                      'school_sites.*.name':
                        type: array
                        example:
                          - 'The name field is required when updating a school site.'
                        items:
                          type: string
      tags:
        - Setting
      requestBody:
        required: false
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                nickname:
                  type: string
                  description: "optional The school's nickname."
                  example: Wildcats
                  nullable: false
                address:
                  type: string
                  description: "optional The school's address."
                  example: '123 Main St'
                  nullable: false
                photo:
                  type: string
                  format: binary
                  description: "optional The school's photo. Must be a valid image file (jpg, png, etc.)."
                  nullable: true
                sport:
                  type: string
                  description: "optional The school's main sport."
                  example: Soccer
                  nullable: true
                description:
                  type: string
                  description: "optional The school's description."
                  example: 'A leading sports school.'
                  nullable: true
                status:
                  type: string
                  description: "optional The school's status. Must be one of 'active' or 'inactive'. Default is 'active'."
                  example: active
                  nullable: true
                name_representative:
                  type: string
                  description: "optional The representative's first name."
                  example: John
                  nullable: false
                last_name_representative:
                  type: string
                  description: "optional The representative's last name."
                  example: Doe
                  nullable: false
                id_number_representative:
                  type: string
                  description: "optional The representative's ID number."
                  example: '123456789'
                  nullable: true
                phone_number_representative:
                  type: string
                  description: "optional The representative's phone number."
                  example: '+1234567890'
                  nullable: false
                email_representative:
                  type: string
                  description: "optional The representative's email."
                  example: john.doe@example.com
                  nullable: false
                school_sites:
                  type: array
                  description: 'optional Array of school sites. Each site must include name, phone, address, and email. Each site can optionally include locations.'
                  example:
                    -
                      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'
                  items:
                    type: string
                    nullable: true
    delete:
      summary: 'School - Archive a Specific School'
      operationId: schoolArchiveASpecificSchool
      description: "This endpoint allows the authenticated administrator to archive a specific school by\nchanging its status to \"archived\". This action does not delete the school from the database."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'School archived successfully.'
                properties:
                  message:
                    type: string
                    example: 'School archived successfully.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'School not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'School not found or unauthorized.'
      tags:
        - Setting
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the school.'
        example: 1
        required: true
        schema:
          type: integer
  /api/setting/level/division-categories:
    get:
      summary: 'Level - Division Categories - All Categories for Administrative Schools'
      operationId: levelDivisionCategoriesAllCategoriesForAdministrativeSchools
      description: "This endpoint retrieves all division categories associated with the authenticated\nadministrative user's schools. Optionally, archived categories can be retrieved using the `only_archived` parameter.\n\n### Usage\n- Use the `filters` parameter to apply dynamic filters in JSON format.\n- Use the `search` parameter to perform a global search across all columns.\n\n### How to Send Parameters\n- `filters`: JSON string to apply dynamic filters. Example:\n  ```json\n  {\n      \"status\": \"active\",\n      \"created_at\": {\n          \"from\": \"2023-01-01\",\n          \"to\": \"2023-12-31\"\n      },\n      \"nickname\": \"Wildcats\"\n  }\n  ```\n  When encoded in the URL, it should look like this:\n  ```\n  filters={\"status\":\"active\",\"created_at\":{\"from\":\"2023-01-01\",\"to\":\"2023-12-31\"},\"nickname\":\"Wildcats\"}\n  ```\n- `search`: String for global search. Example:\n  ```\n  search=Wildcats\n  ```"
      parameters:
        -
          in: query
          name: per_page
          description: 'optional Number of records per page. Defaults to 10.'
          example: 15
          required: false
          schema:
            type: integer
            description: 'optional Number of records per page. Defaults to 10.'
            example: 15
            nullable: false
        -
          in: query
          name: only_archived
          description: 'optional If true, retrieves only archived categories. Default is false.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'optional If true, retrieves only archived categories. Default is false.'
            example: true
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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
                properties:
                  data:
                    type: array
                    example:
                      -
                        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'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        nickname:
                          type: string
                          example: 'Primary Division'
                        description:
                          type: string
                          example: 'This is the primary division category.'
                        status:
                          type: string
                          example: archived
                        school:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            nickname:
                              type: string
                              example: Wildcats
                            address:
                              type: string
                              example: '123 Main St'
                        created_at:
                          type: string
                          example: '2025-01-17T12:00:00.000000Z'
                        updated_at:
                          type: string
                          example: '2025-01-17T12:00:00.000000Z'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: 'http://example.com/api/setting/level/division-categories?page=1'
                      last:
                        type: string
                        example: 'http://example.com/api/setting/level/division-categories?page=5'
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: 'http://example.com/api/setting/level/division-categories?page=2'
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      from:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 5
                      path:
                        type: string
                        example: 'http://example.com/api/setting/level/division-categories'
                      per_page:
                        type: integer
                        example: 10
                      to:
                        type: integer
                        example: 10
                      total:
                        type: integer
                        example: 50
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No schools associated with this user.'
                properties:
                  message:
                    type: string
                    example: 'No schools associated with this user.'
      tags:
        - Setting
    post:
      summary: 'Level - Division Categories - Create a New Category'
      operationId: levelDivisionCategoriesCreateANewCategory
      description: "This endpoint allows the authenticated administrative user to create a new division category\nassociated with a specific school. The school must belong to the authenticated user."
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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'
                properties:
                  message:
                    type: string
                    example: 'Division category created successfully'
                  category:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      nickname:
                        type: string
                        example: 'Primary Division'
                      description:
                        type: string
                        example: 'This is the primary division category.'
                      status:
                        type: string
                        example: active
                      school_id:
                        type: integer
                        example: 1
                      creator_id:
                        type: integer
                        example: 5
                      created_at:
                        type: string
                        example: '2025-01-17T12:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-01-17T12:00:00.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'School not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'School not found or unauthorized.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    nickname:
                      - 'The nickname field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      nickname:
                        type: array
                        example:
                          - 'The nickname field is required.'
                        items:
                          type: string
      tags:
        - Setting
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                nickname:
                  type: string
                  description: 'The nickname of the division category.'
                  example: 'Primary Division'
                  nullable: false
                description:
                  type: string
                  description: 'A description of the division category.'
                  example: 'This is the primary division category.'
                  nullable: false
                status:
                  type: string
                  description: "The status of the division category. Must be one of 'active' or 'inactive'."
                  example: active
                  nullable: false
                school_id:
                  type: integer
                  description: 'The ID of the school associated with the division category.'
                  example: 1
                  nullable: false
              required:
                - nickname
                - description
                - status
                - school_id
  '/api/setting/level/division-categories/{id}':
    get:
      summary: 'Level - Division Categories - Show a Specific Category'
      operationId: levelDivisionCategoriesShowASpecificCategory
      description: "This endpoint allows the authenticated administrative user to retrieve the details of a specific\ndivision category, including its associated school. The user must be the administrator of the associated school."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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'
                properties:
                  id:
                    type: integer
                    example: 1
                  nickname:
                    type: string
                    example: 'Primary Division'
                  description:
                    type: string
                    example: 'This is the primary division category.'
                  status:
                    type: string
                    example: active
                  school:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      nickname:
                        type: string
                        example: Wildcats
                      address:
                        type: string
                        example: '123 Main St'
                  created_at:
                    type: string
                    example: '2025-01-17T12:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2025-01-17T12:00:00.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Division category not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'Division category not found or unauthorized.'
      tags:
        - Setting
    put:
      summary: 'Level - Division Categories - Update a Category'
      operationId: levelDivisionCategoriesUpdateACategory
      description: "This endpoint allows the authenticated administrative user to update the details of a specific\ndivision category. The user must be the administrator of the associated school. Partial updates are allowed."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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'
                properties:
                  message:
                    type: string
                    example: 'Division category updated successfully'
                  category:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      nickname:
                        type: string
                        example: 'Primary Division'
                      description:
                        type: string
                        example: 'Updated description.'
                      status:
                        type: string
                        example: inactive
                      school_id:
                        type: integer
                        example: 2
                      creator_id:
                        type: integer
                        example: 5
                      created_at:
                        type: string
                        example: '2025-01-17T12:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-01-17T12:30:00.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The selected school is not authorized.'
                properties:
                  message:
                    type: string
                    example: 'The selected school is not authorized.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Division category not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'Division category not found or unauthorized.'
      tags:
        - Setting
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                nickname:
                  type: string
                  description: 'optional The nickname of the division category.'
                  example: 'Primary Division'
                  nullable: false
                description:
                  type: string
                  description: 'optional A description of the division category.'
                  example: 'Updated description.'
                  nullable: false
                status:
                  type: string
                  description: "optional The status of the division category. Must be one of 'active' or 'inactive'."
                  example: inactive
                  nullable: false
                school_id:
                  type: integer
                  description: 'optional The ID of the school associated with the division category.'
                  example: 2
                  nullable: false
    delete:
      summary: 'Level - Division Categories - Archive a Category'
      operationId: levelDivisionCategoriesArchiveACategory
      description: "This endpoint allows the authenticated administrator to archive a division category by\nchanging its status to \"archived\". This action does not delete the category from the database."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Division category archived successfully.'
                properties:
                  message:
                    type: string
                    example: 'Division category archived successfully.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Division category not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'Division category not found or unauthorized.'
      tags:
        - Setting
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the division category to retrieve.'
        example: 1
        required: true
        schema:
          type: integer
  /api/setting/level/learning-stages:
    get:
      summary: 'Level - Learning Stages - All Stages for Administrative Schools'
      operationId: levelLearningStagesAllStagesForAdministrativeSchools
      description: "This endpoint retrieves all learning stages associated with the authenticated\nadministrative user's schools. Optionally, archived stages can be retrieved using the `only_archived` parameter.\n\n### Usage\n- Use the `filters` parameter to apply dynamic filters in JSON format.\n- Use the `search` parameter to perform a global search across all columns.\n\n### How to Send Parameters\n- `filters`: JSON string to apply dynamic filters. Example:\n  ```json\n  {\n      \"status\": \"active\",\n      \"created_at\": {\n          \"from\": \"2023-01-01\",\n          \"to\": \"2023-12-31\"\n      },\n      \"nickname\": \"Wildcats\"\n  }\n  ```\n  When encoded in the URL, it should look like this:\n  ```\n  filters={\"status\":\"active\",\"created_at\":{\"from\":\"2023-01-01\",\"to\":\"2023-12-31\"},\"nickname\":\"Wildcats\"}\n  ```\n- `search`: String for global search. Example:\n  ```\n  search=Wildcats\n  ```"
      parameters:
        -
          in: query
          name: per_page
          description: 'optional Number of records per page. Defaults to 10.'
          example: 15
          required: false
          schema:
            type: integer
            description: 'optional Number of records per page. Defaults to 10.'
            example: 15
            nullable: false
        -
          in: query
          name: only_archived
          description: 'optional If true, retrieves only archived learning stages. Default is false.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'optional If true, retrieves only archived learning stages. Default is false.'
            example: true
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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
                properties:
                  data:
                    type: array
                    example:
                      -
                        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'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        nickname:
                          type: string
                          example: Kindergarten
                        description:
                          type: string
                          example: 'Learning stage for children aged 3-5.'
                        status:
                          type: string
                          example: archived
                        school:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            nickname:
                              type: string
                              example: Wildcats
                            address:
                              type: string
                              example: '123 Main St'
                        created_at:
                          type: string
                          example: '2025-01-17T12:00:00.000000Z'
                        updated_at:
                          type: string
                          example: '2025-01-17T12:00:00.000000Z'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: 'http://example.com/api/setting/level/learning-stages?page=1'
                      last:
                        type: string
                        example: 'http://example.com/api/setting/level/learning-stages?page=5'
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: 'http://example.com/api/setting/level/learning-stages?page=2'
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      from:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 5
                      path:
                        type: string
                        example: 'http://example.com/api/setting/level/learning-stages'
                      per_page:
                        type: integer
                        example: 10
                      to:
                        type: integer
                        example: 10
                      total:
                        type: integer
                        example: 50
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No schools associated with this user.'
                properties:
                  message:
                    type: string
                    example: 'No schools associated with this user.'
      tags:
        - Setting
    post:
      summary: 'Level - Learning Stages - Create a New Stage'
      operationId: levelLearningStagesCreateANewStage
      description: "This endpoint allows the authenticated administrative user to create a new learning stage\nassociated with a specific school. The school must belong to the authenticated user."
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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'
                properties:
                  message:
                    type: string
                    example: 'Learning stage created successfully'
                  learning_stage:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      nickname:
                        type: string
                        example: Kindergarten
                      description:
                        type: string
                        example: 'Stage for children aged 3-5.'
                      status:
                        type: string
                        example: active
                      school_id:
                        type: integer
                        example: 1
                      creator_id:
                        type: integer
                        example: 5
                      created_at:
                        type: string
                        example: '2025-01-17T12:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-01-17T12:00:00.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'School not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'School not found or unauthorized.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    nickname:
                      - 'The nickname field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      nickname:
                        type: array
                        example:
                          - 'The nickname field is required.'
                        items:
                          type: string
      tags:
        - Setting
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                nickname:
                  type: string
                  description: 'The nickname of the learning stage.'
                  example: Kindergarten
                  nullable: false
                description:
                  type: string
                  description: 'A description of the learning stage.'
                  example: 'Stage for children aged 3-5.'
                  nullable: false
                status:
                  type: string
                  description: "The status of the learning stage. Must be one of 'active' or 'inactive'."
                  example: active
                  nullable: false
                school_id:
                  type: integer
                  description: 'The ID of the school associated with the learning stage.'
                  example: 1
                  nullable: false
              required:
                - nickname
                - description
                - status
                - school_id
  '/api/setting/level/learning-stages/{id}':
    get:
      summary: 'Level - Learning Stages - Show a Specific Stage'
      operationId: levelLearningStagesShowASpecificStage
      description: "This endpoint allows the authenticated administrative user to retrieve the details of a specific\nlearning stage. The user must be the administrator of the associated school."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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'
                properties:
                  id:
                    type: integer
                    example: 1
                  nickname:
                    type: string
                    example: Kindergarten
                  description:
                    type: string
                    example: 'Stage for children aged 3-5.'
                  status:
                    type: string
                    example: active
                  school:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      nickname:
                        type: string
                        example: Wildcats
                      address:
                        type: string
                        example: '123 Main St'
                  created_at:
                    type: string
                    example: '2025-01-17T12:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2025-01-17T12:00:00.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Learning stage not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'Learning stage not found or unauthorized.'
      tags:
        - Setting
    put:
      summary: 'Level - Learning Stages - Update a Specific Stage'
      operationId: levelLearningStagesUpdateASpecificStage
      description: "This endpoint allows the authenticated administrative user to update the details of a specific\nlearning stage. Partial updates are allowed, and the user must be the administrator of the associated school."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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'
                properties:
                  message:
                    type: string
                    example: 'Learning stage updated successfully'
                  learning_stage:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      nickname:
                        type: string
                        example: 'Updated Kindergarten'
                      description:
                        type: string
                        example: 'Updated description for the learning stage.'
                      status:
                        type: string
                        example: inactive
                      school_id:
                        type: integer
                        example: 2
                      creator_id:
                        type: integer
                        example: 5
                      created_at:
                        type: string
                        example: '2025-01-17T12:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-01-17T12:30:00.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The selected school is not authorized.'
                properties:
                  message:
                    type: string
                    example: 'The selected school is not authorized.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Learning stage not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'Learning stage not found or unauthorized.'
      tags:
        - Setting
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                nickname:
                  type: string
                  description: 'optional The nickname of the learning stage.'
                  example: Kindergarten
                  nullable: false
                description:
                  type: string
                  description: 'optional A description of the learning stage.'
                  example: 'Updated description.'
                  nullable: false
                status:
                  type: string
                  description: "optional The status of the learning stage. Must be one of 'active' or 'inactive'."
                  example: inactive
                  nullable: false
                school_id:
                  type: integer
                  description: 'optional The ID of the school associated with the learning stage.'
                  example: 2
                  nullable: false
    delete:
      summary: 'Level - Learning Stages - Archive a Learning Stage'
      operationId: levelLearningStagesArchiveALearningStage
      description: "This endpoint allows the authenticated administrator to archive a learning stage by\nchanging its status to \"archived\". This action does not delete the stage from the database."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Learning stage archived successfully.'
                properties:
                  message:
                    type: string
                    example: 'Learning stage archived successfully.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Learning stage not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'Learning stage not found or unauthorized.'
      tags:
        - Setting
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the learning stage to retrieve.'
        example: 1
        required: true
        schema:
          type: integer
  /api/setting/level/levels:
    get:
      summary: 'Level - Level - List All Levels for Administrative Schools'
      operationId: levelLevelListAllLevelsForAdministrativeSchools
      description: "This endpoint retrieves all levels associated with any school managed by the authenticated\nadministrative user. Each level includes its related learning stage, division category, and school.\nOptionally, archived levels can be retrieved using the `only_archived` parameter.\n### Usage\n- Use the `filters` parameter to apply dynamic filters in JSON format.\n- Use the `search` parameter to perform a global search across all columns.\n\n### How to Send Parameters\n- `filters`: JSON string to apply dynamic filters. Example:\n  ```json\n  {\n      \"status\": \"active\",\n      \"created_at\": {\n          \"from\": \"2023-01-01\",\n          \"to\": \"2023-12-31\"\n      },\n      \"nickname\": \"Wildcats\"\n  }\n  ```\n  When encoded in the URL, it should look like this:\n  ```\n  filters={\"status\":\"active\",\"created_at\":{\"from\":\"2023-01-01\",\"to\":\"2023-12-31\"},\"nickname\":\"Wildcats\"}\n  ```\n- `search`: String for global search. Example:\n  ```\n  search=Wildcats\n  ```"
      parameters:
        -
          in: query
          name: per_page
          description: 'optional Number of records per page. Defaults to 10.'
          example: 15
          required: false
          schema:
            type: integer
            description: 'optional Number of records per page. Defaults to 10.'
            example: 15
            nullable: false
        -
          in: query
          name: only_archived
          description: 'optional If true, retrieves only archived levels. Default is false.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'optional If true, retrieves only archived levels. Default is false.'
            example: true
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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
                properties:
                  data:
                    type: array
                    example:
                      -
                        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'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        nickname:
                          type: string
                          example: 'Level A'
                        name:
                          type: string
                          example: 'First Level'
                        description:
                          type: string
                          example: 'The first level of the learning stage.'
                        status:
                          type: string
                          example: archived
                        learning_stage:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            nickname:
                              type: string
                              example: Kindergarten
                            description:
                              type: string
                              example: 'Stage for children aged 3-5.'
                        division_category:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            nickname:
                              type: string
                              example: 'Primary Division'
                            description:
                              type: string
                              example: 'This is the primary division category.'
                        school:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            nickname:
                              type: string
                              example: Wildcats
                            address:
                              type: string
                              example: '123 Main St'
                        created_at:
                          type: string
                          example: '2025-01-17T12:00:00.000000Z'
                        updated_at:
                          type: string
                          example: '2025-01-17T12:00:00.000000Z'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: 'http://example.com/api/setting/level/levels?page=1'
                      last:
                        type: string
                        example: 'http://example.com/api/setting/level/levels?page=5'
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: 'http://example.com/api/setting/level/levels?page=2'
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      from:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 5
                      path:
                        type: string
                        example: 'http://example.com/api/setting/level/levels'
                      per_page:
                        type: integer
                        example: 10
                      to:
                        type: integer
                        example: 10
                      total:
                        type: integer
                        example: 50
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No schools associated with this user.'
                properties:
                  message:
                    type: string
                    example: 'No schools associated with this user.'
      tags:
        - Setting
    post:
      summary: 'Level - Level - Create a New Level'
      operationId: levelLevelCreateANewLevel
      description: "This endpoint allows the authenticated administrator to create a new level associated with\na specific learning stage, division category, and school. It validates that the school\nbelongs to the administrator."
      parameters: []
      responses:
        201:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n   \"message\": \"Level created successfully.\",\n   \"level\": { ... }\n}"
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    school_id:
                      - 'The selected school does not belong to the authenticated user.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      school_id:
                        type: array
                        example:
                          - 'The selected school does not belong to the authenticated user.'
                        items:
                          type: string
      tags:
        - Setting
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                nickname:
                  type: string
                  description: "The level's nickname."
                  example: Beginner
                  nullable: false
                name:
                  type: string
                  description: "The level's name."
                  example: 'Level 1'
                  nullable: false
                description:
                  type: string
                  description: 'optional A description of the level.'
                  example: 'Entry-level stage for new students.'
                  nullable: true
                learning_stage_id:
                  type: integer
                  description: 'The ID of the associated learning stage.'
                  example: 1
                  nullable: false
                division_category_id:
                  type: integer
                  description: 'The ID of the associated division category.'
                  example: 2
                  nullable: false
                school_id:
                  type: integer
                  description: 'The ID of the associated school.'
                  example: 3
                  nullable: false
                status:
                  type: string
                  description: 'The status of the level (active or inactive).'
                  example: active
                  nullable: false
              required:
                - nickname
                - name
                - learning_stage_id
                - division_category_id
                - school_id
                - status
  '/api/setting/level/levels/{id}':
    get:
      summary: 'Level - Level - Show Specific Level'
      operationId: levelLevelShowSpecificLevel
      description: "This endpoint allows the authenticated administrator to retrieve the details of a specific level.\nThe level must be associated with a school managed by the administrator."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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'
                properties:
                  id:
                    type: integer
                    example: 1
                  nickname:
                    type: string
                    example: Beginner
                  name:
                    type: string
                    example: 'Level 1'
                  description:
                    type: string
                    example: 'Entry-level stage for new students.'
                  learning_stage:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      nickname:
                        type: string
                        example: Kindergarten
                  division_category:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                      nickname:
                        type: string
                        example: 'Primary Division'
                  school:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 3
                      nickname:
                        type: string
                        example: Wildcats
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2025-01-17T12:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2025-01-17T12:00:00.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Level not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'Level not found or unauthorized.'
      tags:
        - Setting
    put:
      summary: 'Level - Level - Update a Specific Level'
      operationId: levelLevelUpdateASpecificLevel
      description: "This endpoint allows the authenticated administrator to update the details of a specific level.\nIt validates that the level belongs to a school managed by the administrator."
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n   \"message\": \"Level updated successfully.\",\n   \"level\": { ... }\n}"
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Level not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'Level not found or unauthorized.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      nickname:
                        type: array
                        example:
                          - 'The nickname field is required.'
                        items:
                          type: string
                      school_id:
                        type: array
                        example:
                          - 'The selected school does not belong to the authenticated user.'
                        items:
                          type: string
      tags:
        - Setting
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                nickname:
                  type: string
                  description: "The level's nickname."
                  example: Advanced
                  nullable: false
                name:
                  type: string
                  description: "The level's name."
                  example: 'Level 2'
                  nullable: false
                description:
                  type: string
                  description: 'optional A description of the level.'
                  example: 'Intermediate-level stage for students.'
                  nullable: true
                learning_stage_id:
                  type: integer
                  description: 'The ID of the associated learning stage.'
                  example: 1
                  nullable: false
                division_category_id:
                  type: integer
                  description: 'The ID of the associated division category.'
                  example: 2
                  nullable: false
                school_id:
                  type: integer
                  description: 'The ID of the associated school.'
                  example: 3
                  nullable: false
                status:
                  type: string
                  description: 'The status of the level (active or inactive).'
                  example: active
                  nullable: false
              required:
                - nickname
                - name
                - learning_stage_id
                - division_category_id
                - school_id
                - status
    delete:
      summary: 'Level - Level - Archive a Level'
      operationId: levelLevelArchiveALevel
      description: "This endpoint allows the authenticated administrator to archive a level by\nchanging its status to \"archived\". This action does not delete the level from the database."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Level archived successfully.'
                properties:
                  message:
                    type: string
                    example: 'Level archived successfully.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Level not found or unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'Level not found or unauthorized.'
      tags:
        - Setting
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the level to retrieve.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/setting/configuration/{slug}':
    get:
      summary: 'Configuration - Show the template for a specific setting by slug.'
      operationId: configurationShowTheTemplateForASpecificSettingBySlug
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  template:
                    layout: settings
                    fields:
                      -
                        name: site_name
                        type: text
                      -
                        name: email
                        type: email
                properties:
                  template:
                    type: object
                    properties:
                      layout:
                        type: string
                        example: settings
                      fields:
                        type: array
                        example:
                          -
                            name: site_name
                            type: text
                          -
                            name: email
                            type: email
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              example: site_name
                            type:
                              type: string
                              example: text
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Template not found for the provided slug.'
                properties:
                  message:
                    type: string
                    example: 'Template not found for the provided slug.'
      tags:
        - Setting
    parameters:
      -
        in: path
        name: slug
        description: 'The slug of the module.'
        example: setting
        required: true
        schema:
          type: string
  /api/setting/configuration/colors:
    put:
      summary: 'Configuration - Update or reset color settings for the authenticated user.'
      operationId: configurationUpdateOrResetColorSettingsForTheAuthenticatedUser
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  response:
                    menus: '#FF5733'
                    header: '#000000'
                    background: '#f8f7fa'
                    typography: '#1F1F1F'
                  status: success
                  message: 'Colors updated successfully.'
                properties:
                  response:
                    type: object
                    properties:
                      menus:
                        type: string
                        example: '#FF5733'
                      header:
                        type: string
                        example: '#000000'
                      background:
                        type: string
                        example: '#f8f7fa'
                      typography:
                        type: string
                        example: '#1F1F1F'
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Colors updated successfully.'
      tags:
        - Setting
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                changes:
                  type: array
                  description: 'optional An array of changes where each item contains a `name` (color key) and `color` (hex value).'
                  example:
                    -
                      name: menus
                      color: '#FF5733'
                    -
                      name: header
                      color: '#000000'
                  items:
                    type: string
                reset:
                  type: boolean
                  description: 'optional If true, resets all colors to their default values.'
                  example: true
                  nullable: false
  /api/setting/configuration:
    put:
      summary: "Configuration - Update a module's configuration."
      operationId: configurationUpdateAModulesConfiguration
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  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.'
                properties:
                  response:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      parent_id:
                        type: integer
                        example: 1
                      language:
                        type: string
                        example: en
                      colors:
                        type: object
                        properties:
                          primary:
                            type: string
                            example: '#000000'
                          secondary:
                            type: string
                            example: '#FFFFFF'
                      icons:
                        type: string
                        example: default
                      url:
                        type: string
                        example: 'https://example.com'
                      setting:
                        type: object
                        properties:
                          modules:
                            type: array
                            example:
                              -
                                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 }] }] }
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: '1'
                                plural_name:
                                  type: string
                                  example: Users
                                singular_name:
                                  type: string
                                  example: User
                                plural_name_es:
                                  type: string
                                  example: Usuarios
                                singular_name_es:
                                  type: string
                                  example: Usuario
                                sections:
                                  type: array
                                  example:
                                    -
                                      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 }] }] }]
                                  items:
                                    type: object
                                    properties:
                                      default_name: { type: string, example: general }
                                      forms: { type: array, example: [{ 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 }] }] }], items: { type: object, properties: { default_name: { type: string, example: profile_form }, fields: { type: array, example: [{ label_en: 'First Name', label_es: Nombre }], items: { type: object, properties: { label_en: { type: string, example: 'First Name' }, label_es: { type: string, example: Nombre } } } }, custom_fields: { type: array, example: [{ 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 }] }], items: { type: object, properties: { name: { type: string, example: gender }, type: { type: string, example: select }, label_en: { type: string, example: Gender }, label_es: { type: string, example: Género }, options: { type: array, example: [{ name_en: Male, name_es: Hombre, value: Male }, { name_en: Female, name_es: Mujer, value: Female }], items: { type: object, properties: { name_en: { type: string, example: Male }, name_es: { type: string, example: Hombre }, value: { type: string, example: Male } } } } } } } } } }
                      created_at:
                        type: string
                        example: '2025-01-10T12:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-01-10T12:00:00.000000Z'
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'The configuration was updated correctly! To see the changes, please reload the page.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Module not found.'
                properties:
                  message:
                    type: string
                    example: 'Module not found.'
      tags:
        - Setting
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                module:
                  type: string
                  description: 'The ID of the module to update.'
                  example: '"1"'
                  nullable: false
                plural_name:
                  type: string
                  description: 'The plural name of the module in English.'
                  example: '"Users"'
                  nullable: false
                singular_name:
                  type: string
                  description: 'The singular name of the module in English.'
                  example: '"User"'
                  nullable: false
                plural_name_es:
                  type: string
                  description: 'The plural name of the module in Spanish.'
                  example: '"Usuarios"'
                  nullable: false
                singular_name_es:
                  type: string
                  description: 'The singular name of the module in Spanish.'
                  example: '"Usuario"'
                  nullable: false
                section:
                  type: string
                  description: 'The default name of the section to update.'
                  example: '"general"'
                  nullable: false
                form:
                  type: string
                  description: 'optional The default name of the form to update within the section.'
                  example: '"profile_form"'
                  nullable: false
                subsection:
                  type: string
                  description: 'optional The default name of the subsection to update within the section.'
                  example: '"details"'
                  nullable: false
                form_section:
                  type: string
                  description: 'optional The default name of the form section to update.'
                  example: '"address_section"'
                  nullable: false
                fields:
                  type: array
                  description: 'An array of fields to update in the form. Each field must include `label_en` and `label_es`.'
                  example:
                    -
                      label_en: 'First Name'
                      label_es: Nombre
                  items:
                    type: string
                custom_fields:
                  type: array
                  description: 'optional An array of custom fields to add to the form. Each field must include `label_en`, `label_es`, `type`, and optional `options`.'
                  example:
                    -
                      label_en: Gender
                      label_es: Género
                      type: select
                      options:
                        -
                          name_en: Male
                          name_es: Hombre
                        -
                          name_en: Female
                          name_es: Mujer
                  items:
                    type: string
              required:
                - module
                - plural_name
                - singular_name
                - plural_name_es
                - singular_name_es
                - section
                - fields
tags:
  -
    name: Authorization
    description: "This endpoint allows a user to log in by providing valid credentials.\nIt also returns the user's settings, role, and permissions to facilitate frontend access."
  -
    name: Endpoints
    description: ''
  -
    name: Setting
    description: 'This endpoint retrieves the `template` field for the module associated with the settings of the authenticated user.'
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'You can retrieve your token by visiting your dashboard and clicking <b>Generate API token</b>.'
security:
  -
    default: []
